2018年6月26日 星期二

安裝GROMACS-2018.1在Debian 8.8

參考《安裝GROMACS-2018在Debian 8.8》。安裝的詳細指令如下

1. 環境變數
$ gcc --version
gcc (Debian 4.9.2-10) 4.9.2

$ /pkg/cmake-3.10.2-Linux-x86_64/bin/cmake --version
cmake version 3.10.2

$ which nvcc
/usr/local/cuda-8.0.61_375.26/bin/nvcc

$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61

2. 抓取原始碼,設定安裝位置與編譯
$ wget ftp://ftp.gromacs.org/pub/gromacs/gromacs-2018.1.tar.gz
$ md5sum gromacs-2018.1.tar.gz 
7ee393fa3c6b7ae351d47eae2adf980e  gromacs-2018.1.tar.gz

$ tar zxf gromacs-2018.1.tar.gz && cd gromacs-2018.1
$ mkdir build && cd build
$ /pkg/cmake-3.10.2-Linux-x86_64/bin/cmake .. \
-DCMAKE_INSTALL_PREFIX=/opt/GROMACS/2018.1-sse4.1-cuda8.0 \
-DGMX_BUILD_OWN_FFTW=ON \
-DGMX_SIMD=SSE4.1 \
-DGMX_GPU=ON \
-DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-8.0.61_375.26 \
-DREGRESSIONTEST_DOWNLOAD=OFF

$ make -j 40 >& 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]=b4160a2fe0f0afab1aee942f346ab83d7faacda6, not stripped

$ ldd bin/gmx 
    linux-vdso.so.1 (0x00007ffc333a9000)
    libgromacs.so.3 => /home/ttng/Sources/GROMACS/gromacs-2018.1/build/bin/../lib/libgromacs.so.3 (0x00007f7d90fdc000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f7d90cb3000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7d909b2000)
    libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f7d9079c000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f7d90585000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f7d90368000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7d8ffbd000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f7d8fdb8000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f7d8fbb0000)
    libcufft.so.8.0 => /usr/local/cuda-8.0.61_375.26/lib64/libcufft.so.8.0 (0x00007f7d86d61000)
    libblas.so.3 => /usr/lib/libblas.so.3 (0x00007f7d86ae0000)
    liblapack.so.3 => /usr/lib/liblapack.so.3 (0x00007f7d86332000)
    /lib64/ld-linux-x86-64.so.2 (0x000055eaccc5f000)
    libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00007f7d86013000)
    libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007f7d85dd6000)

$ sudo make install
...
-- Installing: /opt/GROMACS/2018.1-sse4.1-cuda8.0/bin/gmx
-- Up-to-date: /opt/GROMACS/2018.1-sse4.1-cuda8.0/bin
-- Installing: /opt/GROMACS/2018.1-sse4.1-cuda8.0/bin/gmx-completion.bash
-- Installing: /opt/GROMACS/2018.1-sse4.1-cuda8.0/bin/gmx-completion-gmx.bash

4. 測試程式的正確性
$ 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
$ ./gmxtest.pl -nt 8 all >& test.log 
$ cat test.log | grep PASS | grep -v ^PASSED
$ cat test.log | grep FAIL -c
_EOF_

沒有留言:

張貼留言