[MPICH] Compiling mpich2 on Mac OS X

Enrique Curchitser enrique at ldeo.columbia.edu
Thu May 18 12:26:01 CDT 2006


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






More information about the mpich-discuss mailing list