Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] Prototypes for Fortran MPI_ commands using 64-bit indexing
From: Jeff Squyres (jsquyres) (jsquyres_at_[hidden])
Date: 2013-11-13 15:05:25


On Nov 12, 2013, at 4:25 PM, George Bosilca <bosilca_at_[hidden]> wrote:

>> However, the key here is that MPI_STATUS_SIZE is set to be the size of a ***C*** MPI_Status (but expressed in units of Fortran INTEGER size -- so in the sizeof(int)==sizeof(INTEGER)==4 case, MPI_STATUS_SIZE is 6. But in the sizeof(int)==4, sizeof(INTEGER)==8 case, MPI_STATUS_SIZE is 3.
>>
>> That being said, we *could* change this so that MPI_STATUS_SIZE is always 6, and have the C<—>Fortran status routines just do the Right Thing depending on the size/type of ompi_fortran_integer_t.
>
> Indeed. We can have an Fortran MPI_Status (only in the Fortran interface) that will be 3 ompi_fortran_integer_t, and alter the translation macros to do the right thing (translate from C int to the chosen Fortran int).

I'm not sure I understand what you're proposing: what you say sounds like what we do today:

- in the sizeof(int)==sizeof(INTEGER)==4 case, everything is the same size, and nothing special needs to be done

- in the sizeof(int)==4, sizeof(INTEGER)==8 case, the Fortran status size is 3, but the C<->Fortran stuff still basically does a memcpy from the C MPI_Status to the Fortran array (meaning: the C int's are not upsized to be fortran INTEGERs).

-- 
Jeff Squyres
jsquyres_at_[hidden]
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/