Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

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.

Subject: [OMPI devel] Fortran 90 Interface
From: David Robertson (robertson_at_[hidden])
Date: 2009-01-21 17:25:23


Hello,

I'm having a problem with MPI_COMM_WORLD in Fortran 90. I have tried
with OpenMPI versions 1.2.6, 1.2.8 and 1.3. Both versions are compiled
with the PGI 8.0-2 suite. I've run the program in a debugger and with
"USE mpi" and MPI_COMM_WORLD returns 'Cannot find name
"MPI_COMM_WORLD"'. If I use "include mpif.h" results are a little
better: MPI_COMM_WORLD returns 0 (the initial value assigned by
mpif-common.h). The MPI functions don't seem to be affected by the fact
that MPI_COMM_WORLD is unset or equal to 0. For example, the following
works just fine:

          CALL mpi_init (MyError)
          CALL mpi_comm_rank (MPI_COMM_WORLD, MyRank, MyError)
          CALL mpi_comm_size (MPI_COMM_WORLD, Nnodes, MyError)

even though, in the debugger, MPI_COMM_WORLD is unset or zero every step
of the way. However, when I try to us MPI_COMM_WORLD in a non MPI
standard function (Netcdf-4 in this case):

         status=nf90_create_par(TRIM(ncname), &
      & OR(nf90_clobber, nf90_netcdf4),
                       &
      & MPI_COMM_WORLD, info, ncid)

   I get the following error:

[daggoo:07640] *** An error occurred in MPI_Comm_dup
[daggoo:07640] *** on communicator MPI_COMM_WORLD
[daggoo:07640] *** MPI_ERR_COMM: invalid communicator
[daggoo:07640] *** MPI_ERRORS_ARE_FATAL (goodbye)

I have tried the exact same code compiled and run with MPICH2 (also PGI
8.0-2) and the problem does not occur.

If I have forgotten any details needed to debug this issue, please let
me know.

Thanks,
David Robertson