On Tue, 5 Apr 2011, Lisandro Dalcin wrote: > On 5 April 2011 13:20, Satish Balay <balay at mcs.anl.gov> wrote: > > Not sure I understand. If I say 'mpi depends on mpe' - then the link line > > is: > > > > Sorry, I was thinking in terms of shared libraries. > > > -lhypre -lmpi -lmpe > > > > But thats incorrect usage - and not what I want.. The correct usage is: > > -lhypre -lmpe -lmpi > > > > The issue comes up with -llmpe - which traps MPI_xx functions - and does > > some > > logging - and then calls MPI_xx functions from -lmpi. i.e usage is: > > > > If you are going to use MPE from MPICH2, "mpicc -mpe=mpilog" does the > right thing: > > $ mpicc -mpe=mpilog -LLIBDIR -lLIBNAME -link_info > gcc -I/usr/include/mpich2-i386 -m32 -O2 -Wl,-z,noexecstack > -Wl,--export-dynamic -LLIBDIR -lLIBNAME -I/usr/include/mpich2-i386 > -L/usr/lib/mpich2/lib -L/usr/lib/mpich2/lib -L/usr/lib/mpich2/lib > -llmpe -lmpe -lmpich -lopa -lpthread -lrt
I guess I'll just leave it at that.. [i.e Its users responsibility to use "mpicc -mpe=mpilog" if they want to log MPI messages.] Currently configure supports --with-mpe=1 or --download-mpe=1. This behaves as any other package. wrt build/usage. If you run 'ex2 -log_mpe' - you get a ex2.clog with all petsc events logged. ./ex2 behaves as before. But once you want to log petsc events + MPI messages - then it gets complicated. [thats when MPE becomes MPI replacement - as Matt says]. I was trying to see if there is a easy way to fit petsc+mpi logging in the current 'package' model. But looks like its easier to say: Logging PETSc events? use --with-mpe=1 or --download-mpe=1 [and run with 'ex2 -log_mpe'] Logging MPI calls? build PETSc with "mpicc -mpe=mpilog" and "mpif90 -mpe=mpilog" or equivalent wrappers - and run as 'ex2' [it always creates a logfile] Logging Both PETSc events and MPI calls? build PETSc with "mpicc -mpe=mpilog" and "mpif90 -mpe=mpilog" --with-mpe=1 ['ex2' creates MPI only log, while 'ex2 -log_mpe' will crate petsc+mpi log]. [I was hoping to simplify the 3rd part as: build PETSc with --with-mpe=1 or --download-mpe=1 and --with-mpe-enalbe-mpilog=1, so that ./'ex2' always creates mpi+petsc log - but that appears to need merging mpi.py with mpe.py. with mpi.py already being compliated enought - I' avoid this] Satish