[mpich-discuss] missing Fortran bindings in MPICH

Michael.Rachner at dlr.de Michael.Rachner at dlr.de
Mon Dec 15 04:26:23 CST 2014


Dear Junchao,

In another email of today to discuss at mpich.org<mailto:discuss at mpich.org>  I attached  my sharedmemtest.f90  test program.

At the end of that file I added a small sbr check_ftn_bindings  .   It is for checking for missing explicit Ftn-interfaces in the mpi-module.
If you activate the USE-stmts in that sbr, you will get this output at compile time (with MPICH-3.0.4 and INTEL-14.0.1 on a Linux-cluster):

rachner at master:~/dat> mpif90 sharedmemtest.f90
sharedmemtest.f90(246): error #6580: Name in only-list does not exist.   [MPI_FINALIZE]
      use MYMPI, only:  MPI_INIT, MPI_BARRIER, MPI_FINALIZE      &   ! <-- MPI-2 routines
                -----------------------------------------------^
sharedmemtest.f90(249): error #6580: Name in only-list does not exist.   [MPI_WIN_ALLOCATE_SHARED]
      use MYMPI, only:  MPI_WIN_ALLOCATE_SHARED, MPI_WIN_SHARED_QUERY, MPI_GET_LIBRARY_VERSION  ! <-- MPI-3 routines
   ------------------------^
sharedmemtest.f90(249): error #6580: Name in only-list does not exist.   [MPI_WIN_SHARED_QUERY]
      use MYMPI, only:  MPI_WIN_ALLOCATE_SHARED, MPI_WIN_SHARED_QUERY, MPI_GET_LIBRARY_VERSION  ! <-- MPI-3 routines
                         -------------------------------------------------^
compilation aborted for sharedmemtest.f90 (code 1)
rachner at master:~/dat>


You can see, that also for sbr MPI_FINALIZE there is no explicit Ftn-interface in the mpi-module  (“use mpi”).
(By the way: In our MPICH-3.0.4 implementation there exist no mpi_base.f90, only a  mpi_base.mod file.)


It is a good investment in the future, that MPICH has provided explicit interfaces now for the mpi-f08 module.
But: Do normal Ftn-compilers already support Ftn2008 features already sufficiently, so that we can actually use that mpi_f08 module?
There is the problem, I think.
Have you tried, whether it works for the INTEL-Ftn-compiler?
If it does not work, I suggest, you may contact INTEL, telling them, which Ftn08-feature are desirable but still missing in their Ftn95 compiler.

Greetings
   Michael Rachner


Von: Junchao Zhang [mailto:jczhang at mcs.anl.gov]
Gesendet: Freitag, 12. Dezember 2014 18:05
An: <discuss at mpich.org>
Betreff: Re: [mpich-discuss] missing Fortran bindings in MPICH

Hi, Michael,
  I checked and found MPI_FINALIZE did have an explicit interface, at least in MPICH-3.1.3. You can search the file mpi_base.f90 in your MPICH build.
  We recently fixed the explicit interface problem in  MPI Fortran 2008 bindings.  You need to "use mpi_f08" in your code.  A paper on that is at http://dl.acm.org/citation.cfm?id=2642777
  The new bindings are already included in MPICH-3.2a1. It requires Fortran2008 + TS29113 capable compilers, such as Cray ftn 8.3.3+ or gfortran-dev. If you'd like to have a try, I can instruct you how to do that.

  Thanks.






--Junchao Zhang

On Fri, Dec 12, 2014 at 5:55 AM, <Michael.Rachner at dlr.de<mailto:Michael.Rachner at dlr.de>> wrote:
Dear developers of MPICH,

For your convenience, I forward the emails in mvapich-discuss  concerning the missing Fortran bindings.
Possibly this I can encourage you  a bit, adding (as OPENMPI did it successfully)  the missing explicit Ftn-interfaces in the mpi-module
for those MPI-routines with parameters of "Choice"-type?

At least:  You may add the explicit Ftn-interface for the sbr  MPI_FINALIZE . It is missing in MPICH-3.0.4 too.

Greetings
  Michael Rachner






-----Ursprüngliche Nachricht-----
Von: mvapich-discuss [mailto:mvapich-discuss-bounces at cse.ohio-state.edu<mailto:mvapich-discuss-bounces at cse.ohio-state.edu>] Im Auftrag von Michael.Rachner at dlr.de<mailto:Michael.Rachner at dlr.de>
Gesendet: Freitag, 12. Dezember 2014 12:38
An: mvapich-discuss at cse.ohio-state.edu<mailto:mvapich-discuss at cse.ohio-state.edu>
Betreff: [mvapich-discuss] WG: WG: missing Fortran bindings in MVAPICH2-2.1a

