Re: [gmx-users] building GROMACS 4.5.4 on Power6 with CMAKE
Hi, On 9/13/11 4:27 PM, Mark Abraham wrote: On 14/09/2011 12:20 AM, Marcin Zielinski wrote: Ok, Using -DGMX_ACCELERATION=Power6 brings a plethora of new errors during the compilation. Firstly, including config.h inside the fortran .F kernel files for power6 is causing problems with their parsing using xlf. adding -WF,-qfpp didn't help. Had to provide a modified xlf.cfg config file for XLF (cppoptions = -P, instead of -C) and pass it on with -F option and then add -qarch=pwr6 (all passed manually) for compilation of each power6 kernel .F file. That fixed the problem with the compilation of Power6 kernels part. Is there any more handy way of doing that? I've noticed that upon using Power6, cmake generates Fortran_DEFINES and Fortran_FLAGS inside src/gmxlib/CMakeFiles/gmx.dir/flags.make file. They somehow can not be modified from the command line. Same goes for the preprocessor flags. (-DCMAKE_CPP_FLAGS do not work?). You can also modify flags by editing CMakeCache.txt and rerunning cmake - if you don't pass options it should preserve what's been already found in the cache file. Secondly, now I get something else: Linking C shared library libmd.so xlc: 1501-218 (W) file ../gmxlib/libgmx.so.6 contains an incorrect file suffix ../gmxlib/libgmx.so.6: In function `__bss_start': (*ABS*+0x1025cb00): multiple definition of `_edata' ../gmxlib/libgmx.so.6: In function `__data_start': (.data+0x8): multiple definition of `__dso_handle' /usr/lib64/gcc/powerpc64-suse-linux/4.3/crtbeginS.o:(.data.rel+0x0): first defined here ../gmxlib/libgmx.so.6: In function `_fini': (.opd+0x30): multiple definition of `_fini' /usr/lib64/gcc/powerpc64-suse-linux/4.3/../../../../lib64/crti.o:initfini.c:(.opd+0x18): first defined here ../gmxlib/libgmx.so.6: In function `_init': (.opd+0x18): multiple definition of `_init' /usr/lib64/gcc/powerpc64-suse-linux/4.3/../../../../lib64/crti.o:initfini.c:(.opd+0x0): first defined here ../gmxlib/libgmx.so.6: In function `_end': (*ABS*+0x10268b20): multiple definition of `_end' ../gmxlib/libgmx.so.6: In function `__bss_start': (*ABS*+0x1025cb00): multiple definition of `__bss_start' /usr/lib64/gcc/powerpc64-suse-linux/4.3/crtendS.o:(.dtors+0x0): multiple definition of `__DTOR_END__' ../gmxlib/libgmx.so.6:(.dtors+0x8): first defined here /usr/bin/ld: error in ../gmxlib/libgmx.so.6(.eh_frame); no .eh_frame_hdr table will be created. make[2]: *** [src/mdlib/libmd.so.6] Error 1 make[1]: *** [src/mdlib/CMakeFiles/md.dir/all] Error 2 make: *** [all] Error 2 Beats me, sorry. me too :( Rossen Mark -- gmx-users mailing listgmx-users@gromacs.org http://lists.gromacs.org/mailman/listinfo/gmx-users Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/Search before posting! Please don't post (un)subscribe requests to the list. Use the www interface or send it to gmx-users-requ...@gromacs.org. Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
Re: [gmx-users] building GROMACS 4.5.4 on Power6 with CMAKE
Hi, I have not followed the entire discussion so I might be completely wrong, I might be fill in some gaps. Firstly, including config.h inside the fortran .F kernel files for power6 is causing problems with their parsing using xlf. adding -WF,-qfpp didn't help. Had to provide a modified xlf.cfg config file for XLF (cppoptions = -P, instead of -C) and pass it on with -F option and then add -qarch=pwr6 (all passed manually) for compilation of each power6 kernel .F file. That fixed the problem with the compilation of Power6 kernels part. Is there any more handy way of doing that? I've noticed that upon using Power6, cmake generates Fortran_DEFINES and Fortran_FLAGS inside src/gmxlib/CMakeFiles/gmx.dir/flags.make file. They somehow can not be modified from the command line. Same goes for the preprocessor flags. (-DCMAKE_CPP_FLAGS do not work?). If you want to pass *global* flags to the the C++ compiler you can do that through CMAKE_CXX_FLAGS variable (note: CXX not CPP!). However, if you happen to need flags only for certain files or internal libraries, it's slightly more tricky; it requires the file/target property COMPILE_FLAGS to be modified fron inside the CMake scripts. Secondly, now I get something else: Linking C shared library libmd.so xlc: 1501-218 (W) file ../gmxlib/libgmx.so.6 contains an incorrect file suffix ../gmxlib/libgmx.so.6: In function `__bss_start': (*ABS*+0x1025cb00): multiple definition of `_edata' ../gmxlib/libgmx.so.6: In function `__data_start': (.data+0x8): multiple definition of `__dso_handle' /usr/lib64/gcc/powerpc64-suse-linux/4.3/crtbeginS.o:(.data.rel+0x0): first defined here ../gmxlib/libgmx.so.6: In function `_fini': (.opd+0x30): multiple definition of `_fini' /usr/lib64/gcc/powerpc64-suse-linux/4.3/../../../../lib64/crti.o:initfini.c:(.opd+0x18): first defined here ../gmxlib/libgmx.so.6: In function `_init': (.opd+0x18): multiple definition of `_init' /usr/lib64/gcc/powerpc64-suse-linux/4.3/../../../../lib64/crti.o:initfini.c:(.opd+0x0): first defined here ../gmxlib/libgmx.so.6: In function `_end': (*ABS*+0x10268b20): multiple definition of `_end' ../gmxlib/libgmx.so.6: In function `__bss_start': (*ABS*+0x1025cb00): multiple definition of `__bss_start' /usr/lib64/gcc/powerpc64-suse-linux/4.3/crtendS.o:(.dtors+0x0): multiple definition of `__DTOR_END__' ../gmxlib/libgmx.so.6:(.dtors+0x8): first defined here /usr/bin/ld: error in ../gmxlib/libgmx.so.6(.eh_frame); no .eh_frame_hdr table will be created. make[2]: *** [src/mdlib/libmd.so.6] Error 1 make[1]: *** [src/mdlib/CMakeFiles/md.dir/all] Error 2 make: *** [all] Error 2 That unfortunately looks like a nasty symbol multiple definition issue. My guess is that the symbols xlc is complaining about are defined in libgmx.so.6 and when the linker tries to do the final linking stage it ends up choking due to conflicts with symbols is some library where the respective symbols are defined (or in fact originate from). AFAIK this could happen when one provides a linker option -lsomething to a compile-only command iso a [compile+] link command: $ g++ -c foo.cpp -o foo.o -lbar $ g++ foo.o -o foobar Let me know if this makes sense, you could look at the verbose make output (make VERBOSE=1) and maybe you notice something like this. Cheers, -- Szilárd cheers, -- gmx-users mailing list gmx-users@gromacs.org http://lists.gromacs.org/mailman/listinfo/gmx-users Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/Search before posting! Please don't post (un)subscribe requests to the list. Use the www interface or send it to gmx-users-requ...@gromacs.org. Can't post? Read http://www.gromacs.org/Support/Mailing_Lists -- gmx-users mailing listgmx-users@gromacs.org http://lists.gromacs.org/mailman/listinfo/gmx-users Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/Search before posting! Please don't post (un)subscribe requests to the list. Use the www interface or send it to gmx-users-requ...@gromacs.org. Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
[gmx-users] building GROMACS 4.5.4 on Power6 with CMAKE
Hi Mark, I can confirm that the fix works. Setting -DGMX_ACCELERATION=Power6 sets to these /* Define to a macro mangling the given C identifier (in lower and upper case), which must not contain underscores, for linking with Fortran. */ #define F77_FUNC(name,NAME) name /* As F77_FUNC, but for C identifiers containing underscores. */ #define F77_FUNC_(name,NAME) name which do not gives the mentioned error. regards, PS: I'll report back if I find something else. -- gmx-users mailing listgmx-users@gromacs.org http://lists.gromacs.org/mailman/listinfo/gmx-users Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/Search before posting! Please don't post (un)subscribe requests to the list. Use the www interface or send it to gmx-users-requ...@gromacs.org. Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
[gmx-users] building GROMACS 4.5.4 on Power6 with CMAKE
Ok, Using -DGMX_ACCELERATION=Power6 brings a plethora of new errors during the compilation. Firstly, including config.h inside the fortran .F kernel files for power6 is causing problems with their parsing using xlf. adding -WF,-qfpp didn't help. Had to provide a modified xlf.cfg config file for XLF (cppoptions = -P, instead of -C) and pass it on with -F option and then add -qarch=pwr6 (all passed manually) for compilation of each power6 kernel .F file. That fixed the problem with the compilation of Power6 kernels part. Is there any more handy way of doing that? I've noticed that upon using Power6, cmake generates Fortran_DEFINES and Fortran_FLAGS inside src/gmxlib/CMakeFiles/gmx.dir/flags.make file. They somehow can not be modified from the command line. Same goes for the preprocessor flags. (-DCMAKE_CPP_FLAGS do not work?). Secondly, now I get something else: Linking C shared library libmd.so xlc: 1501-218 (W) file ../gmxlib/libgmx.so.6 contains an incorrect file suffix ../gmxlib/libgmx.so.6: In function `__bss_start': (*ABS*+0x1025cb00): multiple definition of `_edata' ../gmxlib/libgmx.so.6: In function `__data_start': (.data+0x8): multiple definition of `__dso_handle' /usr/lib64/gcc/powerpc64-suse-linux/4.3/crtbeginS.o:(.data.rel+0x0): first defined here ../gmxlib/libgmx.so.6: In function `_fini': (.opd+0x30): multiple definition of `_fini' /usr/lib64/gcc/powerpc64-suse-linux/4.3/../../../../lib64/crti.o:initfini.c:(.opd+0x18): first defined here ../gmxlib/libgmx.so.6: In function `_init': (.opd+0x18): multiple definition of `_init' /usr/lib64/gcc/powerpc64-suse-linux/4.3/../../../../lib64/crti.o:initfini.c:(.opd+0x0): first defined here ../gmxlib/libgmx.so.6: In function `_end': (*ABS*+0x10268b20): multiple definition of `_end' ../gmxlib/libgmx.so.6: In function `__bss_start': (*ABS*+0x1025cb00): multiple definition of `__bss_start' /usr/lib64/gcc/powerpc64-suse-linux/4.3/crtendS.o:(.dtors+0x0): multiple definition of `__DTOR_END__' ../gmxlib/libgmx.so.6:(.dtors+0x8): first defined here /usr/bin/ld: error in ../gmxlib/libgmx.so.6(.eh_frame); no .eh_frame_hdr table will be created. make[2]: *** [src/mdlib/libmd.so.6] Error 1 make[1]: *** [src/mdlib/CMakeFiles/md.dir/all] Error 2 make: *** [all] Error 2 cheers, -- gmx-users mailing listgmx-users@gromacs.org http://lists.gromacs.org/mailman/listinfo/gmx-users Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/Search before posting! Please don't post (un)subscribe requests to the list. Use the www interface or send it to gmx-users-requ...@gromacs.org. Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
Re: [gmx-users] building GROMACS 4.5.4 on Power6 with CMAKE
On 14/09/2011 12:20 AM, Marcin Zielinski wrote: Ok, Using -DGMX_ACCELERATION=Power6 brings a plethora of new errors during the compilation. Firstly, including config.h inside the fortran .F kernel files for power6 is causing problems with their parsing using xlf. adding -WF,-qfpp didn't help. Had to provide a modified xlf.cfg config file for XLF (cppoptions = -P, instead of -C) and pass it on with -F option and then add -qarch=pwr6 (all passed manually) for compilation of each power6 kernel .F file. That fixed the problem with the compilation of Power6 kernels part. Is there any more handy way of doing that? I've noticed that upon using Power6, cmake generates Fortran_DEFINES and Fortran_FLAGS inside src/gmxlib/CMakeFiles/gmx.dir/flags.make file. They somehow can not be modified from the command line. Same goes for the preprocessor flags. (-DCMAKE_CPP_FLAGS do not work?). Secondly, now I get something else: Linking C shared library libmd.so xlc: 1501-218 (W) file ../gmxlib/libgmx.so.6 contains an incorrect file suffix ../gmxlib/libgmx.so.6: In function `__bss_start': (*ABS*+0x1025cb00): multiple definition of `_edata' ../gmxlib/libgmx.so.6: In function `__data_start': (.data+0x8): multiple definition of `__dso_handle' /usr/lib64/gcc/powerpc64-suse-linux/4.3/crtbeginS.o:(.data.rel+0x0): first defined here ../gmxlib/libgmx.so.6: In function `_fini': (.opd+0x30): multiple definition of `_fini' /usr/lib64/gcc/powerpc64-suse-linux/4.3/../../../../lib64/crti.o:initfini.c:(.opd+0x18): first defined here ../gmxlib/libgmx.so.6: In function `_init': (.opd+0x18): multiple definition of `_init' /usr/lib64/gcc/powerpc64-suse-linux/4.3/../../../../lib64/crti.o:initfini.c:(.opd+0x0): first defined here ../gmxlib/libgmx.so.6: In function `_end': (*ABS*+0x10268b20): multiple definition of `_end' ../gmxlib/libgmx.so.6: In function `__bss_start': (*ABS*+0x1025cb00): multiple definition of `__bss_start' /usr/lib64/gcc/powerpc64-suse-linux/4.3/crtendS.o:(.dtors+0x0): multiple definition of `__DTOR_END__' ../gmxlib/libgmx.so.6:(.dtors+0x8): first defined here /usr/bin/ld: error in ../gmxlib/libgmx.so.6(.eh_frame); no .eh_frame_hdr table will be created. make[2]: *** [src/mdlib/libmd.so.6] Error 1 make[1]: *** [src/mdlib/CMakeFiles/md.dir/all] Error 2 make: *** [all] Error 2 Beats me, sorry. Mark -- gmx-users mailing listgmx-users@gromacs.org http://lists.gromacs.org/mailman/listinfo/gmx-users Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/Search before posting! Please don't post (un)subscribe requests to the list. Use the www interface or send it to gmx-users-requ...@gromacs.org. Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
Re: [gmx-users] building GROMACS 4.5.4 on Power6 with CMAKE
On 9/09/2011 1:46 AM, Marcin Zielinski wrote: 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. ) Thanks. Fixed for next version. 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) If you set GMX_ACCELERATION=POWER6 this (and a few other things) should happen automatically. Mark 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=-Lpath to fftw3/lib -L/usr/lib64 -Lpath 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=-Lpath to fftw3/lib -L/usr/lib64 -Lpath to gsl/lib -Lpath to xlf/xlsmp/1.8/lib64 -Lpath to lapack/lib -Lpath to xlf/xlf/12.1/lib64 -llapack -lgslcblas -lgsl -lesslsmp -lxlf90_r -lxlsmp -lxlfmath -lxlomp_ser \ -DCMAKE_MODULE_LINKER_FLAGS=-Lpath to fftw3/lib -L/usr/lib64 -Lpath to gsl/lib -Lpath to xlf/xlsmp/1.8/lib64 -Lpath to lapack/lib -Lpath 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, -- gmx-users mailing listgmx-users@gromacs.org http://lists.gromacs.org/mailman/listinfo/gmx-users Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/Search before posting! Please don't post (un)subscribe requests to the list. Use the www interface or send it to gmx-users-requ...@gromacs.org. Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
[gmx-users] building GROMACS 4.5.4 on Power6 with CMAKE
Hi Mark, Yes, GMX_ACCELERATION should do the trick, however it requires You to turn off the THREADS. Altho ppl tend to run the tools in serial anyway, I somehow sticked to that. As for the FindLAPACK.cmake fix, I'm pretty sure I has been posted here some time ago. I googled it anyhow. Would be handy If I could put my hands on some benchmarking suit so that I could test this given setup on my own and compare it to the build with POWER6 included (and without THREADS). Should I see some boost in the speed in execution time? best regards, -- Marcin Zielinski Supercomputing group, OSD SARA -- gmx-users mailing listgmx-users@gromacs.org http://lists.gromacs.org/mailman/listinfo/gmx-users Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/Search before posting! Please don't post (un)subscribe requests to the list. Use the www interface or send it to gmx-users-requ...@gromacs.org. Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
Re: [gmx-users] building GROMACS 4.5.4 on Power6 with CMAKE
On 9/09/2011 5:50 PM, Marcin Zielinski wrote: Hi Mark, Yes, GMX_ACCELERATION should do the trick, however it requires You to turn off the THREADS. Altho ppl tend to run the tools in serial anyway, I somehow sticked to that. Only mdrun takes advantage of parallelism in GROMACS up to now. So the non-threads requirement is moot for a build focused on the tools. As for the FindLAPACK.cmake fix, I'm pretty sure I has been posted here some time ago. I googled it anyhow. Would be handy If I could put my hands on some benchmarking suit so that I could test this given setup on my own and compare it to the build with POWER6 included (and without THREADS). Should I see some boost in the speed in execution time? Probably nothing much. There is no up-to-date benchmark suite. Mark -- gmx-users mailing listgmx-users@gromacs.org http://lists.gromacs.org/mailman/listinfo/gmx-users Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/Search before posting! Please don't post (un)subscribe requests to the list. Use the www interface or send it to gmx-users-requ...@gromacs.org. Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
[gmx-users] building GROMACS 4.5.4 on Power6 with CMAKE
Ok, giving -DGMX_ACCELERATE=Power6 results with: src/config.h /* Define to a macro mangling the given C identifier (in lower and upper case), which must not contain underscores, for linking with Fortran. */ #define F77_FUNC(name,NAME) name ## /* As F77_FUNC, but for C identifiers containing underscores. */ #define F77_FUNC_(name,NAME) name ## which, after issuing make, results with an error message at the very beginning: /home/grmcs454/gromacsdir/test-build/src/config.h, line 45.39: 1506-210 (S) The ## operator requires two operands. /home/grmcs454/gromacsdir/test-build/src/config.h, line 48.39: 1506-210 (S) The ## operator requires two operands. I checked cmake/CMakeLists.txt and '##' are put explicitly therefor they will be present with _ afterwards or without it, thus giving this error every time You put Power6 or Fortran option on. As far as I understand. Only mdrun takes advantage of parallelism in GROMACS up to now. So the non-threads requirement is moot for a build focused on the tools. -- gmx-users mailing listgmx-users@gromacs.org http://lists.gromacs.org/mailman/listinfo/gmx-users Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/Search before posting! Please don't post (un)subscribe requests to the list. Use the www interface or send it to gmx-users-requ...@gromacs.org. Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
Re: [gmx-users] building GROMACS 4.5.4 on Power6 with CMAKE
On 9/09/2011 10:01 PM, Marcin Zielinski wrote: Ok, giving -DGMX_ACCELERATE=Power6 results with: src/config.h /* Define to a macro mangling the given C identifier (in lower and upper case), which must not contain underscores, for linking with Fortran. */ #define F77_FUNC(name,NAME) name ## /* As F77_FUNC, but for C identifiers containing underscores. */ #define F77_FUNC_(name,NAME) name ## which, after issuing make, results with an error message at the very beginning: /home/grmcs454/gromacsdir/test-build/src/config.h, line 45.39: 1506-210 (S) The ## operator requires two operands. /home/grmcs454/gromacsdir/test-build/src/config.h, line 48.39: 1506-210 (S) The ## operator requires two operands. I checked cmake/CMakeLists.txt and '##' are put explicitly therefor they will be present with _ afterwards or without it, thus giving this error every time You put Power6 or Fortran option on. As far as I understand. They make sense if $suffix is non-empty, but it can be empty, so it looks like someone didn't code this right. If the patch below works, let me know and I'll fix the source version. Mark diff --git a/CMakeLists.txt b/CMakeLists.txt index f26734d..a59a1de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -636,13 +636,24 @@ if(GMX_FORTRAN OR GMX_POWER6) if(prefix) set(prefix ${prefix} ##) endif(prefix) +if(suffix) + set(suffix ## ${suffix}) + if(extrasuffix) + set(extrasuffix ${suffix}${extrasuffix}) + endif(extrasuffix) +else(suffix) + if(extrasuffix) + # Don't know if this is needed, but it can't hurt + set(extrasuffix ## ${extrasuffix}) + endif(extrasuffix) +endif(suffix) if(isupper) -set(F77_FUNCDEF ${prefix} NAME ## ${suffix}) -set(F77_FUNCDEF_ ${prefix} NAME ## ${suffix}${extrasuffix}) +set(F77_FUNCDEF ${prefix} NAME ${suffix}) +set(F77_FUNCDEF_ ${prefix} NAME ${extrasuffix}) else(isupper) -set(F77_FUNCDEF ${prefix} name ## ${suffix}) -set(F77_FUNCDEF_ ${prefix} name ## ${suffix}${extrasuffix}) +set(F77_FUNCDEF ${prefix} name ${suffix}) +set(F77_FUNCDEF_ ${prefix} name ${extrasuffix}) endif(isupper) else(GMX_FORTRAN OR GMX_POWER6) set(F77_FUNCDEF name ## _) -- gmx-users mailing listgmx-users@gromacs.org http://lists.gromacs.org/mailman/listinfo/gmx-users Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/Search before posting! Please don't post (un)subscribe requests to the list. Use the www interface or send it to gmx-users-requ...@gromacs.org. Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
[gmx-users] building GROMACS 4.5.4 on Power6 with CMAKE
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=-Lpath to fftw3/lib -L/usr/lib64 -Lpath 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=-Lpath to fftw3/lib -L/usr/lib64 -Lpath to gsl/lib -Lpath to xlf/xlsmp/1.8/lib64 -Lpath to lapack/lib -Lpath to xlf/xlf/12.1/lib64 -llapack -lgslcblas -lgsl -lesslsmp -lxlf90_r -lxlsmp -lxlfmath -lxlomp_ser \ -DCMAKE_MODULE_LINKER_FLAGS=-Lpath to fftw3/lib -L/usr/lib64 -Lpath to gsl/lib -Lpath to xlf/xlsmp/1.8/lib64 -Lpath to lapack/lib -Lpath 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.nlfax +31 (0)20 668 3167 marcin.zielin...@sara.nl -- gmx-users mailing listgmx-users@gromacs.org http://lists.gromacs.org/mailman/listinfo/gmx-users Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/Search before posting! Please don't post (un)subscribe requests to the list. Use the www interface or send it to gmx-users-requ...@gromacs.org. Can't post? Read http://www.gromacs.org/Support/Mailing_Lists