[mpich-discuss] f77 bindings and profiling

Isaila, Florin D. fisaila at mcs.anl.gov
Thu Nov 20 09:22:45 CST 2014


Hi Ken, 

it is not working this way. 

Florin
________________________________________
From: Kenneth Raffenetti [raffenet at mcs.anl.gov]
Sent: Wednesday, November 19, 2014 10:56 AM
To: discuss at mpich.org
Cc: mpich-discuss at mcs.anl.gov
Subject: Re: [mpich-discuss] f77 bindings and profiling

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
_______________________________________________
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