Sorry, I wanted to send my email not to Jonathan alone, but to the mvapich-discuss.
  Michael



-----Ursprüngliche Nachricht-----
Von: Rachner, Michael
Gesendet: Freitag, 12. Dezember 2014 10:03
An: 'Jonathan Perkins'
Betreff: AW: [mvapich-discuss] WG: missing Fortran bindings in MVAPICH2-2.1a

Thank You, Jonathan, for this hint.
Indeed, the problem with the missing explicit Ftn-interfaces in the mpi-module are  the arguments of "choice"-type.  Fortran 95 don't like them.
So the MPI-3.0  Standard document contains a complicated chapter 17.1  with these things.
As a consequence, MPICH seems to have chosen the slim way omitting in the mpi-module ("use mpi") the explicit Ftn-interfaces for MPI-routines with choice-type arguments, whereas OPENMPI has chosen the cumbercome way providing  the explicit Ftn-interfaces even for these MPI-routines. They succeeded.
For details: In November there were some emails discussing this issue in the OPENMPI-forum.

Greetings
Michael Rachner


-----Ursprüngliche Nachricht-----
Von: Jonathan Perkins [mailto:perkinjo at cse.ohio-state.edu<mailto:perkinjo at cse.ohio-state.edu>]
Gesendet: Donnerstag, 11. Dezember 2014 16:17
An: Rachner, Michael
Cc: mvapich-discuss at cse.ohio-state.edu<mailto:mvapich-discuss at cse.ohio-state.edu>
Betreff: Re: [mvapich-discuss] WG: missing Fortran bindings in MVAPICH2-2.1a

Hello Michael.  My investigation turned up the same issue in MPICH-3.1.3.  MVAPICH2-2.1a is based on MPICH-3.1.2 so it inherits the same behavior.

Here is a snippet from MPICH's user guide:

    4.2 Special Issues for Fortran

    MPICH provides two kinds of support for Fortran programs. For
    Fortran 77 programmers, the file mpif.h provides the definitions of
    the MPI constants such as MPI COMM WORLD. Fortran 90 programmers
    should use the MPI module instead; this provides all of the
    definitions as well as interface definitions for many of the MPI
    functions. However, this MPI module does not provide full Fortran 90
    support; in particular, interfaces for the routines, such as MPI
    Send, that take “choice” arguments are not provided.

It sounds like these are routines with ``choice'' arguments.

On Thu, Dec 11, 2014 at 01:29:03PM +0000, Michael.Rachner at dlr.de<mailto:Michael.Rachner at dlr.de> wrote:
> Dear developers,
>
> I have just found, that exactly the same 11 missing Ftn-interfaces  are also missing in MPICH-3.0.4, MSMPI-5.0, IMPI-5.0.0  .
> So that looks, as if you all have inherited these missing interfaces from MPICH.
>
> In contrast, with OPENMPI-1.8.2 all explicit Ftn-interfaces for MPI-routines needed by our CFD-code are present. Compliment!
>
> Greetings
> Michael Rachner
>
>
> Von: mvapich-discuss
> [mailto:mvapich-discuss-bounces at cse.ohio-state.edu<mailto:mvapich-discuss-bounces at cse.ohio-state.edu>] Im Auftrag von
> Michael.Rachner at dlr.de<mailto:Michael.Rachner at dlr.de>
> Gesendet: Donnerstag, 11. Dezember 2014 13:12
> An: mvapich-discuss at cse.ohio-state.edu<mailto:mvapich-discuss at cse.ohio-state.edu>
> Betreff: [mvapich-discuss] missing Fortran bindings in MVAPICH2-2.1a
>
> Dear developers of MVAPICH2,
>
> I found, that the explicit interfaces in the mpi-module are still missing in MVAPICH2-2.1a  (with INTEL-14.0.4) for these 11 MPI-routines:
>   MPI_BCAST
>   MPI_GATHER , MPI_GATHERV
>   MPI_REDUCE , MPI_ALLREDUCE
>   MPI_SCATTER, MPI_SCATTERV
>   MPI_SSEND  , MPI_RECV
>   MPI_WIN_ALLOCATE_SHARED, MPI_WIN_SHARED_QUERY
>
> Greetings
>   Michael Rachner
>

> _______________________________________________
> mvapich-discuss mailing list
> mvapich-discuss at cse.ohio-state.edu<mailto:mvapich-discuss at cse.ohio-state.edu>
> http://mailman.cse.ohio-state.edu/mailman/listinfo/mvapich-discuss

_______________________________________________
discuss mailing list     discuss at mpich.org<mailto:discuss at mpich.org>
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20141215/787e46f3/attachment.html>
-------------- next part --------------
_______________________________________________
discuss mailing list     discuss at mpich.org
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss


More information about the discuss mailing list