[mpich-discuss] f77 bindings and profiling

Kenneth Raffenetti raffenet at mcs.anl.gov
Wed Nov 19 10:56:59 CST 2014


On 11/18/2014 09:47 AM, Isaila, Florin D. wrote:
> fisaila at howard:f77$ mpif77 -show fpi.f
> gfortran fpi.f -I/homes/fisaila/software/mpich/include -I/homes/fisaila/software/mpich/include -L/homes/fisaila/software/mpich/lib -lmpifort -lfoo -Wl,-rpath -Wl,/homes/fisaila/software/mpich/lib -Wl,--enable-new-dtags -lmpi

This looks to be the problem. PROFILE_PRELIB needs to be added *before* 
libmpifort. Some time after 3.1, we re-organized which symbols go into 
which libraries and now libmpifort.so contains PMPI_Init and all its 
weak aliases (MPI_Init, mpi_init_, etc.) This means the MPI_Init symbol 
is resolved before your library is searched.

Can you manually try a compile line with -lfoo before -lmpifort and 
confirm that it works as expected? I.e.

gfortran fpi.f -I/homes/fisaila/software/mpich/include 
-I/homes/fisaila/software/mpich/include 
-L/homes/fisaila/software/mpich/lib -lfoo -lmpifort -Wl,-rpath 
-Wl,/homes/fisaila/software/mpich/lib -Wl,--enable-new-dtags -lmpi

Ken
_______________________________________________
discuss mailing list     discuss at mpich.org
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss


More information about the discuss mailing list