GPU compilation of Quantum Espresso

GPU compilation of Quantum Espresso

Compiling Quantum Espresso for GPU

NVHPC

Nvidia HPC SDK can be downloaded from here.

Quantum Espresso

I am using the git version obtained from here

git clone https://gitlab.com/QEF/q-e.git

A note on installing to a node without internet access:

If you are going to compile this from a location that does not allow connection to elsewhere, you'll need to download the submodules beforehand, and disable git in configure script. At the q-e directory:

git submodule init
git submodule update

then disable calls to update_submodule in install/extlibs_makefile

Basic Installation with Configure script

Pretty straightforward. Load the modules and follow the README_GPU.md or you can follow various system-specific instructions like this one. Below is an example I used in compiling for Forever Diamond.

module load nvhpc/22.7 generic/hdf5/1.12.1/nvhpc22.7


./configure CC=nvc CXX=nvc++ FC=nvfortran --with-cuda=/share/apps/nvidia_hpc_sdk/Linux_x86_64/22.7/cuda --with-cuda-runtime=11.7 --with-cuda-cc=all --enable-openmp --enable-openacc --with-scalapack=no --with-cuda-mpi=yes 

make pwall
make ld1

PSLIBRARY

Nowadays, we have the luxuries like Material Cloud's PWSCF input generator, but for some more advanced purposes, Dal Corso's PSLibrary is still indespensable. It can be downloaded from here. Compilation is straightforward once ld1.x is available from the previous step, but be warned it takes a long time!

This is how I did it in Forever Diamond:

First edit the file QE_path

#!/bin/bash
PWDIR='/share/apps/forever-diamond/q-e/nvhpc/git280822-nvhpc22.7/'

Then edit the file make_ps

  • *edit the ld1_command to ld1_command="mpirun -np 1 $BIN_DIR/ld1.x $PARA_POSTFIX"
  • disable/remove . $PWDIR/environment_variables

Finally

./make_all_ps

 

English