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

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

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
Received on Sun Apr 27 2008 - 06:07:35 PDT
Custom Search