[gmx-users] gromacs on powerpc

Martin Siegert siegert at sfu.ca
Mon Aug 15 23:24:55 CEST 2005


Hello Matt,

I configure gromacs on powerpc64 with

gromacs_loc=/usr/local/gromacs
CC=xlc
CXX=xlC
CFLAGS='-q64 -O5 -qarch=auto -qtune=auto -qaltivec'
CXXFLAGS='-q64 -O5 -qarch=auto -qtune=auto -qaltivec'
LDFLAGS='-q64 -L/usr/local/gromacs/lib64 -Wl,-rpath,/usr/local/gromacs/lib64'
export CC CXX CFLAGS CXXFLAGS LDFLAGS
./configure --prefix=$gromacs_loc --exec-prefix=$gromacs_loc --libdir=$gromacs_loc/lib64 --x-libraries=/usr/X11R6/lib64 --enable-shared --enable-ppc-altivec --disable-fortran --disable-mpi --with-x --program-suffix='' --disable-nice --with-xml=no

If you have fftw installed in a non-standard directory (in my case it is
in /usr/local/include and /usr/local/lib64, which xlc searches by default),
you need to add 

CPPFLAGS='-I<fftw_location>/include'
and add
-L<fftw_location>/lib -Wl,-rpath,<fftw_location>/lib
to the LDFLAGS variable.

After running the configure command I need to patch the generated libtool
file:

===========================================================================
--- libtool.orig	2005-07-29 11:26:21.452200688 -0700
+++ libtool	2005-07-29 11:26:52.279135321 -0700
@@ -110,7 +110,7 @@
 reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
 
 # How to pass a linker flag through the compiler.
-wl=""
+wl="-Wl,"
 
 # Object file suffix (normally "o").
 objext="o"
@@ -190,8 +190,8 @@
 old_archive_from_expsyms_cmds=""
 
 # Commands used to build and install a shared archive.
-archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
-archive_expsym_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib"
+archive_cmds="\$CC -qmkshrobj -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
+archive_expsym_cmds="\$CC -qmkshrobj -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib"
 postinstall_cmds=""
 postuninstall_cmds=""
 
@@ -1143,7 +1143,7 @@
     old_convenience=
     deplibs=
     old_deplibs=
-    compiler_flags=
+    compiler_flags='-q64'
     linker_flags=
     dllsearchpath=
     lib_search_path=`pwd`
===========================================================================

In particular, the change of the "wl=..." line is essential. The other
changes are necessary to get shared libraries and 64bit compile to work.

After these changes run "make".
(I still run into other libtool related problems later, but this should
get you going).

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