[mpich-discuss] install mpich2 on a mac

Anthony Chan chan at mcs.anl.gov
Tue Feb 10 10:28:20 CST 2009


Your Mac may have OpenMPI preinstalled, so when you invoke mpif90, be
sure to use full pathname, 
"/Users/nvieira1/pkg/mpich2-1.0.8/install/bin/mpif90".

Another possible problem is that the version of gcc and gfortran selected by 
configure produce different binary formats, i.e. one is 32-bit and the 
other is 64-bit.  So adding CFLAGS=-m32 or CFLAGS=-m64 to configure may help.
If that does not work, send us the configure and make outputs as stated in
README.

A.Chan
----- "Vieira da silva, Nuno" <n.vieira-da-silva08 at imperial.ac.uk> wrote:

> Hi,
> 
> I am trying to install mpich2 on a mac with Leopard 10.5.6.
> I installed it using this configuration:
> 
> ./configure --prefix=/Users/nvieira1/pkg/mpich2-1.0.8/install \
>          --enable-f90 \
>          --enable-sharedlibs=osx-gcc\
>          2>&1 | tee c.txt
> 
> for c++ applications I am able to compile and link. For fortran I am 
> 
> having problems linking. For instance for this simple example:
> 
> program test
>   use mpi
>   implicit none
> 
>   integer*4 ierr
> 
>   call  mpi_init(ierr)
>   print*, ierr
> 
>   call mpi_finalize(ierr)
> 
> end program
> 
> 
> I can compile with no problems using mpif90 -c test.f90
> but during the linking stage I am getting this error:
> 
> $ mpif90 -o test test.o
> 
> Undefined symbols:
>    "_mpi_finalize_", referenced from:
>        _MAIN__ in test.o
>    "_mpi_init_", referenced from:
>        _MAIN__ in test.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
> 
> 
> It seems that I have missed something on the installation for the  
> fortran compiler. I have gfortran version 4.4.0
> I would appreciate if someone could help me with this. many thanks in 
> 
> advance
> Best regards,
> Nuno


More information about the mpich-discuss mailing list