Re: [AMBER] Compilation problems for amber9/parallel (aka: How to use g77?)

From: Jason Swails <jason.swails.gmail.com>
Date: Wed, 8 Sep 2010 08:49:46 -0400

Hi Frank,

A couple comments posted below:

On Wed, Sep 8, 2010 at 8:37 AM, Frank Thommen <
structures-it.embl-heidelberg.de> wrote:

> Hi,
>
> after using Amber 9 in serial mode, recently the wish to use it in
> parallel mode has come up. Our cluster is running PBS with integrated
> LAM/MPI on CentOS 4.6.
>
> When compiling Amber 9 for parallel execution, I get the following error
> messages:
>
> # make clean
> # setenv MPI_HOME /usr
> # setenv LD_LIBRARY_PATH /usr/lib64:/usr/lib
>

This is dangerous. You've just ripped up LD_LIBRARY_PATH. Furthermore,
these 2 directories should already be addressed in the library search, I
think. In any case, you should at least change this to

setenv LD_LIBRARY_PATH /usr/lib64:/usr/lib:${LD_LIBRARY_PATH} to retain what
you already had there.

The errors below show that the mpi functions can't be found in any library
that's linked to the executable. You'll have to edit the config.h file to
include those libraries.

About g77, it cannot be used to compile amber9, since amber9 is Fortran90
code and requires a Fortran90 compiler to build. Does your system have an
mpif90? What does "mpif90 -show" reveal? If it doesn't, what does "mpif77
-show" reveal? If you have a valid mpif90 in your path, you should edit
config.h and replace all instances of gfortran or g77 with mpif90, since
that compiler should automatically link the required MPI libraries.

Good luck!
Jason


> # ./configure -lam gfortran
> [...]
> # make parallel
> [.. output truncated ..]
> spatial_fft.o(.text+0x2187): In function `__fft__transpose':
> : undefined reference to `mpi_waitall_'
> spatial_fft.o(.text+0x2199): In function `__fft__transpose':
> : undefined reference to `mpi_type_free_'
> spatial_fft.o(.text+0x23e2): In function `__fft__ftranspose':
> : undefined reference to `mpi_type_contiguous_'
> spatial_fft.o(.text+0x23f4): In function `__fft__ftranspose':
> : undefined reference to `mpi_type_commit_'
> spatial_fft.o(.text+0x26dc): In function `__fft__ftranspose':
> : undefined reference to `mpi_irecv_'
> spatial_fft.o(.text+0x2977): In function `__fft__ftranspose':
> : undefined reference to `mpi_isend_'
> spatial_fft.o(.text+0x2bde): In function `__fft__ftranspose':
> : undefined reference to `mpi_waitany_'
> spatial_fft.o(.text+0x2d7b): In function `__fft__ftranspose':
> : undefined reference to `mpi_waitall_'
> spatial_fft.o(.text+0x2da7): In function `__fft__ftranspose':
> : undefined reference to `mpi_type_free_'
> qm_ewald.o(.text+0x4b10): In function `qm_ewald_setup_':
> : undefined reference to `mpi_gather_'
> qm2_load_params_and_allocate.o(.text+0x1ac8a): In function
> `qm2_load_params_and_allocate_':
> : undefined reference to `mpi_allgather_'
> qm2_scf.o(.text+0x25a6): In function `qm2_scf_':
> : undefined reference to `mpi_allreduce_'
> qm2_scf.o(.text+0x286e): In function `qm2_scf_':
> : undefined reference to `mpi_reduce_'
> qm2_scf.o(.text+0x298b): In function `qm2_scf_':
> : undefined reference to `mpi_bcast_'
> force.o(.text+0x1469): In function `force_':
> : undefined reference to `mpi_bcast_'
> force.o(.text+0x1b68): In function `force_':
> : undefined reference to `mpi_bcast_'
> force.o(.text+0x1ba4): In function `force_':
> : undefined reference to `mpi_bcast_'
> force.o(.text+0x1bc6): In function `force_':
> : undefined reference to `mpi_bcast_'
> force.o(.text+0x1beb): more undefined references to `mpi_bcast_' follow
> force.o(.text+0x23d7): In function `force_':
> : undefined reference to `mpi_allgather_'
> force.o(.text+0x2405): In function `force_':
> : undefined reference to `mpi_allgather_'
> collect2: ld returned 1 exit status
> make[1]: *** [sander.MPI] Error 1
> make[1]: Leaving directory `/struct/software/linux/amber-9/src/sander'
> make: *** [parallel] Error 2
> #
>
> (the full output can be seen on http://pastebin.com/smHiJa6f. This is
> the output of a repeated `make parallel`, not of the initial one).
>
> From older postings on this list I understand, that this is due to a
> compiler mismatch between MPI and Amber. BUT: Our MPI installation has
> been compiled using g77 and there is no way to change that. On the
> other hand, Amber 9 doesn't seem to offer a configuration to use g77 as
> compiler.
>
> Does anyone know a workaround for that or did anyone ever compile Amber
> 9 with g77? I could use any hint possible.
>
> Thanks in advance
>
> frank
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>



-- 
Jason M. Swails
Quantum Theory Project,
University of Florida
Ph.D. Graduate Student
352-392-4032
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Wed Sep 08 2010 - 06:00:04 PDT
Custom Search