'2020/05'에 해당되는 글 1건

  1. 2020.05.04 GROMACS 우분투 및 cuda 환경에서 인스톨

사용환경

  • ubuntu 20.04 
  • Ryzen 9, nvidia RTX 2080ti

 

CUDA

# check whether driver is up-to-date
$ nvidia-smi 
Mon May  4 14:30:03 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.64       Driver Version: 440.64       CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce RTX 208...  Off  | 00000000:08:00.0  On |                  N/A |
| 35%   32C    P8    21W / 260W |    254MiB / 11016MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1242      G   /usr/lib/xorg/Xorg                           114MiB |
|    0      1867      G   /usr/bin/gnome-shell                         110MiB |
|    0     11254      G   /opt/teamviewer/tv_bin/TeamViewer             26MiB |
+-----------------------------------------------------------------------------+

# install cuda toolkit
$ sudo apt install nvidia-cuda-toolkit

# Check your CUDA version
$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:07:16_PDT_2019
Cuda compilation tools, release 10.1, V10.1.243

 

gromacs (2020.2)

# first of all install prequisites
$ sudo apt install build-essential
$ sudo apt install cmake
# currently gcc version (ubuntu 20.04 by default 9) need to be old (i.e. 8) to install CUDA
$ sudo apt -y install gcc-8 g++-8
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 8
$ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 8
$ sudo update-alternatives --config gcc
$ sudo update-alternatives --config g++
$ gcc --version
gcc (Ubuntu 8.4.0-3ubuntu2) 8.4.0
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.

$ g++ --version
g++ (Ubuntu 8.4.0-3ubuntu2) 8.4.0
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.

http://manual.gromacs.org/documentation/current/install-guide/index.html#quick-and-dirty-cluster-installation

# now install gromacs
$ tar xfz gromacs-2020.2.tar.gz
$ cd gromacs-2020.2
$ mkdir build
$ cd build
$ cmake .. -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DGMX_GPU=ON
$ make
$ make check
$ sudo make install
$ source /usr/local/gromacs/bin/GMXRC

 

Posted by k3mi5t
: