[MPI3 Fortran] Results of recent J3 Fortran meeting
Rolf Rabenseifner
rabenseifner at hlrs.de
Mon Mar 28 17:38:20 CDT 2011
Craig,
Because the warning is issued only at the compilation of the MPI
library, and not at the caller of such BIND(C) routines,
I agree that the problem is nut an issue for the MPI Forum.
Thank you pointing this out
Rolf
----- Original Message -----
> From: "Craig E Rasmussen" <rasmussn at lanl.gov>
> To: "Rolf Rabenseifner" <rabenseifner at hlrs.de>
> Cc: longb at cray.com, "MPI-3 Fortran working group" <mpi3-fortran at lists.mpi-forum.org>, "Craig E Rasmussen"
> <rasmussn at lanl.gov>, "N.M. Maclaren" <nmm1 at cam.ac.uk>, "Reinhold Bader" <reinhold.bader at lrz.de>
> Sent: Monday, March 28, 2011 6:05:45 PM
> Subject: Re: [MPI3 Fortran] Results of recent J3 Fortran meeting
> About a comment from Craig:
> gfortran issues a warning when having a
> INTEGER dummy argument in combination with BIND(C).
> This means that the warning of gfortran is not necessary.
> Compiling the interface, it would be okay to have an information
> message.
> On the caller site, a warning would not be helpful
> because it would cause a warning with each MPI call.
> I do not know, where gfortran currently produces its warning.
>
>
> So that everyone is clear on the warning message. Here is an example
> of an interface but it could also be in a derived type definition with
> the BIND(C) attribute:
>
> interface
> subroutine foo(i) BIND(C)
> integer :: i
> end subroutine
> end interface
>
> The gfortran warning is that the integer i MAY not be interoperable.
> There is an error if the types don't match up at the calling site.
> This is all as it should be. We just need to ask gfortran to turn the
> warning off or to provide a compiler option so that the user can turn
> it off.
>
>
> I'm not convinced there is a problem here.
> If I understood all correctly, then you convinced me
> that there is not a problem, because it is part of an MPI library
> compilation to check which C integer type is equivalent
> to Fortran INTEGER. Because MPI is doing all by call by reference
> (i.e. not by VALUE), I expect that the problem is really solved.
>
>
> Whether the call is by reference or by value is not the issue. In
> Fortran the type and kind of the actual argument must agree with that
> of the dummy argument in the interface.
>
> -craig
--
Dr. Rolf Rabenseifner . . . . . . . . . .. email rabenseifner at hlrs.de
High Performance Computing Center (HLRS) . phone ++49(0)711/685-65530
University of Stuttgart . . . . . . . . .. fax ++49(0)711 / 685-65832
Head of Dpmt Parallel Computing . . . www.hlrs.de/people/rabenseifner
Nobelstr. 19, D-70550 Stuttgart, Germany . (Office: Allmandring 30)
More information about the mpiwg-fortran
mailing list