gromacs 安装centos 7 自带的4.8.5编译器是一个刚好支持c++11的编译器,如果感觉不爽可以升级个高点儿的版本,但是这一步应该是非必须的(主要是我没钱买icc)。
参考:[url=%20https://www.softwarecollections. ... cl/devtoolset-8/%20]Developer Toolset 8 by Software Collections[/url]$ sudo yum install centos-release-scl
$ sudo yum install devtoolset-8
$ source /opt/rh/devtoolset-8/enable #生效
# 加入bashrc中
$ echo >>$HOME/.bashrc <<'EOF'
source /opt/rh/devtoolset-8/enable
EOF
$ gcc --version
gcc (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3)
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.安装cmake$ sudo yum install epel-release -y
$ yum search cmake3
$ yum info cmake3
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.tuna.tsinghua.edu.cn
* centos-sclo-rh: mirrors.tuna.tsinghua.edu.cn
* centos-sclo-sclo: mirrors.tuna.tsinghua.edu.cn
* epel: mirrors.aliyun.com
* extras: mirrors.tuna.tsinghua.edu.cn
* updates: mirrors.tuna.tsinghua.edu.cn
可安装的软件包
名称 :cmake3
架构 :x86_64
版本 :3.14.6
发布 :2.el7
大小 :7.7 M
源 :epel/x86_64
简介 : Cross-platform make system
网址 :http://www.cmake.org
协议 : BSD and MIT and zlib
描述 : CMake is used to control the software compilation process using simple
: platform and compiler independent configuration files. CMake generates
: native makefiles and workspaces that can be used in the compiler
: environment of your choice. CMake is quite sophisticated: it is possible
: to support complex environments requiring system configuration, preprocessor
: generation, code generation, and template instantiation.
# OK!
$ sudo yum install cmake3 -y
$ cmake3 --version 安装MKL安装gromacs参考:$ mkdir -p $HOME/download
$ cd $HOME/download
$ wget ftp://ftp.gromacs.org/pub/gromacs/gromacs-2019.4.tar.gz
$ tar xf gromacs-2019.4.tar.gz
$ cd gromacs-2019.4
# 单机
$ mkdir build_seq
$ cd build_seq
$ cmake3 .. \
-DCMAKE_INSTALL_PREFIX=/opt/gromacs/2019.4/seq \
-DGMX_FFT_LIBRARY=mkl \
-DMKL_INCLUDE_DIR=$MKLROOT/include \
-DMKL_LIBRARIES="-L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_rt -lpthread -lm -ldl" \
-DGMX_SIMD=AVX_512 \
-DREGRESSIONTEST_DOWNLOAD=ON
$ make -j
$ make check
$ sudo make install
$ cd ..
# 多节点,或者多个numa
$ mkdir build_mpi
$ cd build_mpi
$ cmake3 .. \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_CXX_COMPILER=mpicxx \
-DGMX_MPI=on \
-DCMAKE_INSTALL_PREFIX=/opt/gromacs/2019.4/mpi \
-DGMX_FFT_LIBRARY=mkl \
-DMKL_INCLUDE_DIR=$MKLROOT/include \
-DMKL_LIBRARIES="-L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_rt -lpthread -lm -ldl" \
-DGMX_SIMD=AVX_512 \
-DREGRESSIONTEST_DOWNLOAD=ON
$ make -j
$ FI_PRIVIDER=tcp make check -j ## intel mpi 需要加这个FI_PROVIDER。。。
$ sudo make install
测试gromacs 单机版$ source /opt/gromacs/2019.4/seq/bin/GMXRC
$ gmx --version
:-) GROMACS - gmx, 2019.4 (-: [7/1829]
GROMACS is written by:
Emile Apol Rossen Apostolov Paul Bauer Herman J.C. Berendsen
Par Bjelkmar Christian Blau Viacheslav Bolnykh Kevin Boyd
Aldert van Buuren Rudi van Drunen Anton Feenstra Alan Gray
Gerrit Groenhof Anca Hamuraru Vincent Hindriksen M. Eric Irrgang
Aleksei Iupinov Christoph Junghans Joe Jordan Dimitrios Karkoulis
Peter Kasson Jiri Kraus Carsten Kutzner Per Larsson
Justin A. Lemkul Viveca Lindahl Magnus Lundborg Erik Marklund
Pascal Merz Pieter Meulenhoff Teemu Murtola Szilard Pall
Sander Pronk Roland Schulz Michael Shirts Alexey Shvetsov
Alfons Sijbers Peter Tieleman Jon Vincent Teemu Virolainen
Christian Wennberg Maarten Wolf
and the project leaders:
Mark Abraham, Berk Hess, Erik Lindahl, and David van der Spoel
Copyright (c) 1991-2000, University of Groningen, The Netherlands.
Copyright (c) 2001-2018, The GROMACS development team at
Uppsala University, Stockholm University and
the Royal Institute of Technology, Sweden.
check out http://www.gromacs.org for more information.
GROMACS is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2.1
of the License, or (at your option) any later version.
GROMACS: gmx, version 2019.4
Executable: /opt/gromacs/2019.4/seq/bin/gmx
Data prefix: /opt/gromacs/2019.4/seq
Working dir: /opt/gromacs/2019.4/seq/bin
Command line:
gmx --version
GROMACS version: 2019.4
Precision: single
Memory model: 64 bit
MPI library: thread_mpi
OpenMP support: enabled (GMX_OPENMP_MAX_THREADS = 64)
GPU support: disabled
SIMD instructions: AVX_512
FFT library: Intel MKL
RDTSCP usage: enabled
TNG support: enabled
Hwloc support: disabled
Tracing support: disabled
C compiler: /opt/rh/devtoolset-8/root/usr/bin/cc GNU 8.3.1
C compiler flags: -mavx512f -mfma -O2 -DNDEBUG -funroll-all-loops -fexcess-precision=fast
C++ compiler: /opt/rh/devtoolset-8/root/usr/bin/c++ GNU 8.3.1
C++ compiler flags: -mavx512f -mfma -std=c++11 -O2 -DNDEBUG -funroll-all-loops -fexcess-precision=fast测试gromacs mpi并行版$ source /opt/gromacs/2019.4/mpi/bin/GMXRC
## FI_PROVIDER=socket/tcp
## https://software.intel.com/en-us ... nology/topic/799716
$ FI_PROVIDER=tcp mpiexec -n 1 gmx_mpi --version
:-) GROMACS - gmx_mpi, 2019.4 (-:
GROMACS is written by:
Emile Apol Rossen Apostolov Paul Bauer Herman J.C. Berendsen
Par Bjelkmar Christian Blau Viacheslav Bolnykh Kevin Boyd
Aldert van Buuren Rudi van Drunen Anton Feenstra Alan Gray
Gerrit Groenhof Anca Hamuraru Vincent Hindriksen M. Eric Irrgang
Aleksei Iupinov Christoph Junghans Joe Jordan Dimitrios Karkoulis
Peter Kasson Jiri Kraus Carsten Kutzner Per Larsson
Justin A. Lemkul Viveca Lindahl Magnus Lundborg Erik Marklund
Pascal Merz Pieter Meulenhoff Teemu Murtola Szilard Pall
Sander Pronk Roland Schulz Michael Shirts Alexey Shvetsov
Alfons Sijbers Peter Tieleman Jon Vincent Teemu Virolainen
Christian Wennberg Maarten Wolf
and the project leaders:
Mark Abraham, Berk Hess, Erik Lindahl, and David van der Spoel
Copyright (c) 1991-2000, University of Groningen, The Netherlands.
Copyright (c) 2001-2018, The GROMACS development team at
Uppsala University, Stockholm University and
the Royal Institute of Technology, Sweden.
check out http://www.gromacs.org for more information.
GROMACS is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2.1
of the License, or (at your option) any later version.
GROMACS: gmx_mpi, version 2019.4
Executable: /opt/gromacs/2019.4/mpi/bin/gmx_mpi
Data prefix: /opt/gromacs/2019.4/mpi
Working dir: /home/dell
Command line:
gmx_mpi --version
GROMACS version: 2019.4
Precision: single
Memory model: 64 bit
MPI library: MPI
OpenMP support: enabled (GMX_OPENMP_MAX_THREADS = 64)
GPU support: disabled
SIMD instructions: AVX_512
FFT library: Intel MKL
RDTSCP usage: enabled
TNG support: enabled
Hwloc support: disabled
Tracing support: disabled
C compiler: /opt/intel/compilers_and_libraries_2019.5.281/linux/mpi/intel64/bin/mpicc GNU 8.3.1
C compiler flags: -mavx512f -mfma -O2 -DNDEBUG -funroll-all-loops -fexcess-precision=fast
C++ compiler: /opt/intel/compilers_and_libraries_2019.5.281/linux/mpi/intel64/bin/mpicxx GNU 8.3.1
C++ compiler flags: -mavx512f -mfma -std=c++11 -O2 -DNDEBUG -funroll-all-loops -fexcess-precision=fast
使用cat>>$HOME/.bashrc<<"EOF"
# usage:
# $ enable_gmx_seq
function enable_gmx_seq(){
source /opt/rh/devtoolset-8/enable
source /opt/intel/mkl/bin/mklvars.sh intel64
source /opt/gromacs/2019.4/seq/bin/GMXRC
}
# usage:
# $ enable_gmx_mpi
function enable_gmx_mpi(){
source /opt/rh/devtoolset-8/enable
source /opt/intel/mkl/bin/mklvars.sh intel64
source /opt/intel/impi/2019.5.281/intel64/bin/mpivars.sh intel64
source /opt/gromacs/2019.4/mpi/bin/GMXRC
}
EOF
|