Hi, Mike,

  From MPI-3.0 A.1.1., I can not see it requires all constants are valid in C and FORTRAN. Instead, in 14.3, it says "Since the MPI tool information interface primarily focuses on tools and support libraries, MPI implementations are only required to provide C bindings for functions introduced in this section." And in MPICH's f08 bindings, it is the same (i.e. no support of MPI-T). 


--Junchao Zhang

On Tue, Sep 30, 2014 at 10:39 AM, Michael L. Stokes <Michael.Stokes@uah.edu> wrote:
On 09/30/2014 10:36 AM, discuss-owner@mpich.org wrote:
According to the MPI-3.0 spec (A.1.1), C and FORTRAN constants are supposed to be shared (with noted exceptions).
These include the MPI_T_ERR_ ... error codes.  But from what I can determine, none of the MPI_T_ERR_ error codes
seem to compile under the mpif77 compiler (intel) using MPICH 3.1.2. So I post the following questions:

1) Am i interpreting the specs correctly in that all constants (error codes in this instance) are valid in C and FORTRAN?

2) Is the behavior I'm seeing correct given the current intel compiler and version of MPICH?  The snippet of code I'm
using is the following.  Here I'm using a perl script hereto document to write FORTRAN code where $target is any
of the MPI error codes, and $ext is 'f' in this case.

       PROGRAM ERRORCODE
       IMPLICIT NONE
       INCLUDE "mpif.h"

       IF( $target.ge.MPI_SUCCESS .and.
     +    $target.le.MPI_ERR_LASTCODE) THEN
          WRITE(6,1)
    1     FORMAT('$ext "$target"
     +is verified ')
       ELSE
           WRITE(6,2)
    2      FORMAT('$ext "$target"
     +is not verified ')
       ENDIF

       CALL EXIT(0)
       END PROGRAM ERRORCODE

3) Will this behavior change under the f08 FORTRAN bindings?

Thanks
Mike