[MPICH] Compiling mpich2 on Mac OS X

Trach-Minh Tran trach-minh.tran at epfl.ch
Sat May 20 10:27:39 CDT 2006


Hi Enrique,

I was able to build mpich2-1.0.3 on Mac OSX, using the g95 compiler(http://g95.org) by
doing the following:
...
export F77="g95"
export F90="g95"
export LIBS="-lSystemStubs"
configure \
   --enable-f90 --enable-f77 \
   --with-java=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home
make
make install
...

Good luck,   -Minh.



On 05/18/2006 07:26 PM, Enrique Curchitser wrote:
> I am trying to compile mpich 2 on a Mac OS X 10.4.6 with the gfortran  
> compiler.
> I have two problems.
> 
> 1.  Looking at the make.log I see:
> 
>    /usr/local/bin/gfortran -g -O2 -I. -c ./mpi.f90
>    ar cr libmpichf90.a mpi.o
>    ranlib libmpichf90.a
>    ranlib: warning for library: libmpichf90.a the table of contents  is 
> empty (no object file members in the library define global symbols)
> 
> and then when I try to link a program using mpif90, I get expected  
> errors such as:
> 
> /usr/bin/ld: warning empty table of contents: /usr/local/mpich2.gnu/ 
> lib/libmpichf90.a (can't load from it)
> /usr/bin/ld: warning empty table of contents: /usr/local/mpich2.gnu/ 
> lib/libmpichf90.a (can't load from it)
> /usr/bin/ld: Undefined symbols:
> _mpi_comm_rank__
> _mpi_finalize__
> _mpi_init__
> _mpi_allgather__
> 
> etc.
> 
> 
> 
> 2.  If I try to compile using gcc 4.0 (the default) I get the  following 
> when linking:
> 
>     /usr/bin/ld: Undefined symbols:
> _fprintf$LDBLStub
> _snprintf$LDBLStub
> _vfprintf$LDBLStub
> _vprintf$LDBLStub
> _vsnprintf$LDBLStub
> _printf$LDBLStub
> _sscanf$LDBLStub
> 
> 
> Now, I unerstand that some of these are in /usr/lib/libSystemStub.a,  
> but how do I tell mpich to build
> looking there, so that mpif90 and friends know about this library.
> 
> Thanks for any insight,
> 
> Enrique
> 
> 
> ____________________________
> Enrique Curchitser
> Lamont-Doherty Earth Observatory
> Oceanography
> 61 Route 9W
> Palisades, NY 10964
> 
> email:    enrique at ldeo.columbia.edu
> Phone:  (845) 365-8691
> Fax:       (845) 365-8736
> 
> 
> 
> 


-- 
Dr. Trach-Minh Tran
CRPP/SB/EPFL http://crppwww.epfl.ch
Swiss Federal Institute of Technology
CH-1015 Lausanne
Office: http://plan.epfl.ch/?room=PPB111
Tel: +41 21 693 4569
Fax: +41 21 693 5176




More information about the mpich-discuss mailing list