[gmx-users] compiling gromacs on powerpc64
Martin Siegert
siegert at sfu.ca
Sun Jul 31 00:55:20 CEST 2005
Hi,
I am struggling with the compilation of gromacs-3.2.1 under Linux
(SLES9) on a PowerPC (IBM JS20). Here is as far as I get:
I configure with:
mkdir /usr/local/gromacs-3.2.1
ln -s /usr/local/gromacs-3.2.1 /usr/local/gromacs
CC=xlc
CXX=xlC
CFLAGS='-q64 -O5 -qarch=ppc970 -qaltivec'
LDFLAGS='-q64 -L/usr/local/gromacs/lib64 -Wl,-rpath,/usr/local/gromacs/lib64'
export CC CXX CFLAGS LDFLAGS
./configure --prefix=/usr/local/gromacs-3.2.1 \
--exec-prefix=/usr/local/gromacs-3.2.1 \
--libdir=/usr/local/gromacs-3.2.1/lib64 \
--x-libraries=/usr/X11R6/lib64 \
--enable-shared \
--enable-ppc-altivec \
--disable-mpi \
--with-x \
--program-suffix='' \
--disable-nice
After running configure I must edit the generated "libtool" file to get
anywhere:
- change
wl=""
to
wl="-Wl,"
- change
archive_cmds="\$CC -shared ..."
archive_expsym_cmds="\$CC -shared ..."
to
archive_cmds="\$CC -qmkshrobj -shared ..."
archive_expsym_cmds="\$CC -qmkshrobj -shared ..."
- change
compiler_flags=
to
compiler_flags='-q64'
After those changes "make" still fails with an error:
/bin/sh ../../libtool --mode=link xlc -q64 -O5 -qarch=ppc970 -qaltivec -q64 -L/usr/local/gromacs/lib64 -Wl,-rpath,/usr/local/gromacs/lib64 -o mdrun glaasje.o gctio.o init_sh.o ionize.o do_gct.o relax_sh.o xutils.o md.o mdrun.o genalg.o ../mdlib/libmd.la ../gmxlib/libgmx.la -L/usr/X11R6/lib64 -lnsl -lsrfftw -lsfftw -lm -L/usr/X11R6/lib64 -lXm -lXt -lSM -lICE -lX11
xlc -q64 -O5 -qarch=ppc970 -qaltivec -q64 -Wl,-rpath -Wl,/usr/local/gromacs/lib64 -o .libs/mdrun glaasje.o gctio.o init_sh.o ionize.o do_gct.o relax_sh.o xutils.o md.o mdrun.o genalg.o -L/usr/local/gromacs/lib64 ../mdlib/.libs/libmd.so -L/usr/X11R6/lib64 ../gmxlib/.libs/libgmx.so -lnsl -lsrfftw -lsfftw -lm -lXm -lXt -lSM -lICE -lX11 -Wl,--rpath -Wl,/usr/local/gromacs-3.2.1/lib64
1586-233 (I) Duplicate definition of symbol "_init" ignored.
1586-233 (I) Duplicate definition of symbol "_fini" ignored.
1586-281 (E) A type mismatch was detected for symbol "xvgropen".
1586-281 (E) A type mismatch was detected for symbol "gmx_tx".
make[3]: *** [mdrun] Error 1
make[3]: Leaving directory `/usr/local/src/gromacs-3.2.1/src/kernel'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/gromacs-3.2.1/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/src/gromacs-3.2.1/src'
make: *** [all-recursive] Error 1
At this point I can proceed by (I have no idea whether this "fix" is
correct; the problems I run into later actually indicate that it may not):
mkdir /usr/local/gromacs/lib64
(cd src/mdlib/.libs;cp -a libmd.so* /usr/local/gromacs/lib64)
(cd src/gmxlib/.libs;cp -a libgmx.so* /usr/local/gromacs/lib64)
and then change the line
LDADD = ../mdlib/libmd.la ../gmxlib/libgmx.la
in src/kernel/Makefile
to
LDADD = -lmd -lgmx
and continue to run "make" which then will complete.
I then try to run the d.dppc test case:
grompp -c conf.gro -f grompp.mdp -p topol.top
mdrun -s topol.tpr -nice 0
The grompp command completes fine, but the mdrun command fails with
Fatal error: Can not read file topol.tpr,
this file is from a Gromacs version which is older than 2.0
Make a new one with grompp or use a gro or pdb file, if possible
Thus, mdrun cannot read the topol.tpr file although both are definitely
compiled from the same gromacs-3.2.1 source tree.
It gets really strange when I ran the grompp command on a different platform,
Linux 64-bit Opteron, copied the so-generated topol.tpr file over to the
PPC machine and ran mdrun using that topol.tpr file. That works!
But that really shouldn't work, should it? X86_64 is little endian and
PowerPC is big endian. Thus, is there an endian issue that configure
is not resolving correctly on the PPC platform or what is going wrong here?
I'd appreciate any commends, recommendations, ... I am basically out of
ideas how to fix this.
Thanks for your help in advance!
Cheers,
Martin
--
Martin Siegert
Head, HPC at SFU
WestGrid Site Manager
Academic Computing Services phone: (604) 291-4691
Simon Fraser University fax: (604) 291-4242
Burnaby, British Columbia email: siegert at sfu.ca
Canada V5A 1S6
More information about the gromacs.org_gmx-users
mailing list