[MPIWG Fortran] Type of MPI_Status
Bill Long
longb at cray.com
Mon Mar 17 13:52:04 CDT 2014
On Mar 17, 2014, at 1:39 PM, Junchao Zhang <jczhang at mcs.anl.gov> wrote:
>
> On Mon, Mar 17, 2014 at 11:52 AM, Craig Rasmussen <rasmus at cas.uoregon.edu> wrote:
> Jeff and I had a similar conversation last week. It is my viewpoint that the MPI-3 interfaces are formal interfaces that can be adapted by an implementation in a way that formally meets the specification.
>
> +1 for this view.
>
> For Open MPI I believe that Jeff will add configuration magic to check is INTEGER(C_INT) and default INTEGER have the same KIND value. This should be true for 100% of the compilers. If not, then that compiler will not be able to build Open MPI.
>
> Supporting different INTEGER and c_int 1) is useless; 2) adds code complexity; 3) adds extra runtime overhead (in MPICH implementation) even when INTEGER and c_int are the same. I prefer stopping the support and doing configuration time check.
>
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.
Note that the -i4/-i8 problem is one of the arguments why using default INTEGER in the Fortran interfaces should have been prohibited by the MPI spec.
Cheers,
Bill
>
> The use of INTEGER(C_INT) to replace the default INTEGER in the MPI types is needed to stopped compiler warning from GNU. We did this work (adding BIND(C) to gfortran) at Los Alamos and I think we perhaps got carried away with the warning messages.
>
> _______________________________________________
> 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