LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2004-09-10 17:58:06


On Sep 10, 2004, at 6:31 PM, damien_at_[hidden] wrote:

> aren't those mpi compilers the ones configured for MPICH out of Argonne
> Labs? I ran a setup like that on MPICH before I switched to LAM (small
> plug for Jeff & co. here: LAM ROCKS. Oh, that's bad...) It might be
> as
> simple as making sure you're using the LAM version of mpiCC.

Thanks! :-)

I think Damien is right about using the right compiler -- see below.

>> I have just downloaded and configured LAM/MPI, and all seemed to go
>> well
>> for the configure, make, amd make install, there were no errors with
>> any
>> of them. However I am using MPI to run an atmospheric model and when
>> I
>> attempted to configure the model and to link the MPI library using
>> pgf90, I got the following error messages (for a lot more files than
>> I've pasted below):
>>
>> -----------------------------------------------------------
>> : undefined reference to `lam_mkpt'
>> /home/ccm33/MPI/lib/libmpi.a(ssi_coll_lam_basic_scan.o)(.text+0x31):
>> In
>> function `lam_ssi_coll_lam_basic_scan':
[snipped]
>> ----------------------------------------------------------
>>
>> I am pretty sure that this is some underscore/double underscore
>> misunderstanding, however I am not sure how to fix it. I am using
>> pgf90, pgf77, mpicc-mpich and mpiCC-mpich compilers on an intel linux
>> cluster, and I built the MPI library using pgf90.

It does not look like you are having underscore issues -- the functions
that are cited as missing are not fortran functions; they are internal
to LAM.

You probably should not be using mpicc-mpich and mpiCC-mpich -- they
will probably link in the wrong libraries (and potentially even grab
the wrong mpi.h). What *looks* like is happening is that you are
somehow not linking in all of LAM's libraries. You can't, for example,
just "pgf90 myapp.f -lmpi". You really should use LAM's mpif77 (and
override the back-end compiler to use pgf90 instead of pgf77) because
LAM silently adds in a few more flags to the compile line (we have some
support libraries, etc.).

So I'm guessing that you want to do something like (I'm a tcsh kind of
guy):

setenv LAMHF77 pgf90
mpif77 myapp.f

If you configured LAM with pgf90 to begin with (from your text above,
you might have done just that), then setting LAMHF77 isn't necessary.
You can verify what the default compiler is by running "mpif77
-showme". Check out the mpif77(1) man page for details.

Hope this helps.

-- 
{+} Jeff Squyres
{+} jsquyres_at_[hidden]
{+} http://www.lam-mpi.org/