[MPIWG Fortran] Type of MPI_Status

Bill Long longb at cray.com
Mon Mar 17 14:39:23 CDT 2014


On Mar 17, 2014, at 2:24 PM, Jeff Hammond <jeff.science at gmail.com> wrote:

> I think the MPI community should universally agree to not support -i8

So says the guy without customers. :)

Ultimately, the problem always comes back to the decision to use default INTEGER and REAL declarations in the MPI interfaces.  It appears that OpenMPI is opting for specific KIND values instead. This is similar to what Junchao was proposing as well.   Declarations with KIND values specified are unaffected by switches like -i8.   (Of course, there are other gremlins on the other side of that fence, particularly with the actual argument kinds in legacy codes.)

Cheers,
Bill


> and recursively erase ~ when users attempt to do it.  It's quite
> possibly the worst idea in the history of computing.
> 
> Jeff
> 
> On Mon, Mar 17, 2014 at 7:21 PM, Bill Long <longb at cray.com> wrote:
>> 
>> On Mar 17, 2014, at 2:10 PM, Junchao Zhang <jczhang at mcs.anl.gov> wrote:
>> 
>>> 
>>> There is a problem with this approach.  If the normal INTEGER and c_int are the same, then INTEGER compiled with a switch like -i8 is almost assured to be different from c_int.   It is not that hard to write the module such that a single source can be used to compile both -i4 and -i8 versions.  There should not be measurable overhead with this, since the checks are all on compile-time constants, so the checks and the “unused” branch of the test will be eliminated by the compiler.
>>> 
>>> The compiler eliminates the unused branch in an MPI implementation at the library build time. But later, you use a different sized INTEGER at user code compilation time (through mpif90 options?). That is erroneous.
>> 
>> No. You have to build two versions of the module .mod and .o files.  One without -i8 and one with -i8 (usually actually something like default 4 and 8, to cover REAL as well, but taking care of the cases of REAL in the MPI module is trivial).  When you compile the user code, the compile script detects the -i8 option and references the correct .mod file. The link step gets the right .o files.   This has been happening for years.   The point of the module design is to have only one copy of the module source that will generate the correct code based on how it is compiled, and also to insulate the C part of the library from this issue, so that only one copy of that is needed.
>> 
>> Cheers,
>> Bill
>> 
>> 
>> 
>>> Why there is runtime overhead when INTEGER = c_int, see my previous reply to Rolf on comparison of designs with INTEGER MPI_Status or with INTEGER(c_int) MPI_Status.
>>> 
>> 
>> Bill Long                                                                       longb at cray.com
>> Fortran Technical Suport  &                                  voice:  651-605-9024
>> Bioinformatics Software Development                     fax:  651-605-9142
>> Cray Inc./ Cray Plaza, Suite 210/ 380 Jackson St./ St. Paul, MN 55101
>> 
>> 
>> _______________________________________________
>> mpiwg-fortran mailing list
>> mpiwg-fortran at lists.mpi-forum.org
>> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpiwg-fortran
> 
> 
> 
> -- 
> Jeff Hammond
> jeff.science at gmail.com
> _______________________________________________
> mpiwg-fortran mailing list
> mpiwg-fortran at lists.mpi-forum.org
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpiwg-fortran

Bill Long                                                                       longb at cray.com
Fortran Technical Suport  &                                  voice:  651-605-9024
Bioinformatics Software Development                     fax:  651-605-9142
Cray Inc./ Cray Plaza, Suite 210/ 380 Jackson St./ St. Paul, MN 55101





More information about the mpiwg-fortran mailing list