https://www.quantum-espresso.org/
https://gitlab.com/QEF/q-e-gpu/-/releases
6.7-gpu
#!/bin/sh
VERSION=6.7
FULLVER=${VERSION}
BASEDIR=/home/users/${USER}/Software/QE/${VERSION}-gpu
TARBALL=${BASEDIR}/q-e-gpu-qe-gpu-${FULLVER}.tar.gz
INSTDIR=/local/apl/lx/espresso67-gpu# openmpi
WORKDIR=/work/users/${USER}
OMPIVER=4.0.2
OMPITARBALL=/home/users/${USER}/Software/OpenMPI/${OMPIVER}/openmpi-${OMPIVER}.tar.bz2
OMPIROOT=${INSTDIR}/openmpi-${OMPIVER}
PBSROOT=/local/apl/lx/pbs14PARALLEL=12
# -----------------------------------------------------------------------
umask 0022module purge
module load pgi/20.4
module load mkl/2019.0.5export LANG=C
export LC_ALL=Culimit -s unlimited
# build openmpi first
cd ${WORKDIR}
if [ -d openmpi-${OMPIVER} ]; then
mv openmpi-${OMPIVER} openmpi-erase
rm -rf openmpi-erase &
fitar jxf ${OMPITARBALL}
cd openmpi-${OMPIVER}mkdir rccs && cd rccs
CC=pgcc CXX=pgc++ FC=pgfortran \
../configure --prefix=${OMPIROOT} \
--with-tm=${PBSROOT} \
--enable-mpi-cxx \
--enable-mpi1-compatibility \
--with-psm2
make -j ${PARALLEL} && make install && make check# openmpi setting
export OMPI_MCA_btl_openib_allow_ib=1
export CPATH="${OMPIROOT}/include:${CPATH}"
export LIBRARY_PATH="${OMPIROOT}/lib:${LIBRARY_PATH}"
export LD_LIBRARY_PATH="${OMPIROOT}/lib:${LD_LIBRARY_PATH}"
export PATH="${OMPIROOT}/bin:${PATH}"# qe build
cd ${INSTDIR}
if [ -d q-e-gpu-qe-gpu-${FULLVER} ]; then
mv q-e-gpu-qe-gpu-${FULLVER} q-e-gpu-qe-gpu-erase
rm -rf q-e-gpu-qe-gpu-erase &
fitar zxf ${TARBALL}
cd q-e-gpu-qe-gpu-${FULLVER}
mv * .[a-zA-Z]* ../
cd ../ && rmdir q-e-gpu-qe-gpu-${FULLVER}export MPIF90=mpif90
export MPIFC=mpif90
export MPIF77=mpif90
export MPICC=mpicc
export MPICXX=mpicxx# --with-cuda should point cuda bundled with pgi... but i couldn't do it...
FC=pgfortran F90=pgfortran F77=pgfortran CC=pgcc CXX=pgc++ \
./configure --enable-openmp \
--enable-parallel \
--with-cuda=/local/apl/lx/cuda-10.1 \
--with-cuda-cc=60 \
--with-cuda-runtime=10.1# force to add cc70 support
sed -i -e "s/cc60/cc60,cc70/" make.incmake -j${PARALLEL} pw cp
cd test-suitemake run-tests-pw-serial
make run-tests-cp-serial
make clean
make run-tests-pw-parallel
make run-tests-cp-parallel
cd ..