[gmx-users] building GROMACS 4.5.4 on Power6 with CMAKE
Marcin Zielinski
Marcin.Zielinski at sara.nl
Thu Sep 8 17:46:13 CEST 2011
Hi there,
I've been having hard times the past days trying to build SP and DP binaries
of GROMACS 4.5.4 on our Power6 system, here at SARA, using IBM XL compilers,
LAPACK, BLAS, GSL and FFTW3.
At the end, I think I've succeeded and had to use two dirty hacks to
avoid problems.
I'm waiting now for results confirmation from friend of mine.
First thing, small patch to cmake/FindLAPACK.cmake
- set(CMAKE_REQUIRED_LIBRARIES ${_flags} "-Wl,--start-group
${${LIBRARIES}} ${_blas};-Wl,--end-group" ${_threads})
+ set(CMAKE_REQUIRED_LIBRARIES ${_flags} "-Wl,--start-group
${${LIBRARIES}} ${_blas} -Wl,--end-group" ${_threads})
(Note the removed semicolon. )
Create Your build directory, I had source dir and build dir in the same
root dir.
Second thing, before issuing make (and after cmake) modify src/config.h
inside Your build directory:
line 45: remove ## _ (should look like this: #define F77_FUNC(name,NAME)
name)
line 48: remove ## _ (should look like this: #define
F77_FUNC_(name,NAME) name)
After that, cmake command, for sp and tools only:
module load lapack fftw3/3.2.2 gsl/1.15 cmake
cmake \
-DFFTW3F_INCLUDE_DIR=<path to fftw3>/include \
-DFFTW3F_LIBRARIES=<path to fftw3>/lib/libfftw3f.a \
-DGMX_EXTERNAL_BLAS=ON \
-DBLAS_LIBRARIES=<path to gsl>/lib/libgslcblas.so \
-DGMX_EXTERNAL_LAPACK=ON \
-DLAPACK_LIBRARIES=<path to lapack>/lib/liblapack.a \
-DGMX_GSL=ON \
-DCMAKE_INSTALL_PREFIX=<install dir>/gromacs/4.5.4-sp \
-DGMX_X11=OFF \
-DCMAKE_CXX_COMPILER=mpCC \
-DCMAKE_CXX_FLAGS="-V -q64 -O3 -qarch=pwr6 -qtune=pwr6 -qomp
-qessl" \
-DCMAKE_CXX_FLAGS_RELEASE="-V -q64 -O3 -qarch=pwr6 -qtune=pwr6
-qomp -qessl" \
-DCMAKE_C_COMPILER=mpcc \
-DCMAKE_C_FLAGS="-V -q64 -O3 -qarch=pwr6 -qtune=pwr6 -qomp -qessl" \
-DCMAKE_C_FLAGS_RELEASE="-V -q64 -O3 -qarch=pwr6 -qtune=pwr6
-qomp -qessl" \
-DCMAKE_F77_COMPILER=mpfort \
-DCMAKE_F77_FLAGS="-V -q64 -O3 -qarch=pwr6 -qtune=pwr6 -qomp
-qessl" \
-DCMAKE_F77_FLAGS_RELEASE="-V -q64 -O3 -qarch=pwr6 -qtune=pwr6
-qomp -qessl" \
-DCMAKE_EXE_LINKER_FLAGS="-L<path to fftw3>/lib -L/usr/lib64
-L<path to gsl>/lib -L/opt/ibmcmp/xlsmp/1.8/lib64
-L/sara/sw/lapack/3.3.1-xlf12/lib -L/opt/ibmcmp/xlf/12.1/lib64 -llapack
-lgslcblas -lgsl -lesslsmp -lxlf90_r -lxlsmp -lxlfmath -lxlomp_ser " \
-DCMAKE_SHARED_LINKER_FLAGS="-L<path to fftw3>/lib -L/usr/lib64
-L<path to gsl>/lib -L<path to xlf>/xlsmp/1.8/lib64 -L<path to
lapack>/lib -L<path to xlf>/xlf/12.1/lib64 -llapack -lgslcblas -lgsl
-lesslsmp -lxlf90_r -lxlsmp -lxlfmath -lxlomp_ser" \
-DCMAKE_MODULE_LINKER_FLAGS="-L<path to fftw3>/lib -L/usr/lib64
-L<path to gsl>/lib -L<path to xlf>/xlsmp/1.8/lib64 -L<path to
lapack>/lib -L<path to xlf>/xlf/12.1/lib64 -llapack -lgslcblas -lgsl
-lesslsmp -lxlf90_r -lxlsmp -lxlfmath -lxlomp_ser" \
-DGMX_MPI=OFF \
../gromacs-4.5.4
From here, there's a straight way for a parallel build for mdrun and
same goes for double precision.
Hope this is going to help to anyone having similar problems as I did.
good luck,
--
Marcin Zielinski
Supercomputing group, OSD
SARA
Science Park 140 mob +31 (0)65 123 5602
1098 XG Amsterdam tel +31 (0)20 888 4074
www.sara.nl fax +31 (0)20 668 3167
marcin.zielinski at sara.nl
More information about the gromacs.org_gmx-users
mailing list