[mpich-discuss] MPICH2 and MPE log

Rob Latham robl at mcs.anl.gov
Wed Jun 17 10:02:54 CDT 2009


On Wed, Jun 17, 2009 at 09:57:38AM -0400, Marc wrote:
> Greetings all,
> 
> Does anyone has tried to compile a MPICH2 code with logging option? When
> I follow the syntax from:
> http://web.mit.edu/AFS/athena.mit.edu/course/13/13.715/mpich2-1.0.6p1/64/www/www1/mpicxx.html
> 
> I get an error:
> 
> mpicxx -mpe=mpilog -o helloWorld helloWorld.cc 
> cc1plus: error: unrecognized command line option "-mpe=mpilog"

Hm. that should work.. this is what i get:

% ~/work/soft/mpich2/bin/mpicxx -mpe=mpilog -show
g++ -I/home/robl/work/soft/mpich2/include -Wl,--export-dynamic -I/home/robl/work/soft/mpich2/include -L/home/robl/work/soft/mpich2/lib -L/home/robl/work/soft/mpich2/lib -lmpichcxx -L/home/robl/work/soft/mpich2/lib -llmpe -lmpe -lmpich -lopa -lpthread -lpthread -lpthread -lpthread -L/home/robl/work/soft/pvfs2/lib -lpvfs2 -lcrypto -lssl -lpthread -lrt

well, it's kind of long, but you see the -L/home/robl/work/soft/mpich2/lib -llmpe -lmpe -lmpich in there, which is the important piece.

> I tried to link manually the library with:
> 
> mpicxx -o helloWorld helloWorld.cc -L/opt/mpich/gnu/lib -lmpe -llmpe
> 
> but then I get undefined references from the library liblmpe. 

Close. swap those two libraries.

> Removing it with:
> 
> mpicxx -o helloWorld helloWorld.cc -L/opt/mpich/gnu/lib -lmpe
> 
> compile but does not create log file... Notice that MPE is installed in
> the MPICH directory on my machine but it's supposed to work also with
> MPICH2, right?

I suspect if you did not build MPE as part of MPICH, then you'll have
to link by hand.  There is a script called mpecc, but I think it's set
up to compile with a specific MPI compiler.

==rob

-- 
Rob Latham
Mathematics and Computer Science Division
Argonne National Lab, IL USA


More information about the mpich-discuss mailing list