Skip to content

Instantly share code, notes, and snippets.

@ChrisDowning
Last active October 19, 2018 18:04
Show Gist options
  • Save ChrisDowning/823a2a0af43651d81ea81ec6dc7e5acf to your computer and use it in GitHub Desktop.
Save ChrisDowning/823a2a0af43651d81ea81ec6dc7e5acf to your computer and use it in GitHub Desktop.
Singularity recipe for QuantumEspresso using GCC, Intel MPI & MKL (Docker base)
Bootstrap: docker
From: centos:7.5.1804
%post
yum-config-manager --add-repo https://yum.repos.intel.com/setup/intelproducts.repo
rpm --import https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
yum -y update
yum -y install intel-mkl intel-mpi
yum -y install wget make which gcc gcc-gfortran
wget https://gitlab.com/QEF/q-e/-/archive/qe-6.3/q-e-qe-6.3.tar.gz
tar -xvzf q-e-qe-6.3.tar.gz
rm q-e-qe-6.3.tar.gz
cd q-e-qe-6.3/
export MANPATH=/opt/intel/impi/2018.4.274/linux/mpi/man
source /opt/intel/mkl/bin/mklvars.sh intel64
source /opt/intel/impi/2018.4.274/intel64/bin/mpivars.sh
./configure
make all
%runscript
. /opt/intel/mkl/bin/mklvars.sh intel64
. /opt/intel/impi/2018.4.274/intel64/bin/mpivars.sh
export PATH=/q-e-qe-6.3/bin:$PATH
$@
@ChrisDowning
Copy link
Author

The component: export MANPATH=/opt/intel/impi/2018.4.274/linux/mpi/man is required due to a bug (typo) in the mpivars.sh file - setting MANPATH before running avoids the branch with the typo, and so avoids the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment