Wednesday, June 26, 2013

Gamess (US) frequently asked questions Part 3: Compiling Gamess (US) in a GPU-enabled environment

A second guest post by Kirill Berezovsky (Petrozadovsk State University)


Gamess (US) may use GPUs for MP2 andCCSD(T) jobs. If you will use NVIDIA GPU, then additionally install these packages:

1.     NVIDIA CUDA 4.1
https://developer.nvidia.com/cuda-downloads

2.     HDF5 1.8.7
http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.7/src/

But, first install NVIDIA video driver by terminal (it should be 304.64 and upper):

1.     Get driver:                    http://www.nvidia.ru/Download/index.aspx
This site allows the manual download of the required drivers, but may also detect automatically the drivers your system needs. Neat ;-)


2.     Run in terminal:
o    echo “blacklist nvidiafb” >> /etc/modprobe.d/blacklist.conf
o    echo “blacklist nouveau” >> /etc/modprobe.d/blacklist.conf
o    echo “blacklist rivafb” >> /etc/modprobe.d/blacklist.conf
o    echo “blacklist rivatv” >> /etc/modprobe.d/blacklist.conf
o    echo “blacklist vga16fb” >> /etc/modprobe.d/blacklist.conf
o    echo “options nouveau modeset=0” >> /etc/modprobe.d/blacklist.conf

3.     Next remove all pre-installed nvidia-packages (in terminal):
o    apt-get --purge remove nvidia*

4.     Restart your machine and press Ctrl-Alt-F1 (or the equivalent key sequence for your machine) and enter as root. Kill GUI by:
o    killall gdm3       (for Debian)
o    killall gdm         (for Ubuntu 10.xx)
o    killall lightgdm   (for Ubuntu 11.xx)
o    killall lighdm     (for Ubuntu 12.xx)

5.     Go to folder, where NVIDIA-driver places and:
o    chmod +x NVIDIA-Linux-x86_64-304.64.run
o    ./ NVIDIA-Linux-x86_64-304.64.run

6.     When you install driver, restart your machine, and install NVIDIA CUDA.

7.     HDF5 compiled by:
o    tar xvf hdf5-1.8.7.tar.bz2
o    cd hdf5-1.8.7
o    ./configure --prefix=/usr/local/hdf5 --enable-fortran --enable-parallel FC=mpiifort
o    make
o    make install

8.     Add in ~/.bashrc new variables:

# CUDA
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib:$LD_LIBRARY_PATH

9.     Re-run GAMESS (US) ./config script again, but at this time answer “yes” for LIBCCHEM-question, and choose paths for CUDA and HDF5.

10.  Go to libcchem folder and run script ./build-cchem.

11.  Wait…

12.  Go upper folder and link new executable of GAMESS (US):
o    ./lked gamess gpu

13.  Great! Now you can run MP2 and CCSD(T) jobs on gpu by command using my script:
gamess Inputfile.input gpu

1 comment:

  1. This comment has been removed by a blog administrator.

    ReplyDelete