[MPICH] Using -mpilog does not produce any log

Anthony Chan chan at mcs.anl.gov
Tue Mar 27 10:07:48 CDT 2007



On Tue, 27 Mar 2007, Reuben D. Budiardja wrote:

> On Monday 26 March 2007 6:06:43 pm Anthony Chan wrote:
> > On Mon, 26 Mar 2007, Reuben Budiardja wrote:
> > > > Try doing a grep on the executable for any MPE_Log, i.e.
> > > >
> > > > nm <executable_name> | grep -i MPE_Log
> > > >
> > > > A.Chan
> > >
> > > The above command doesn't produce any output. So it seems that my code
> > > is still not linked against the logging library. I've also tried putting
> > > in this directly on the linker: "-lfmpich -llmpe -lmpe" and got the same
> > > result. I've also tried compiling mpich2-1.0.5p3 and used "mpif90
> > > -mpe=mpilog" as my compiler / linker and still  got the same result. Any
> > > idea why this is the case  ?
> >
> > Could it be possible that you are still not putting -mpe=mpilog in the
> > link command of your Makefile ?  A common mistake is that people put
> > "-mpe=mpilog" in FFLAGS but FFLAGS is not used in the link step.
>
> I found out that apparently one of the library I used (ie. PETSc) insert the
> flag "-lmpich -lmpichf90" into linking line, and it seems that this caused
> the program to not link correctly against the MPE library for logging.

"-lmpich -lmpichf90"'s ordering seems wrong, it should be
"-lmpichf90 -lmpich". Was "-lfmpich -llmpe -lmpe" linked before
or after "-lmpich -lmpichf90" ?  I would think that as long as
"-lfmpich -llmpe -lmpe" is linked before any mpi libraries, things
would be OK.

> Taking
> out those flag and use -mpilog (for mpich-1.2.7) or "-mpi=mpilog" (for
> mpich2) gave me the log file after running the program.

I am glad that it finally works for you.

A.Chan




More information about the mpich-discuss mailing list