Skip to content

Instantly share code, notes, and snippets.

@ChrisDowning
Last active March 4, 2019 11:05
Show Gist options
  • Save ChrisDowning/8701437342cdcd2e4fd944f204318bb2 to your computer and use it in GitHub Desktop.
Save ChrisDowning/8701437342cdcd2e4fd944f204318bb2 to your computer and use it in GitHub Desktop.
Singularity recipe for QuantumEspresso using GCC, Intel MPI & MKL (Yum base)
Bootstrap: yum
OSVersion: 7
MirrorURL: http://mirror.centos.org/centos-%{OSVERSION}/%{OSVERSION}/os/$basearch/
Include: yum
%post
yum -y install yum-utils
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 tar gzip
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

To use 2018 versions of MPI/MKL, replace the relevant lines with:
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-2018.4-057 intel-mpi-2018.4-057

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