[MPICH2-dev] fortran 90 compiling error on G5

Heinz, Michael mheinz at silverstorm.com
Wed Sep 7 12:46:36 CDT 2005


I haven't tried building for xlf90 on mac yet, but past experience makes me think this is a problem with blending GCC libraries with xlf90 code.

I would suggest doing an 

nm libmpich.a | grep mpi_init

and looking at the result. I suspect that you will find the mpi_init in the library is called "__mpi_init" instead of "_mpi_init". 

You probably want to see what IBM has to say about linking xlf90 code with gcc code and vice-versa. They may have compiler options to deal with this.   

-----Original Message-----
From: Zhibo Zhang [mailto:zhibo_zhang at tamu.edu]
Sent: Wednesday, September 07, 2005 12:02 PM
To: mpich2-dev at mcs.anl.gov
Subject: [MPICH2-dev] fortran 90 compiling error on G5


Dear Mpich2 Developers

I meet some problems with compiling fortran file using mpif90, I  
don't know whether it is a bug
I installed the MPICH2 on my Mac G5 following the document. The steps  
are
1, configure --prefix=/usr/local --enable-f90
2, make
3, sudo make install

The fortran compiler on my G5 is the xlf90 from IBM.

Everything goes well until I tried to compile some fortran90 file  
like the on given in the examples/f90/pi3f90.f90

the err is strange :
/usr/bin/ld: Undefined symbols:
_mpi_init
_mpi_comm_rank
_mpi_comm_size
_mpi_bcast
_mpi_reduce
_mpi_finalize

I tried the mpif90 -show, the result is
f90 -I/usr/local/include -I/usr/local/include -L/usr/local/lib - 
lmpichf90 -lmpichf90 -lpmpich -lmpich

That's what I can do so far. I don't  know whether this is a bug or  
because of some mistake I made during the installation. I also attach  
the config.log 




More information about the mpich2-dev mailing list