The current Fortran wrappers make calls to several f2c/c2f MPI functions. This causes any PMPI interposed library to intercept these calls erroneously (ie think that the user has called these routines). Though the MPI spec http://www.mpi-forum.org/docs/mpi-11-html/node162.html#Node163 does not disallow this it seems this goes against the general OMPI rules of never calling an MPI function from inside the library. It also is a regression from what Sun did originally.
I've talked with Jeff about this issue and the below is what would need to be done to fix this issue:
We can't assume that the PMPI functions are there because there is a --disable-mpi-profile configure switch that will turn off the PMPI layer (it's there for platforms that don't have weak symbols, like OS X -- so the PMPI layer means compiling the entire MPI layer a 2nd time, which takes a lot of time; disabling it means a much faster build [for developers]).
So you just need to convert these functions to ompi() functions (vs. PMPI() functions) and then call those instead. Then also convert the various C MPI_F2C/C2F() functions to call these ompi() functions as well -- so everything uniformly calls these functions: the MPI_*_C2F/F2C functions and the Fortran functions.
The current Fortran wrappers make calls to several f2c/c2f MPI functions. This causes any PMPI interposed library to intercept these calls erroneously (ie think that the user has called these routines). Though the MPI spec http://www.mpi-forum.org/docs/mpi-11-html/node162.html#Node163 does not disallow this it seems this goes against the general OMPI rules of never calling an MPI function from inside the library. It also is a regression from what Sun did originally.
I've talked with Jeff about this issue and the below is what would need to be done to fix this issue:
We can't assume that the PMPI functions are there because there is a --disable-mpi-profile configure switch that will turn off the PMPI layer (it's there for platforms that don't have weak symbols, like OS X -- so the PMPI layer means compiling the entire MPI layer a 2nd time, which takes a lot of time; disabling it means a much faster build [for developers]).
So you just need to convert these functions to ompi() functions (vs. PMPI() functions) and then call those instead. Then also convert the various C MPI_F2C/C2F() functions to call these ompi() functions as well -- so everything uniformly calls these functions: the MPI_*_C2F/F2C functions and the Fortran functions.