Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7760107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:47:46+00:00 2026-06-01T13:47:46+00:00

In fortran, I can declare a character string as: character*80 mystring and then send

  • 0

In fortran, I can declare a character string as:

character*80 mystring

and then send it as:

call MPI_Send(mystring,len(mystring),MPI_CHARACTER,...,ierr)

Alternatively, I could declare my string as an array of characters (much more in line with the way things are traditionally done in C)

character mystring(80)

and then send it as:

call MPI_Send(mystring,80,MPI_CHARACTER,...,ierr)

My understanding is that these two calls would have different interfaces when calling a C function. (the former is often implemented by the compiler by passing an additional parameter by value which holds the length of the string, whereas the latter does not pass that parameter). So, how does the MPI Implementation (typically written in C) know the difference?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T13:47:48+00:00Added an answer on June 1, 2026 at 1:47 pm

    http://www.mcs.anl.gov/research/projects/mpi/mpi-standard/mpi-report-1.1/node37.htm#Node38

    Basically don’t do the latter.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From time to time I read that Fortran is or can be faster then
I can not call the same subroutine two time using pgf90 fortran complier on
In fortran you can declare an array with any suitable (integral) range, for example:
I can create function pointers in Fortran 90, with code like real, external ::
I have Fortran-based 3D column-major order array flattened into linear memory. What formula/algorithm can
In my Fortran code I made the following call to the dnrm2 routine: d
I have a Fortran program, which I can compile using f77, f95 or ifort
In short, can I do something like this in fortran (any of the fortran
I tried to compile a fortran program for soil-plant-atmosphere model, but I can't compile
I am trying to read some Fortran code, but can not determine what the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.