Re: AMBER: pmemd: "undefined reference to `mpi_(name-varies)'"

From: Robert Duke <rduke.email.unc.edu>
Date: Thu, 24 Apr 2008 15:45:31 -0400

Great! I don't see a problem with older ifort's as long as it is not one
known to be broken, and the typical symptom for the broken ones is that they
have internal compiler errors and fail to compile (for ia32 I don't
recollect bad results; could be too much garbage has gone through my head in
the interim though...). I am still using ifort 8 all the time. If you want
to do comparative benchmarks and post results, feel free - the single
processor and 2 processor case should show most of the compiler capability
delta's. On test, good that the standard tests pass. I do a much more
extensive set of tests at a range of processor counts and longer runs, and
it is a bear to score (because there are differences at 300 steps with
different architectures, I look at ALL the output files, and you have to
eyeball the diffs carefully) - it can eat up the better part of a day
dinking with one setup, so I try to do half a dozen of the most
representative setups I can think of from 4-128 procs, 40 different tests,
and only right around release; unfortunately this is something I don't have
the bandwidth to expand on, and don't want to clean it up enough for general
use (too much judgement involved; I would have to automate scoring the
diff's somehow). But if gfortran starts getting really close on
performance, I will have to start considering including it somehow.
Regards - Bob

----- Original Message -----
From: "Lachele Foley (Lists)" <lf.list.gmail.com>
To: <amber.scripps.edu>
Sent: Thursday, April 24, 2008 3:16 PM
Subject: Re: AMBER: pmemd: "undefined reference to `mpi_(name-varies)'"


> The combination of replies got me there. Thanks!
>
> What I needed was "-lfmpi"
>
> The ScaMPI was compiled with an older version of ifort. Will that
> cause issues with pmemd? I just ran the tests (pmemd and
> pmemd.AMOEBA), and they all passed. Even if you think there might be
> issues, I'm not sure I'll be able to do anything about it.
>
> Below, for anyone else who has interest, is my linux_p4.ifort.scali
> that works. If "-lfmpi" is added to any line containing "-lmpi" in
> the gfortran version (earlier), parallel pmemd also compiles. If
> anyone is curious, I could compare benchmarks between them...
>
> ===========================================================
>>more linux_p4.ifort.scali
> DIRFRC_DEFINES = -DDIRFRC_COMTRANS -DDIRFRC_EFS
> MPI_DEFINES = -DMPI
> MPI_INCLUDE = -I$(MPI_HOME)/include
> MPI_LIBDIR = $(MPI_HOME)/lib
> MPI_LIBS = -L$(MPI_LIBDIR) -lfmpi -lmpi -Wl -lpthread
>
> CPP = /lib/cpp
> CPPFLAGS = -traditional -P
> F90_DEFINES = -DFFTLOADBAL_2PROC
>
> F90 = ifort
> MODULE_SUFFIX = mod
> F90FLAGS = -c -auto
> F90_OPT_DBG = -g -traceback
> F90_OPT_LO = -tpp7 -O0
> F90_OPT_MED = -tpp7 -O2
> F90_OPT_HI = -tpp7 -xW -ip -O3
> F90_OPT_DFLT = $(F90_OPT_HI)
>
> CC = gcc
> CFLAGS =
>
> LOAD = ifort
> LOADFLAGS =
> LOADLIBS = -limf -lsvml -Wl,-rpath=$(IFORT_RPATH) -lmpi -lfmpi
> ===========================================================
>
>
> On Thu, Apr 24, 2008 at 1:51 PM, Gustavo Seabra
> <gustavo.seabra.gmail.com> wrote:
>> Hi,
>>
>> I did have some problems compiling pmemd in the past, but that was
>> actually related to MKL10.0 (the thread starts here:
>> http://archive.ambermd.org/200802/0221.html).
>> Unfortunately, I have never used Scali MPI myself. However, this
>> question has come up before, and I believe the thread bob was
>> referring to was this one:
>> http://archive.ambermd.org/200703/0376.html
>>
>> HTH,
>> Gustavo.
>>
>>
>>
>> On Thu, Apr 24, 2008 at 11:04 AM, Robert Duke <rduke.email.unc.edu>
>> wrote:
>> > Okay, you need to use the same fortran 90 for both compiling scali and
>> > pmemd, which I presume you are doing, but since you are mucking with
>> > gfortran, and I don't, you are sort of on your own unless you want to
>> use
>> > ifort. Then I believe Gustavo Seabra posted some mail to the
>> reflector
>> > about compiling pmemd with scali? I did a quick search and did not
>> find it,
>> > but I know it is there somewhere; maybe Gustavo will reply. I don't
>> have
>> > access to scali myself, so don't support it. I don't touch gfortran
>> because
>> > the whole point of pmemd is performance (I know it is getting better;
>> still
>> > I would bet on ifort staying ahead of it); all that is probably going
>> on
>> > here is that you either are pointing at the wrong libraries, or the
>> linkage
>> > convention for "name mangling" in the compiler is not correct - and I
>> don't
>> > know what latitude you have on this for gfortran. You can look at the
>> > "undefined reference" form and go looking for exported symbols in the
>> scali
>> > mpi library, first confirming where you can find an exported symbol
>> with
>> > mpi_bcast in it, and then looking at how it is decorated - this can be
>> done
>> > with nm and grep pretty easily. I reiterate, gfortran is untested by
>> me for
>> > both correctness and performance. It could be bad on either score,
>> easily
>> > (or just fine; point is, I don't know, and you are "outside your
>> warranty
>> > here" ;-)).
>> > Regards - Bob
>> > ----- Original Message ----- From: "Lachele Foley (Lists)"
>> > <lf.list.gmail.com>
>> > To: <amber.scripps.edu>
>> > Sent: Thursday, April 24, 2008 10:22 AM
>> > Subject: AMBER: pmemd: "undefined reference to `mpi_(name-varies)'"
>> >
>> >
>> >
>> >
>> >
>> > > I'm trying to compile parallel pmemd for Amber 10. The serial
>> compile
>> > > goes fine.
>> > >
>> > > Short version: At the final stage ("(compiler) -o pmemd
>> > > gbl_constants.o (etc.)"), I get lots (>100) of variations on:
>> > >
>> > > mdin_ctrl_dat.o(.text+0xa456): In function
>> > > `__mdin_ctrl_dat_mod__bcast_mdin_ctrl_dat':
>> > > : undefined reference to `mpi_bcast_'
>> > >
>> > > Can this be made to work for us?
>> > >
>> > > More info:
>> > >
>> > > We have ScaMPI (Scali MPI). I've tried gfortran and ifort.
>> Gfortran
>> > > compiles in serial just fine (and I assume ifort would, too). Both
>> > > have the same mpi issues in the parallel compile. I tried setting
>> > > -fno-second-underscore because that was indicated in the config.h
>> for
>> > > parallel amber, but it didn't change anything. The parallel version
>> > > of Amber 10 compiles and tests fine (with some trivial and unrelated
>> > > exceptions). $MPI_HOME is set to /opt/scali.
>> > >
>> > > Here's the config data file I made for gfortran with ScaMPI. I got
>> a
>> > > file that works with gfortran by starting with the ifort file and
>> > > deleting compiler options until it stopped complaining. I didn't
>> > > delete options from the ifort version when I tried ifort, but it
>> > > behaved the same WRT the mpi calls. If you need more info, just
>> say.
>> > >
>> > >
>> > > > more linux_p4.gfortran.scali
>> > > >
>> > > MPI_DEFINES = -DMPI
>> > > MPI_INCLUDE = -I$(MPI_HOME)/include
>> > > MPI_LIBDIR = $(MPI_HOME)/lib
>> > > MPI_LIBS = -L$(MPI_LIBDIR) -lmpi -Wl -lpthread
>> > >
>> > > DIRFRC_DEFINES = -DDIRFRC_COMTRANS -DDIRFRC_EFS
>> > > CPP = /lib/cpp
>> > > CPPFLAGS = -traditional -P
>> > > F90_DEFINES = -DFFTLOADBAL_2PROC
>> > >
>> > > F90 = gfortran
>> > > MODULE_SUFFIX = mod
>> > > F90FLAGS = -c -fno-second-underscore
>> > > F90_OPT_DBG = -g -traceback
>> > > F90_OPT_LO = -O0
>> > > F90_OPT_MED = -O2
>> > > F90_OPT_HI = -ip -O3
>> > > F90_OPT_DFLT = $(F90_OPT_HI)
>> > >
>> > > CC = gcc
>> > > CFLAGS =
>> > >
>> > > LOAD = gfortran
>> > > LOADFLAGS =
>> > > LOADLIBS = -lmpi -Wl
>> > >
>> > >
>> > > Thanks!
>> > > --
>> > > :-) Lachele
>> > > Lachele Foley
>> > > CCRC/UGA
>> > > 2-0263
>> >
>> > -----------------------------------------------------------------------
>> > > The AMBER Mail Reflector
>> > > To post, send mail to amber.scripps.edu
>> > > To unsubscribe, send "unsubscribe amber" to majordomo.scripps.edu
>> > >
>> > >
>> >
>>
>> > -----------------------------------------------------------------------
>> > The AMBER Mail Reflector
>> > To post, send mail to amber.scripps.edu
>> > To unsubscribe, send "unsubscribe amber" to majordomo.scripps.edu
>> >
>> -----------------------------------------------------------------------
>> The AMBER Mail Reflector
>> To post, send mail to amber.scripps.edu
>> To unsubscribe, send "unsubscribe amber" to majordomo.scripps.edu
>>
>
>
>
> --
> :-) Lachele
> Lachele Foley
> CCRC/UGA
> 2-0263
> -----------------------------------------------------------------------
> The AMBER Mail Reflector
> To post, send mail to amber.scripps.edu
> To unsubscribe, send "unsubscribe amber" to majordomo.scripps.edu
>

-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber.scripps.edu
To unsubscribe, send "unsubscribe amber" to majordomo.scripps.edu
Received on Sun Apr 27 2008 - 06:07:40 PDT
Custom Search