[gmx-users] MPI compilation without shared FFTW libraries
Hans Martin Senn
senn at chem.gla.ac.uk
Wed Feb 27 21:36:01 CET 2008
I am trying to compile a parallel executable of GROMACS using gcc and
the SCore MPI implementation on a Linux/Opteron cluster.
(Essentially, SCore is a highly efficient MPICH incarnation that
circumvents the TCP/IP stack; see: http://www.pccluster.org/.)
SCore MPI requires linking to some extra libraries that exist only as
static libraries. Hence, compiling GROMACS with --enable-shared fails
with the expected complaints along the lines of "relocation
R_X86_64_32 against `a local symbol' can not be used when making a
shared object; recompile with -fPIC".
So I switched to --disable-shared to make a static executable.
However, this fails as well because the GROMACS build procedure still
tries to link explicitly to the shared version of the FFTW libraries
mpicc -O3 -fomit-frame-pointer -finline-functions -Wall -Wno-unused -
funroll-all-loops -o mdrun glaasje.o gctio.o init_sh.o ionize.o
do_gct.o relax_sh.o repl_ex.o xutils.o compute_io.o md.o mdrun.o
genalg.o -L/usr/local/lib ../mdlib/.libs/libmd_d.a -L/usr/X11R6/
lib64 ../gmxlib/.libs/libgmx_d.a -lnsl /usr/local/lib/libfftw3.so -
lm /usr/X11R6/lib64/libXm.so -lXmu -lXext -lXp -lXt -lSM -lICE -lX11
Of course, the linker falls over, complaining that:
ld: attempted static link of dynamic object `/usr/local/lib/libfftw3.so'
So my question is if and how I can convince the make procedure to use
the static version of the FFTW library, which is available on the
Maybe somebody could also comment on why the FFTW lib needs to be
linked against explicitly at all, rather than using -lfftw3 and
letting the linker figure out whether to use the static or the shared
Any hints would be greatly appreciated!
Dr. Hans Martin Senn
Lord Kelvin/Adam Smith Research Fellow
University of Glasgow
Department of Chemistry
Joseph Black Building, University Avenue, Glasgow G12 8QQ, Scotland/UK
E-mail: senn at chem.gla.ac.uk, phone: +44 141 330 6574, fax: +44 141
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2421 bytes
Desc: not available
More information about the gromacs.org_gmx-users