Re: [AMBER] undefined reference

From: Lars Skjærven <lars.skjarven.biomed.uib.no>
Date: Tue, 13 Sep 2011 16:03:39 +0200

Ok. thanks.

'mpif90 -show' yields the following.
gfortran -I/usr/include -pthread -L/usr/lib64 -llammpio -llamf77mpi
-lmpi -llam -lutil -ldl

I'm guessing there should be something f90 in there as well?

Jepps - all the obvious stuff have been tripple checked...


On Tue, Sep 13, 2011 at 3:45 PM, David A Case <case.biomaps.rutgers.edu> wrote:
> On Tue, Sep 13, 2011, Lars Skjærven wrote:
>
>> I'm having a rather unsuccessfull attempt to compile amber11 on a IBM
>> cluster. The serial version seems to compile nicely, but my parallel
>> version crashes with a bunch of "undefined reference" messages when
>> trying to compile sander.MPI with mpif90. (see below).
>>
>> Using my own compiled openmpi to compile sander.MPI seems to work
>> fine. However, in that case I'm limited to using only 1 node (8cores)
>> at most. Thus, I have to use the mpif90 version in /usr/bin (in which
>> I have problems with compiling)
>>
>> mpif90 has the following specs:
>>
>> -bash-3.2$ mpif90 -v
>> Using built-in specs.
>> Target: x86_64-redhat-linux
>> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
>> --infodir=/usr/share/info --enable-shared --enable-threads=posix
>> --enable-checking=release --with-system-zlib --enable-__cxa_atexit
>> --disable-libunwind-exceptions --enable-libgcj-multifile
>> --enable-languages=c,c++,objc,obj-c++,java,fortran,ada
>> --enable-java-awt=gtk --disable-dssi --enable-plugin
>> --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre
>> --with-cpu=generic --host=x86_64-redhat-linux
>> Thread model: posix
>> gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)
>>
>>
>> ERROR MSG:
>>
>> mpif90 -o sander.MPI  constants.o state.o memory_module.o stack.o
>> nose_hoover.o nose_hoover_vars.o nose_hoover_init.o qmmm_module.o trace.o
>> lmod.o rand2.o ....... spatial_recip.o spatial_fft.o parms.o
>> softcore.o mbar.o molecule.o
>> qm_mm.o qm_ewald.o qm2_variable_solvent.o qmmm_qmtheorymodule.o \
>>
>> .... [Lots of stuff] ....
>> error messages like:
>> _nose_hoover.f:(.text+0x1219): undefined reference to `mpi_allreduce_'
>> qmmm_module.o: In function `__qmmm_module__qmmm_mpi_setup':
>> _qmmm_module.f:(.text+0x742): undefined reference to `mpi_bcast_'
>> _qmmm_module.f:(.text+0x767): undefined reference to `mpi_bcast_'
>> _qmmm_module.f:(.text+0x78c): undefined reference to `mpi_bcast_'
>> .... [Lots of stuff] ....
>>
>> ... [terminates with this error] ....
>> /home/skjaerve/software/amber11/src/sander/_ncsu-utils.f:256:
>> undefined reference to `mpi_comm_rank_'
>> /home/skjaerve/software/amber11/src/sander/_ncsu-utils.f:259:
>> undefined reference to `mpi_comm_size_'
>> /home/skjaerve/software/amber11/src/sander/_ncsu-utils.f:269:
>> undefined reference to `mpi_recv_'
>> collect2: ld returned 1 exit status
>> mpif90: No such file or directory
>> make[1]: *** [sander.MPI] Error 1
>> make[1]: Leaving directory
>> `/home/skjaerve/software/amber11/src/sander'
>> make: *** [parallel] Error 2
>>
>
> Typing "mpif90 --show" (or something similar, depends on the exact
> distribution) will show what the mpif90 script is doing under the hood.  That
> might offer a clue.  This doesn't look like a problem that has anything to do
> with Amber: you might try compiling a simple test MPI program (e.g. that calls
> mpi_init and mpi_bcast) to see if that works.  Basically, the mpif90 command
> should know how to find mpi_bcast() and friends.
>
> Be sure you did the obvious things: use "which mpif90" to be sure your PATH
> has the correct script; make sure you did a "make clean" before compiling, so
> that nothing is left over from the earlier (successful) MPI compile step.
>
> ...good luck...dac
>
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>

_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Tue Sep 13 2011 - 07:30:04 PDT
Custom Search