Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: [OMPI users] What's wrong with this code?
From: Prentice Bisbal (prentice_at_[hidden])
Date: 2011-02-22 16:41:26


One of the researchers I support is writing some Fortran code that uses
Open MPI. The code is being compiled with the Intel Fortran compiler.
This one line of code:

integer ierr,istatus(MPI_STATUS_SIZE)

leads to these errors:

$ mpif90 -o simplex simplexmain579m.for simplexsubs579
/usr/local/openmpi-1.2.8/intel-11/x86_64/include/mpif-config.h(88):
error #6406: Conflicting attributes or multiple declaration of name.
[MPI_STATUS_SIZE]
      parameter (MPI_STATUS_SIZE=5)
-----------------^
simplexmain579m.for(147): error #6591: An automatic object is invalid in
a main program. [ISTATUS]
        integer ierr,istatus(MPI_STATUS_SIZE)
---------------------^
simplexmain579m.for(147): error #6219: A specification expression object
must be a dummy argument, a COMMON block object, or an object accessible
through host or use association [MPI_STATUS_SIZE]
        integer ierr,istatus(MPI_STATUS_SIZE)
-----------------------------^
/usr/local/openmpi-1.2.8/intel-11/x86_64/include/mpif-common.h(211):
error #6756: A COMMON block data object must not be an automatic object.
  [MPI_STATUS_IGNORE]
      integer MPI_STATUS_IGNORE(MPI_STATUS_SIZE)
--------------^
/usr/local/openmpi-1.2.8/intel-11/x86_64/include/mpif-common.h(211):
error #6591: An automatic object is invalid in a main program.
[MPI_STATUS_IGNORE]
      integer MPI_STATUS_IGNORE(MPI_STATUS_SIZE)

Any idea how to fix this? Is this a bug in the Intel compiler, or the code?

Some additional information:

$ mpif90 --showme
ifort -I/usr/local/openmpi-1.2.8/intel-11/x86_64/include
-I/usr/local/openmpi-1.2.8/intel-11/x86_64/lib
-L/usr/local/openmpi-1.2.8/intel-11/x86_64/lib -lmpi_f90 -lmpi_f77 -lmpi
-lopen-rte -lopen-pal -libverbs -lrt -lnuma -ldl -Wl,--export-dynamic
-lnsl -lutil

-- 
Prentice