计算化学公社

 找回密码 Forget password
 注册 Register
Views: 15123|回复 Reply: 3
打印 Print 上一主题 Last thread 下一主题 Next thread

[GROMACS] 安装GROMACS 2019.4

[复制链接 Copy URL]

17

帖子

0

威望

68

eV
积分
85

Level 2 能力者

跳转到指定楼层 Go to specific reply
楼主

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
$ sudo yum-config-manager --add-repo https://yum.repos.intel.com/setup/intelproducts.repo
$ sudo rpm --import https://yum.repos.intel.com/inte ... W-PRODUCTS-2019.PUB
$ sudo yum search intel-mkl -y
$ sudo yum install -y intel-mkl intel-mpi

$ source /opt/intel/impi/2019.5.281/intel64/bin/mpivars.sh intel64
$ source /opt/intel/mkl/bin/mklvars.sh intel64

$ gcc --version
$ mpicc --version
安装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


评分 Rate

参与人数
Participants 1
eV +2 收起 理由
Reason
少年爱吃地三鲜 + 2

查看全部评分 View all ratings

181

帖子

0

威望

4192

eV
积分
4373

Level 6 (一方通行)

2#
发表于 Post on 2021-5-28 13:17:58 | 只看该作者 Only view this author
按住楼主那样装
发现 undefined reference to `ompi_mpi_op_lor'
据说是MPI库没连好,这个该怎么解决啊

6万

帖子

99

威望

6万

eV
积分
125141

管理员

公社社长

3#
发表于 Post on 2021-6-1 15:27:17 | 只看该作者 Only view this author
azero 发表于 2021-5-28 13:17
按住楼主那样装
发现 undefined reference to `ompi_mpi_op_lor'
据说是MPI库没连好,这个该怎么解决啊

单机运行不要用MPI版,又麻烦效率又低
怎么编译看
GROMACS的安装方法(含全程视频演示)
http://sobereva.com/457http://bbs.keinsci.com/thread-11821-1-1.html
北京科音自然科学研究中心http://www.keinsci.com)致力于计算化学的发展和传播,长期开办极高质量的各种计算化学类培训:初级量子化学培训班中级量子化学培训班高级量子化学培训班量子化学波函数分析与Multiwfn程序培训班分子动力学与GROMACS培训班CP2K第一性原理计算培训班,内容介绍以及往届资料购买请点击相应链接查看。这些培训是计算化学从零快速入门以及进一步全面系统性提升研究水平的高速路!培训各种常见问题见《北京科音办的培训班FAQ》
欢迎加入北京科音微信公众号获取北京科音培训的最新消息,并避免错过网上有价值的计算化学文章!
欢迎加入人气极高、专业性特别强的理论与计算化学综合交流群思想家公社QQ群(群号见此链接),合计达一万多人。北京科音培训班的学员在群中可申请VIP头衔,提问将得到群主Sobereva的最优先解答。
思想家公社的门口Blog:http://sobereva.com(发布大量原创计算化学相关博文)
Multiwfn主页:http://sobereva.com/multiwfn(十分强大、极为流行的量子化学波函数分析程序)
Google Scholar:https://scholar.google.com/citations?user=tiKE0qkAAAAJ
ResearchGate:https://www.researchgate.net/profile/Tian_Lu

181

帖子

0

威望

4192

eV
积分
4373

Level 6 (一方通行)

4#
发表于 Post on 2021-6-2 16:57:50 | 只看该作者 Only view this author
sobereva 发表于 2021-6-1 15:27
单机运行不要用MPI版,又麻烦效率又低
怎么编译看
GROMACS的安装方法(含全程视频演示)

小服务器,已经搞定了,换成了openmpi

本版积分规则 Credits rule

手机版 Mobile version|北京科音自然科学研究中心 Beijing Kein Research Center for Natural Sciences|京公网安备 11010502035419号|计算化学公社 — 北京科音旗下高水平计算化学交流论坛 ( 京ICP备14038949号-1 )|网站地图

GMT+8, 2026-2-22 01:29 , Processed in 0.253253 second(s), 21 queries , Gzip On.

快速回复 返回顶部 返回列表 Return to list