2018年6月27日 星期三

安裝GROMACS-2018.1在Ubuntu 16.04

GROMACS 2018出了更新版2018.1,參考安裝GROMACS-2018在Ubuntu 16.04,這邊是安裝gmx2018.1到Ubuntu 16.04上,使用cuda-9.1來加速。以下是安裝紀錄


1. 環境變數與下載原始碼
$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609

$ cmake --version
cmake version 3.5.1

$ which nvcc
/usr/local/cuda-9.1/bin/nvcc

$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Nov__3_21:07:56_CDT_2017
Cuda compilation tools, release 9.1, V9.1.85
$ wget ftp://ftp.gromacs.org/pub/gromacs/gromacs-2018.1.tar.gz
$ md5sum gromacs-2018.1.tar.gz 
7ee393fa3c6b7ae351d47eae2adf980e  gromacs-2018.1.tar.gz

2. 設定與編譯
$ tar zxf gromacs-2018.1.tar.gz && cd gromacs-2018.1
$ mkdir build && cd build

$ cmake .. \
-DCMAKE_INSTALL_PREFIX=/opt/GROMACS/2018.1-AVX2_256-cuda9.1 \
-DGMX_BUILD_OWN_FFTW=ON \
-DGMX_SIMD=AVX2_256 \
-DGMX_GPU=ON \
-DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-9.1 \
-DREGRESSIONTEST_DOWNLOAD=OFF
$ make -j 20 >& make.log & 

3. 安裝與測試
$ file bin/gmx 
bin/gmx: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=a333177ef5182389420b90f4856873b5b9ed7fac, not stripped

$ ldd bin/gmx
    linux-vdso.so.1 =>  (0x00007ffea8d33000)
    /usr/lib/nvidia-387/libnvidia-ml.so (0x00007f8f5d283000)
    libgromacs.so.3 => /home/ttng/Sources/gromacs-2018.1/build/bin/../lib/libgromacs.so.3 (0x00007f8f5a066000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f8f59cc5000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8f599bb000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f8f597a5000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8f593db000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8f591bd000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f8f58fb9000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f8f58db0000)
    libcufft.so.9.1 => /usr/local/cuda-9.1/lib64/libcufft.so.9.1 (0x00007f8f518c3000)
    libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f8f516a1000)
    /lib64/ld-linux-x86-64.so.2 (0x000055f749039000)

$ sudo make install
...
-- Installing: /opt/GROMACS/2018.1-AVX2_256-cuda9.1/bin/gmx
-- Up-to-date: /opt/GROMACS/2018.1-AVX2_256-cuda9.1/bin
-- Installing: /opt/GROMACS/2018.1-AVX2_256-cuda9.1/bin/gmx-completion.bash
-- Installing: /opt/GROMACS/2018.1-AVX2_256-cuda9.1/bin/gmx-completion-gmx.bash
$ wget http://gerrit.gromacs.org/download/regressiontests-2018.1.tar.gz
$ md5sum regressiontests-2018.1.tar.gz
1a94916e2cf90e34fddb3514a65e0154  regressiontests-2018.1.tar.gz

$ tar zxf regressiontests-2018.1.tar.gz && cd regressiontests-2018.1
$ source /opt/GROMACS/2018.1-AVX2_256-cuda9.1/bin/GMXRC.bash 
$ ./gmxtest.pl -nt 8 all >& test.log &

$ cat test.log | grep PASS | grep -v ^PASSED
$ cat test.log | grep FAIL 
_EOF_

沒有留言:

張貼留言