Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: [OMPI devel] making Fortran MPI_Status components public
From: Eugene Loh (eugene.loh_at_[hidden])
Date: 2012-09-26 15:49:25


The ibm tests aren't building for me. One of the issues is
mprobe_usempif08.f90 trying to access status%MPI_SOURCE and
status%MPI_TAG. I assume this is supposed to work, but it doesn't.
E.g., trunk with Oracle Studio compilers:

% cat a.f90
   use mpi_f08
   type(MPI_Status) status
   write(6,*) status%MPI_SOURCE
   write(6,*) status%MPI_TAG
   end
% mpifort -m64 -c a.f90

   write(6,*) status%MPI_SOURCE
                     ^
"a.f90", Line = 3, Column = 21: ERROR: "MPI_SOURCE" is a private
component of "MPI_STATUS" and cannot be used outside of the module.

   write(6,*) status%MPI_TAG
                     ^
"a.f90", Line = 4, Column = 21: ERROR: "MPI_TAG" is a private component
of "MPI_STATUS" and cannot be used outside of the module.

If I look in ompi/mpi/fortran/[base|use-mpi-f08-desc]/mpi-f08-types.f90,
I see:

    type, BIND(C) :: MPI_Status
       integer :: MPI_SOURCE
       integer :: MPI_TAG
       integer :: MPI_ERROR
       integer(C_INT) OMPI_PRIVATE :: c_cancelled
       integer(C_SIZE_T) OMPI_PRIVATE :: c_count
    end type MPI_Status

Should the first three components explicitly be made public?