This web mail archive is frozen.
This page is part of a frozen web archive of this mailing list.
You can still navigate around this archive, but know that no new mails
have been added to it since July of 2016.
Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.
On Nov 12, 2013, at 4:42 AM, George Bosilca <bosilca_at_[hidden]> wrote:
>> 2. In the 64 bit case, you'll have a difficult time extracting the MPI status values from the 8-byte INTEGERs in the status array in Fortran (because the first 2 of 3 each really be 2 4-byte integers).
> My understanding is that in Fortran explicitly types variables will retain their expected size. Thus, instead of declaring
> INTEGER :: status[MPI_STATUS_SIZE]
> one should go for
> INTEGER*4 :: status[MPI_STATUS_SIZE]
> This should make it work right now.
You are correct. That's a good workaround.
> However, it is a non-standard solution, and we should fix the status handling internally in Open MPI.
> Looking at the code I think that correctly detecting the type of our ompi_fortran_integer_t during configure (which should be a breeze if the correct flags are passed) should solve all issues here as we are protecting the status conversion between C and Fortran.
Not quite. We do already correctly determine ompi_fortran_integer_t as a C "int" or "long long" (that's what I saw yesterday when I tested this myself).
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.
Either way, as you say, it's a nonstandard solution. So I don't know which way is "more correct". On the one hand, we've had it this way for *years* (so perhaps there's code out there that uses the George workaround and is working fine). But OTOH, it's different than what you would have to do in the non-dash-i8 case, and so we should make MPI_STATUS_SIZE be 6 and then Fortran code will work identically (without INTEGER*4) regardless of whether you used -i8 or not.
> Jim, can you go in the include directory on your Open MPI installation and grep for the definition of ompi_fortran_integer_t please.
> users mailing list
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/