Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: [OMPI users] MPI_Comm_set_errhandler: error in Fortran90 Interface mpi.mod
From: Paul Kapinos (kapinos_at_[hidden])
Date: 2010-05-03 11:44:03


Hello OpenMPI / Sun/Oracle MPI folks,

we believe that the OpenMPI and SunMPI (Cluster Tools) has an error in
the Fortran-90 (f90) bindings of the MPI_Comm_set_errhandler routine.

Tested MPI versions: OpenMPI/1.3.3 and Cluster Tools 8.2.1

Consider the attached example. This file uses the "USE MPI" to bind the
MPI routines f90-style. The f77-style "include 'mpif.h'" is commented out.

If using Intel MPI the attached example is running error-free (with both
bindings).

If trying to compiler with OpenMPI and using f90 bindings, any compilers
tested (Intel/11.1, Sun Studio/12.1, gcc/4.1) says the code cannot be
build because of trying to use a constant (MPI_COMM_WORLD) as input.

For example, the output of the Intel compiler:
-----------------------------------------------------------------------------
MPI_Comm_set_errhandler.f90(12): error #6638: An actual argument is an
expression or constant; this is not valid since the associated dummy
argument has the explicit INTENT(OUT) or INTENT(INOUT) attribute. [0]
call MPI_Comm_set_errhandler (MPI_COMM_WORLD, errhandler, ierr) !
MPI_COMM_WORLD in MPI_Comm_set_errhandler is the problem...
------------------------------^
compilation aborted for MPI_Comm_set_errhandler.f90 (code 1)
-----------------------------------------------------------------------------
With the f77 bindings, the attached program compiles and runs fine.

The older (deprecated) routine MPI_Errhandler_set which is defined to
have the same functionality works fine with both bindings and all MPI's.

So, we believe the OpenMPI implementation of MPI standard erroneously
sets the INTENT(OUT) or INTENT(INOUT) attribute for the communicator
attribute. The definition of an error handle for MPI_COMM_WORLD should
be possible which it is currently not.

Best wishes,
Paul Kapinos

-- 
Dipl.-Inform. Paul Kapinos   -   High Performance Computing,
RWTH Aachen University, Center for Computing and Communication
Seffenter Weg 23,  D 52074  Aachen (Germany)
Tel: +49 241/80-24915