Contents
- Installation steps Quantum Espresso 5.0.2 GPU 14.03.0
- Execution
- Known error and solutions
- References
-
Installation steps
1.1 Download the followings
– espresso-5.0.2 and respective modules from below url
http://qe-forge.org/gf/project/q-e/frs/?action=FrsReleaseBrowse&frs_package_id=18
– Download espresso GPU patch file , we used QE-GPU v14.03.0
https://github.com/fspiga/QE-GPU or https://github.com/fspiga/QE-GPU/releases
1.2 Untar the files
$mkdir espresso-5.0.2-gpu-14.03
$ cd espresso-5.0.2-gpu-14.03
$ tar -xvf espresso-5.0.2.tar.gz
$ tar -xvf QE-GPU-14.03.0.tar.gz
$ cd espresso-5.0.2
copy all downloaded *5.0.2 into espresso-5.0.2/archive directory
1.3 Apply the GPU patch
$ cp -r QE-GPU-14.03.0/GPU .
$rsync -r –exclude=.git ./GPU espresso-5.0.2-gpu-14.03/espresso-5.0.2
$ cp QE-GPU-14.03.0/qe-patches/espresso-5.0.2/espresso-5.0.2_GPU-14.03.patch .
$ patch -p1 < espresso-5.0.2_GPU-14.03.patch
$ cd GPU
1.3 Configure
$export PATH=/opt/CUDA-5.5/bin:$PATH
$export LD_LIBRARY_PATH=/opt/CUDA-5.5/lib64:$LD_LIBRARY_PATH
$./configure –prefix=espresso-5.0.2-gpu-14.03/espresso-5.0.2 MPIF90=mpiifort FC=mpiifort F77=mpiifort F90=mpiifort CXX=mpiicpc CC=mpiicc BLAS_LIBS=”-L/opt/intel/composer_xe_2013.1.117/mkl/lib/intel64 -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm” LAPACK_LIBS=” ” FFT_LIBS=”-L/opt/intel/composer_xe_2013.1.117/mkl/lib/intel64″ SCALAPACK_LIBS=”-lmkl_scalapack_ilp64 -lmkl_blacs_intelmpi_ilp64″ –enable-parallel –enable-openmp –with-scalapack=intel –enable-cuda –with-cuda-dir=/opt/CUDA-5.5 –without-magma –with-phigemm
1.4 Compilation
$ cd espresso-5.0.2-gpu-14.03/espresso-5.0.2
1.4.1 Modify the make.sys file as per your system environment, for my setup following are the modification
## Add manual flags
44 MANUAL_DFLAGS = -D__ISO_C_BINDING -D__DISABLE_CUDA_NEWD -D__DISABLE_CUDA_ADDUSDENS
## modify D_FFTW to D_FFTW3
45 DFLAGS = -D__INTEL -D__FFTW3 -D__MPI -D__PARA -D__SCALAPACK -D__CUDA -D__PHIGEMM -D__ OPENMP $(MANUAL_DFLAGS)
## Add -DMKL_ILP64 ,-i8 , remove -openmp
83 CFLAGS = -DMKL_ILP64 -O3 $(DFLAGS) $(IFLAGS)
84 F90FLAGS = $(FFLAGS) -nomodule -fpp $(FDFLAGS) $(IFLAGS) $(MODFLAGS)
85 FFLAGS = -i8 -O2 -assume byterecl -g -traceback -par-report0 -vec-report0
90 FFLAGS_NOOPT = -i8 -O0 -assume byterecl -g -traceback
LDFLAGS = -ilp64
1.4.2. Compile with following command
$ make -f Makefile.gpu all-gpu 2>&1 | tee make.log
2. Execution
2.1 Execution
# Number of processes per node should be equal to number of GPUs per node.
mpirun -np 4 -perhost 2 /opt/app/espresso-5.0.2-gpu-14.03/espresso-5.0.2/bin/pw-gpu.x -in ./BN.in
2.2 Verification
# Run the following command on the system on which QE-gpu is running. The command will show you the processes running on GPUs
$nvidia-smi
3. Known error and solutions
3.1. Error :
iotk_print_kinds.o: In function `main’:
/opt/app/espresso-14.03.0-gpu/espresso-5.0.2/S3DE/iotk/src/iotk_print_kinds.f90:1: undefined reference to `__kmpc_begin’
/opt/app/espresso-14.03.0-gpu/espresso-5.0.2/S3DE/iotk/src/iotk_print_kinds.f90:4: undefined reference to `__kmpc_end’
make[2]: *** [iotk_print_kinds.x] Error 1
make[2]: Leaving directory `/opt/app/espresso-14.03.0-gpu/espresso-5.0.2/S3DE/iotk/src’
make[1]: *** [libiotk] Error 2
make[1]: Leaving directory `/opt/app/espresso-14.03.0-gpu/espresso-5.0.2/install’
Solution : remove “-openmp” flag from make.sys file.
4. References
4.1 http://qe-forge.org/gf/project/q-e/frs/?action=FrsReleaseBrowse&frs_package_id=18
4.2 https://github.com/fspiga/QE-GPU
4.3 https://github.com/fspiga/QE-GPU/releases