Hi Roy,

I followed your suggestion 

I changed Make.common and put by hand 

# MPI configuration
# (only explicitly defined when PETSc is absent, otherwise snooped from PETSc)
MPI_IMPL             = petsc_snooped
MPI_LIB              = $(MPICHLIB)

(where the environment variables are picked from my .cshrc)

The example seems link with mpi (for me mpich) but have now a different problem :

[Imac-Intel-de-Tahar-Amari:/usr/local/libmesh] amari% sudo make run_examples
Compiling C++ (in optimized mode) ex0.C...
g++ -DNDEBUG  -O2 -felide-constructors -funroll-loops -fstrict-aliasing -Wdisabled-optimization /Library/Frameworks/Intel_MKL.framework/Headers -I/usr/local/libmesh/include/base -I/usr/local/libmesh/include/enums -I/usr/local/libmesh/include/fe -I/usr/local/libmesh/include/geom -I/usr/local/libmesh/include/mesh -I/usr/local/libmesh/include/numerics -I/usr/local/libmesh/include/partitioning -I/usr/local/libmesh/include/quadrature -I/usr/local/libmesh/include/solvers -I/usr/local/libmesh/include/utils -I/usr/local/libmesh/contrib/boost -I/usr/local/libmesh/contrib/laspack -I/usr/local/libmesh/contrib/parmetis/Lib -I/usr/local/libmesh/contrib/metis/Lib -I/usr/local/libmesh/contrib/sfcurves -I/usr/local/libmesh/contrib/gzstream  -I/usr/local/libmesh/contrib/gmv -I/usr/local/libmesh/contrib/tetgen -I/usr/local/libmesh/contrib/triangle -I/usr/local/petsc/include -I/usr/local/petsc/bmake/macx   -I/usr/local/mpich/include   -I/usr/local/libmesh/include/base -I/usr/local/libmesh/include/enums -I/usr/local/libmesh/include/fe -I/usr/local/libmesh/include/geom -I/usr/local/libmesh/include/mesh -I/usr/local/libmesh/include/numerics -I/usr/local/libmesh/include/partitioning -I/usr/local/libmesh/include/quadrature -I/usr/local/libmesh/include/solvers -I/usr/local/libmesh/include/utils -I/usr/local/libmesh/contrib/boost -I/usr/local/libmesh/contrib/laspack -I/usr/local/libmesh/contrib/parmetis/Lib -I/usr/local/libmesh/contrib/metis/Lib -I/usr/local/libmesh/contrib/sfcurves -I/usr/local/libmesh/contrib/gzstream  -I/usr/local/libmesh/contrib/gmv -I/usr/local/libmesh/contrib/tetgen -I/usr/local/libmesh/contrib/triangle -I/usr/local/petsc/include -I/usr/local/petsc/bmake/macx   -I/usr/local/mpich/include   -c ex0.C -o ex0.i686-apple-darwin8.10.1.opt.o
i686-apple-darwin8-g++-4.0.1: /Library/Frameworks/Intel_MKL.framework/Headers: linker input file unused because linking not done
Linking ex0-opt...
g++ -DNDEBUG  -O2 -felide-constructors -funroll-loops -fstrict-aliasing -Wdisabled-optimization  ex0.i686-apple-darwin8.10.1.opt.o -o ex0-opt /usr/local/libmesh/lib/i686-apple-darwin8.10.1_opt/libmesh.a    -L/usr/local/petsc/lib/macx -lpetscsnes -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetscsnes -lpetsc -L/usr/local/mpich/lib -L/usr/local/mpich/lib -lfmpich -lmpich -lpmpich -lmpich -lpmpich -lpmpich -L/Library/Frameworks/Intel_MKL.framework/Libraries/32 -L/Library/Frameworks/Intel_MKL.framework/Libraries/32 -lmkl_lapack -lmkl_ia32 -lguide   -lz -L/usr/local/libmesh/contrib/lib/i686-apple-darwin8.10.1_opt -lgzstream -llaspack -lmetis -lparmetis -lsfcurves -ltetgen -ltriangle -lgmv -lz -L/usr/local/mpich/lib -lmpich -lmpichcxx -lpmpich -lfmpich -lmpichf90
* Running Example  ./ex0-opt
dyld: Library not loaded: libguide.dylib
  Referenced from: /usr/local/libmesh/examples/ex0/./ex0-opt
  Reason: image not found
make[2]: *** [run] Trace/BPT trap
make[1]: *** [run] Error 1
make: *** [run_examples] Error 2

I guess "lguide" is a library for Shared memory management on  Mac ? is it right ?

Thanks a lot for your help



T. Amari

Centre de Physique Theorique

Ecole Polytechnique

91128 Palaiseau Cedex France

tel : 33 1 69 33 47 53

fax: 33 1 69 33 30 08

email: <mailto:amari@cpht.polytechnique.fr>

URL : http://www.cpht.polytechnique.fr/cpht/amari

Le 3 juil. 07 à 00:06, Roy Stogner a écrit :

On Mon, 2 Jul 2007, John Peterson wrote:

Tahar Amari writes:
> Hi John
> I opened the file
> > $PETSC_DIR/bmake/$PETSC_ARCH/petscconf
> and found
> MPI_LIB = -L/usr/local/mpich/lib -L/usr/local/mpich/lib -lfmpich -
> lmpich -lpmpich -lmpich -lpmpich -lpmpich
> So , is what you thought really happening ?

Well, it's not blank as I had guessed, and it doesn't really look
"wrong", just a little strange.  The library names shouldn't be
repeated multiple times like that.  And note that if you are
linking against shared (.so) libraries, "/usr/local/mpich/lib"
must be in your LD_LIBRARY_PATH, or whatever the equivalent is
on Mac OSX.

But the MPI_LIB variable in PETSc still isn't being used correctly by
libMesh, right?  The MPI_LIB and MPI_INCLUDE variables in Make.common
are blank?  First try copying the PETSc versions of those variables
and see what happens.

The multiple library names are PETSc's problem, and won't hurt
anything.  And with --disable-shared the library path isn't a problem.
Let's first see if hand-setting the MPI variables in Make.common fixes
things, and if so then we can try and figure out why they aren't being
autodetected by either snooping PETSc or by manually setting an MPI