https://wiki.iraspa.org/api.php?action=feedcontributions&user=David+Dubbeldam&feedformat=atom
iRASPA - User contributions [en]
2024-03-28T13:04:39Z
User contributions
MediaWiki 1.31.0
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1280
CP2K compiling with Intel
2020-06-11T13:12:57Z
<p>David Dubbeldam: /* CP2K basic openmpi */</p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
<br />
edit ''Makefile'' in directory ''fortran''<br />
line 12 should read (''-lstdc++'' added)<br />
COMPUTE_LIB = -L../lib -lint2 -lstdc++<br />
line 37 change CXX to FC<br />
$(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^<br />
<br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
sudo make PREFIX=/usr/local FC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/ifort CC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icc CXX=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== CP2K ====<br />
<br />
<pre><br />
# Tested with: intel 19.1.1.217, OPENMPICH 4.0.3, OpenBLAS 0.3.0, ScaLAPACK 2.1.0, FFTW 3.3.8, Libint 2.6.0, Libxc 4.3.4, libxsmm 1.15, SPGLIB 1.12.2<br />
# Author: David Dubbeldam (d.dubbeldam@uva.nl, University of Amsterdam, May 2020)<br />
<br />
CC = icc<br />
FC = ifort<br />
LD = ifort<br />
AR = ar -r<br />
<br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -fp-model precise -I/opt/include<br />
<br />
DFLAGS = -D__MKL -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br />
<br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/opt/include<br />
FCFLAGS += -fp-model precise<br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br />
FCFLAGS += -I/opt/include -I/opt/lib/libint2-intel-max6/include<br />
<br />
LDFLAGS = $(FCFLAGS) -static-intel<br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br />
<br />
INTEL_MKL_LIB = ${MKLROOT}/lib/intel64<br />
<br />
LIBS = /opt/lib/libgsl.a /opt/lib/libgslcblas.a<br />
LIBS += /opt/lib/libxcf03.a /opt/lib/libxc.a<br />
LIBS += /opt/lib/libxsmmf.a /opt/lib/libxsmm.a<br />
LIBS += /opt/lib/libint2-intel-max6/lib/libint2.a<br />
LIBS += -Wl,--start-group \<br />
$(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br />
-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_lapack95_lp64 -lmkl_blas95_lp64 \<br />
-Wl,--end-group -lpthread -lm<br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br />
<br />
</pre><br />
<br />
Before running the test, raise the stack-limit to avoid segmentation faults.<br />
ulimit -s unlimited<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 4<br><br />
Number of CORRECT tests 3197<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 4 3197 3 3204 X<br><br />
<br><br />
Summary: correct: 3197 / 3204; new: 3; wrong: 4; 50min<br><br />
Status: FAILED<br />
</blockquote><br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="/usr/lib64/openmpi4-intel/bin/mpifort"<br />
export CC="/usr/lib64/openmpi4-intel/bin/mpicc"<br />
export CXX="/usr/lib64/openmpi4-intel/bin/mpicxx"<br />
export F77=${FC}<br />
export F90=${FC}<br />
module load mpi/openmpi4-x86_64-intel<br />
export OMPI_MCA_pml=^ucx<br />
export OMPI_MCA_btl=self,tcp<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
ulimit -s unlimited<br />
<br />
==== CP2K basic openmpi ====<br />
<br />
<pre><br />
# Tested with: Intel 19.1.1.217, OPENMPICH 4.0.3, OpenBLAS 0.3.0, ScaLAPACK 2.1.0, FFTW 3.3.8, Libint 2.6.0, Libxc 4.3.4, libxsmm 1.15,<br />
# ELPA 2019.11.001, PLUMED 2.6.0, SPGLIB 1.12.2, QUIP-2015, ParMETIS-4.0.3, Pexsi-1.2.0, SIRIUS 6.5.3, SpFFT 0.9.9, libvdw 0.4.0<br />
# Author: David Dubbeldam (d.dubbeldam@uva.nl, University of Amsterdam, May 2020)<br />
<br />
CC = /usr/lib64/openmpi4-intel/bin/mpicc<br />
FC = /usr/lib64/openmpi4-intel/bin/mpifort<br />
LD = /usr/lib64/openmpi4-intel/bin/mpifort<br />
AR = ar -r<br />
<br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -fp-model precise -I/opt/include<br />
<br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br />
DFLAGS += -D__MKL -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br />
DFLAGS += -D__SIRIUS -D__PLUMED2 -D__QUIP -D__LIBPEXSI -D__ELPA<br />
<br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/opt/include<br />
FCFLAGS += -fp-model precise<br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br />
FCFLAGS += -I/opt/include -I/opt/include/sirius/ -I/opt/lib/libint2-intel-max6/include<br />
FCFLAGS += -I/opt/include/elpa-2019.11.001/elpa -I/opt/include/elpa-2019.11.001/modules<br />
<br />
LDFLAGS = $(FCFLAGS) -static-intel<br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br />
<br />
INTEL_MKL_LIB = ${MKLROOT}/lib/intel64<br />
<br />
LIBS = $(PLUMED_DEPENDENCIES) -lplumed<br />
LIBS += /opt/lib/libint2-intel-max6/lib/libint2.a<br />
LIBS += /opt/lib/libelpa.a<br />
LIBS += /opt/lib64/libsirius.a<br />
LIBS += /opt/lib64/libpexsi.a<br />
LIBS += /opt/lib64/libsuperlu_dist.a<br />
LIBS += /opt/lib/libspfft.a<br />
LIBS += /opt/lib/libvdwxc.a<br />
LIBS += /opt/lib/libquip_core.a /opt/lib/libatoms.a<br />
LIBS += /opt/lib/libFoX_sax.a<br />
LIBS += /opt/lib/libFoX_common.a<br />
LIBS += /opt/lib/libFoX_utils.a<br />
LIBS += /opt/lib/libFoX_fsys.a<br />
LIBS += /opt/lib/libparmetis.a /opt/lib/libmetis.a<br />
LIBS += /opt/lib/libgsl.a /opt/lib/libgslcblas.a<br />
LIBS += /opt/lib/libxcf03.a /opt/lib/libxc.a<br />
LIBS += /opt/lib/libxsmmf.a /opt/lib/libxsmm.a<br />
LIBS += $(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br />
-Wl,--start-group \<br />
-lmkl_scalapack_lp64 \<br />
-lmkl_blacs_openmpi_lp64 \<br />
-lmkl_intel_lp64 \<br />
-lmkl_sequential \<br />
-lmkl_core \<br />
-Wl,--end-group<br />
LIBS += -lnetcdf -lhdf5_hl -lhdf5 -lz -lsymspg -ldl -liomp5 -lpthread -lstdc++ -lmpi_mpifh -lmpi_cxx -lmpi<br />
</pre><br />
<br />
Prepare for the regression tests<br />
module load mpi/openmpi4-x86_64-intel<br />
ulimit -c unlimited<br />
export OMPI_ALLOW_RUN_AS_ROOT=1<br />
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
export OMPI_MCA_btl=openib,self,vader<br />
export OMPI_MCA_pml=^ucx<br />
export FI_PROVIDER=ofi_rxm<br />
export FI_PROVIDER="verbs;ofi_rxm"<br />
<br />
<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 3<br><br />
Number of CORRECT tests 3198<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 3 3198 3 3204 X<br><br />
<br><br />
Summary: correct: 3198 / 3204; new: 3; wrong: 3; 8min<br><br />
Status: FAILED<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1279
CP2K compiling with Intel
2020-06-11T13:11:28Z
<p>David Dubbeldam: /* CP2K basic openmpi */</p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
<br />
edit ''Makefile'' in directory ''fortran''<br />
line 12 should read (''-lstdc++'' added)<br />
COMPUTE_LIB = -L../lib -lint2 -lstdc++<br />
line 37 change CXX to FC<br />
$(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^<br />
<br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
sudo make PREFIX=/usr/local FC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/ifort CC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icc CXX=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== CP2K ====<br />
<br />
<pre><br />
# Tested with: intel 19.1.1.217, OPENMPICH 4.0.3, OpenBLAS 0.3.0, ScaLAPACK 2.1.0, FFTW 3.3.8, Libint 2.6.0, Libxc 4.3.4, libxsmm 1.15, SPGLIB 1.12.2<br />
# Author: David Dubbeldam (d.dubbeldam@uva.nl, University of Amsterdam, May 2020)<br />
<br />
CC = icc<br />
FC = ifort<br />
LD = ifort<br />
AR = ar -r<br />
<br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -fp-model precise -I/opt/include<br />
<br />
DFLAGS = -D__MKL -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br />
<br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/opt/include<br />
FCFLAGS += -fp-model precise<br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br />
FCFLAGS += -I/opt/include -I/opt/lib/libint2-intel-max6/include<br />
<br />
LDFLAGS = $(FCFLAGS) -static-intel<br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br />
<br />
INTEL_MKL_LIB = ${MKLROOT}/lib/intel64<br />
<br />
LIBS = /opt/lib/libgsl.a /opt/lib/libgslcblas.a<br />
LIBS += /opt/lib/libxcf03.a /opt/lib/libxc.a<br />
LIBS += /opt/lib/libxsmmf.a /opt/lib/libxsmm.a<br />
LIBS += /opt/lib/libint2-intel-max6/lib/libint2.a<br />
LIBS += -Wl,--start-group \<br />
$(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br />
-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_lapack95_lp64 -lmkl_blas95_lp64 \<br />
-Wl,--end-group -lpthread -lm<br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br />
<br />
</pre><br />
<br />
Before running the test, raise the stack-limit to avoid segmentation faults.<br />
ulimit -s unlimited<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 4<br><br />
Number of CORRECT tests 3197<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 4 3197 3 3204 X<br><br />
<br><br />
Summary: correct: 3197 / 3204; new: 3; wrong: 4; 50min<br><br />
Status: FAILED<br />
</blockquote><br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="/usr/lib64/openmpi4-intel/bin/mpifort"<br />
export CC="/usr/lib64/openmpi4-intel/bin/mpicc"<br />
export CXX="/usr/lib64/openmpi4-intel/bin/mpicxx"<br />
export F77=${FC}<br />
export F90=${FC}<br />
module load mpi/openmpi4-x86_64-intel<br />
export OMPI_MCA_pml=^ucx<br />
export OMPI_MCA_btl=self,tcp<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
ulimit -s unlimited<br />
<br />
==== CP2K basic openmpi ====<br />
<br />
<pre><br />
# Tested with: Intel 19.1.1.217, OPENMPICH 4.0.3, OpenBLAS 0.3.0, ScaLAPACK 2.1.0, FFTW 3.3.8, Libint 2.6.0, Libxc 4.3.4, libxsmm 1.15,<br />
# ELPA 2019.11.001, PLUMED 2.6.0, SPGLIB 1.12.2, QUIP-2015, ParMETIS-4.0.3, Pexsi-1.2.0, SIRIUS 6.5.3, SpFFT 0.9.9, libvdw 0.4.0<br />
# Author: David Dubbeldam (d.dubbeldam@uva.nl, University of Amsterdam, May 2020)<br />
<br />
CC = /usr/lib64/openmpi4-intel/bin/mpicc<br />
FC = /usr/lib64/openmpi4-intel/bin/mpifort<br />
LD = /usr/lib64/openmpi4-intel/bin/mpifort<br />
AR = ar -r<br />
<br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -fp-model precise -I/opt/include<br />
<br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br />
DFLAGS += -D__MKL -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br />
DFLAGS += -D__SIRIUS -D__PLUMED2 -D__QUIP -D__LIBPEXSI -D__ELPA<br />
<br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/opt/include<br />
FCFLAGS += -fp-model precise<br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br />
FCFLAGS += -I/opt/include -I/opt/include/sirius/ -I/opt/lib/libint2-intel-max6/include<br />
FCFLAGS += -I/opt/include/elpa-2019.11.001/elpa -I/opt/include/elpa-2019.11.001/modules<br />
<br />
LDFLAGS = $(FCFLAGS) -static-intel<br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br />
<br />
INTEL_MKL_LIB = ${MKLROOT}/lib/intel64<br />
<br />
LIBS = $(PLUMED_DEPENDENCIES) -lplumed<br />
LIBS += /opt/lib/libint2-intel-max6/lib/libint2.a<br />
LIBS += /opt/lib/libelpa.a<br />
LIBS += /opt/lib64/libsirius.a<br />
LIBS += /opt/lib64/libpexsi.a<br />
LIBS += /opt/lib64/libsuperlu_dist.a<br />
LIBS += /opt/lib/libspfft.a<br />
LIBS += /opt/lib/libvdwxc.a<br />
LIBS += /opt/lib/libquip_core.a /opt/lib/libatoms.a<br />
LIBS += /opt/lib/libFoX_sax.a<br />
LIBS += /opt/lib/libFoX_common.a<br />
LIBS += /opt/lib/libFoX_utils.a<br />
LIBS += /opt/lib/libFoX_fsys.a<br />
LIBS += /opt/lib/libparmetis.a /opt/lib/libmetis.a<br />
LIBS += /opt/lib/libgsl.a /opt/lib/libgslcblas.a<br />
LIBS += /opt/lib/libxcf03.a /opt/lib/libxc.a<br />
LIBS += /opt/lib/libxsmmf.a /opt/lib/libxsmm.a<br />
LIBS += $(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br />
-Wl,--start-group \<br />
-lmkl_scalapack_lp64 \<br />
-lmkl_blacs_openmpi_lp64 \<br />
-lmkl_intel_lp64 \<br />
-lmkl_sequential \<br />
-lmkl_core \<br />
-Wl,--end-group<br />
LIBS += -lnetcdf -lhdf5_hl -lhdf5 -lz -lsymspg -ldl -liomp5 -lpthread -lstdc++ -lmpi_mpifh -lmpi_cxx -lmpi<br />
</pre><br />
<br />
Prepare for the regression tests<br />
module load mpi/openmpi4-x86_64-intel<br />
ulimit -c unlimited<br />
export OMPI_ALLOW_RUN_AS_ROOT=1<br />
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
export OMPI_MCA_btl=openib,self,vader<br />
export OMPI_MCA_pml=^ucx<br />
export FI_PROVIDER=ofi_rxm<br />
export FI_PROVIDER="verbs;ofi_rxm"<br />
<br />
<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 3<br><br />
Number of CORRECT tests 3198<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 3 3198 3 3204 X<br><br />
<br><br />
Summary: correct: 3198 / 3204; new: 3; wrong: 3; 8min<br><br />
Status: FAILED<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1278
CP2K compiling with Intel
2020-06-11T12:36:13Z
<p>David Dubbeldam: /* CP2K basic openmpi */</p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
<br />
edit ''Makefile'' in directory ''fortran''<br />
line 12 should read (''-lstdc++'' added)<br />
COMPUTE_LIB = -L../lib -lint2 -lstdc++<br />
line 37 change CXX to FC<br />
$(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^<br />
<br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
sudo make PREFIX=/usr/local FC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/ifort CC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icc CXX=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== CP2K ====<br />
<br />
<pre><br />
# Tested with: intel 19.1.1.217, OPENMPICH 4.0.3, OpenBLAS 0.3.0, ScaLAPACK 2.1.0, FFTW 3.3.8, Libint 2.6.0, Libxc 4.3.4, libxsmm 1.15, SPGLIB 1.12.2<br />
# Author: David Dubbeldam (d.dubbeldam@uva.nl, University of Amsterdam, May 2020)<br />
<br />
CC = icc<br />
FC = ifort<br />
LD = ifort<br />
AR = ar -r<br />
<br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -fp-model precise -I/opt/include<br />
<br />
DFLAGS = -D__MKL -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br />
<br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/opt/include<br />
FCFLAGS += -fp-model precise<br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br />
FCFLAGS += -I/opt/include -I/opt/lib/libint2-intel-max6/include<br />
<br />
LDFLAGS = $(FCFLAGS) -static-intel<br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br />
<br />
INTEL_MKL_LIB = ${MKLROOT}/lib/intel64<br />
<br />
LIBS = /opt/lib/libgsl.a /opt/lib/libgslcblas.a<br />
LIBS += /opt/lib/libxcf03.a /opt/lib/libxc.a<br />
LIBS += /opt/lib/libxsmmf.a /opt/lib/libxsmm.a<br />
LIBS += /opt/lib/libint2-intel-max6/lib/libint2.a<br />
LIBS += -Wl,--start-group \<br />
$(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br />
-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_lapack95_lp64 -lmkl_blas95_lp64 \<br />
-Wl,--end-group -lpthread -lm<br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br />
<br />
</pre><br />
<br />
Before running the test, raise the stack-limit to avoid segmentation faults.<br />
ulimit -s unlimited<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 4<br><br />
Number of CORRECT tests 3197<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 4 3197 3 3204 X<br><br />
<br><br />
Summary: correct: 3197 / 3204; new: 3; wrong: 4; 50min<br><br />
Status: FAILED<br />
</blockquote><br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="/usr/lib64/openmpi4-intel/bin/mpifort"<br />
export CC="/usr/lib64/openmpi4-intel/bin/mpicc"<br />
export CXX="/usr/lib64/openmpi4-intel/bin/mpicxx"<br />
export F77=${FC}<br />
export F90=${FC}<br />
module load mpi/openmpi4-x86_64-intel<br />
export OMPI_MCA_pml=^ucx<br />
export OMPI_MCA_btl=self,tcp<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
ulimit -s unlimited<br />
<br />
==== CP2K basic openmpi ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
# Tested with: intel 19.1.1.217, OPENMPICH 4.0.3, OpenBLAS 0.3.0, ScaLAPACK 2.1.0, FFTW 3.3.8, Libint 2.6.0, Libxc 4.3.4, libxsmm 1.15,SPGLIB 1.12.2<br><br />
# Author: David Dubbeldam (d.dubbeldam@uva.nl, University of Amsterdam, May 2020)<br><br />
<br><br />
CC = icc<br><br />
FC = ifort<br><br />
LD = ifort<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -fp-model precise -I/opt/include<br><br />
<br><br />
DFLAGS = -D__MKL -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/opt/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
FCFLAGS += -I/opt/include -I/opt/lib/libint2-intel-max6/include<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
INTEL_MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /opt/lib/libgsl.a /opt/lib/libgslcblas.a<br><br />
LIBS += /opt/lib/libxcf03.a /opt/lib/libxc.a<br><br />
LIBS += /opt/lib/libxsmmf.a /opt/lib/libxsmm.a<br><br />
LIBS += /opt/lib/libint2-intel-max6/lib/libint2.a<br><br />
LIBS += -Wl,--start-group \<br><br />
$(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_lapack95_lp64 -lmkl_blas95_lp64 \<br><br />
-Wl,--end-group -lpthread -lm<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br><br />
</blockquote><br />
<br />
Prepare for the regression tests<br />
module load mpi/openmpi4-x86_64-intel<br />
ulimit -c unlimited<br />
export OMPI_ALLOW_RUN_AS_ROOT=1<br />
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
export OMPI_MCA_btl=openib,self,vader<br />
export OMPI_MCA_pml=^ucx<br />
export FI_PROVIDER=ofi_rxm<br />
export FI_PROVIDER="verbs;ofi_rxm"<br />
<br />
<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 3<br><br />
Number of CORRECT tests 3198<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 3 3198 3 3204 X<br><br />
<br><br />
Summary: correct: 3198 / 3204; new: 3; wrong: 3; 8min<br><br />
Status: FAILED<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1277
CP2K compiling with Intel
2020-06-11T11:44:28Z
<p>David Dubbeldam: /* CP2K */</p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
<br />
edit ''Makefile'' in directory ''fortran''<br />
line 12 should read (''-lstdc++'' added)<br />
COMPUTE_LIB = -L../lib -lint2 -lstdc++<br />
line 37 change CXX to FC<br />
$(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^<br />
<br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
sudo make PREFIX=/usr/local FC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/ifort CC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icc CXX=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== CP2K ====<br />
<br />
<pre><br />
# Tested with: intel 19.1.1.217, OPENMPICH 4.0.3, OpenBLAS 0.3.0, ScaLAPACK 2.1.0, FFTW 3.3.8, Libint 2.6.0, Libxc 4.3.4, libxsmm 1.15, SPGLIB 1.12.2<br />
# Author: David Dubbeldam (d.dubbeldam@uva.nl, University of Amsterdam, May 2020)<br />
<br />
CC = icc<br />
FC = ifort<br />
LD = ifort<br />
AR = ar -r<br />
<br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -fp-model precise -I/opt/include<br />
<br />
DFLAGS = -D__MKL -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br />
<br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/opt/include<br />
FCFLAGS += -fp-model precise<br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br />
FCFLAGS += -I/opt/include -I/opt/lib/libint2-intel-max6/include<br />
<br />
LDFLAGS = $(FCFLAGS) -static-intel<br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br />
<br />
INTEL_MKL_LIB = ${MKLROOT}/lib/intel64<br />
<br />
LIBS = /opt/lib/libgsl.a /opt/lib/libgslcblas.a<br />
LIBS += /opt/lib/libxcf03.a /opt/lib/libxc.a<br />
LIBS += /opt/lib/libxsmmf.a /opt/lib/libxsmm.a<br />
LIBS += /opt/lib/libint2-intel-max6/lib/libint2.a<br />
LIBS += -Wl,--start-group \<br />
$(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br />
-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_lapack95_lp64 -lmkl_blas95_lp64 \<br />
-Wl,--end-group -lpthread -lm<br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br />
<br />
</pre><br />
<br />
Before running the test, raise the stack-limit to avoid segmentation faults.<br />
ulimit -s unlimited<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 4<br><br />
Number of CORRECT tests 3197<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 4 3197 3 3204 X<br><br />
<br><br />
Summary: correct: 3197 / 3204; new: 3; wrong: 4; 50min<br><br />
Status: FAILED<br />
</blockquote><br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="/usr/lib64/openmpi4-intel/bin/mpifort"<br />
export CC="/usr/lib64/openmpi4-intel/bin/mpicc"<br />
export CXX="/usr/lib64/openmpi4-intel/bin/mpicxx"<br />
export F77=${FC}<br />
export F90=${FC}<br />
module load mpi/openmpi4-x86_64-intel<br />
export OMPI_MCA_pml=^ucx<br />
export OMPI_MCA_btl=self,tcp<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
ulimit -s unlimited<br />
<br />
==== CP2K basic openmpi ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
# Tested with: intel 19.1.1.217, OPENMPICH 4.0.3, OpenBLAS 0.3.0, ScaLAPACK 2.1.0, FFTW 3.3.8, Libint 2.6.0, Libxc 4.3.4, libxsmm 1.15,SPGLIB 1.12.2<br><br />
# Author: David Dubbeldam (d.dubbeldam@uva.nl, University of Amsterdam, May 2020)<br><br />
<br><br />
CC = icc<br><br />
FC = ifort<br><br />
LD = ifort<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -fp-model precise -I/opt/include<br><br />
<br><br />
DFLAGS = -D__MKL -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/opt/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
FCFLAGS += -I/opt/include -I/opt/lib/libint2-intel-max6/include<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
INTEL_MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /opt/lib/libgsl.a /opt/lib/libgslcblas.a<br><br />
LIBS += /opt/lib/libxcf03.a /opt/lib/libxc.a<br><br />
LIBS += /opt/lib/libxsmmf.a /opt/lib/libxsmm.a<br><br />
LIBS += /opt/lib/libint2-intel-max6/lib/libint2.a<br><br />
LIBS += -Wl,--start-group \<br><br />
$(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_lapack95_lp64 -lmkl_blas95_lp64 \<br><br />
-Wl,--end-group -lpthread -lm<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br><br />
</blockquote><br />
<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 3<br><br />
Number of CORRECT tests 3198<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 3 3198 3 3204 X<br><br />
<br><br />
Summary: correct: 3198 / 3204; new: 3; wrong: 3; 8min<br><br />
Status: FAILED<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1276
CP2K compiling with Intel
2020-06-11T11:43:25Z
<p>David Dubbeldam: /* CP2K */</p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
<br />
edit ''Makefile'' in directory ''fortran''<br />
line 12 should read (''-lstdc++'' added)<br />
COMPUTE_LIB = -L../lib -lint2 -lstdc++<br />
line 37 change CXX to FC<br />
$(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^<br />
<br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
sudo make PREFIX=/usr/local FC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/ifort CC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icc CXX=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
<pre><br />
# Tested with: intel 19.1.1.217, OPENMPICH 4.0.3, OpenBLAS 0.3.0, ScaLAPACK 2.1.0, FFTW 3.3.8, Libint 2.6.0, Libxc 4.3.4, libxsmm 1.15, SPGLIB 1.12.2<br />
# Author: David Dubbeldam (d.dubbeldam@uva.nl, University of Amsterdam, May 2020)<br />
<br />
CC = icc<br />
FC = ifort<br />
LD = ifort<br />
AR = ar -r<br />
<br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -fp-model precise -I/opt/include<br />
<br />
DFLAGS = -D__MKL -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br />
<br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/opt/include<br />
FCFLAGS += -fp-model precise<br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br />
FCFLAGS += -I/opt/include -I/opt/lib/libint2-intel-max6/include<br />
<br />
LDFLAGS = $(FCFLAGS) -static-intel<br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br />
<br />
INTEL_MKL_LIB = ${MKLROOT}/lib/intel64<br />
<br />
LIBS = /opt/lib/libgsl.a /opt/lib/libgslcblas.a<br />
LIBS += /opt/lib/libxcf03.a /opt/lib/libxc.a<br />
LIBS += /opt/lib/libxsmmf.a /opt/lib/libxsmm.a<br />
LIBS += /opt/lib/libint2-intel-max6/lib/libint2.a<br />
LIBS += -Wl,--start-group \<br />
$(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br />
-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_lapack95_lp64 -lmkl_blas95_lp64 \<br />
-Wl,--end-group -lpthread -lm<br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br />
<br />
</pre><br />
</blockquote><br />
<br />
Before running the test, raise the stack-limit to avoid segmentation faults.<br />
ulimit -s unlimited<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 4<br><br />
Number of CORRECT tests 3197<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 4 3197 3 3204 X<br><br />
<br><br />
Summary: correct: 3197 / 3204; new: 3; wrong: 4; 50min<br><br />
Status: FAILED<br />
</blockquote><br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="/usr/lib64/openmpi4-intel/bin/mpifort"<br />
export CC="/usr/lib64/openmpi4-intel/bin/mpicc"<br />
export CXX="/usr/lib64/openmpi4-intel/bin/mpicxx"<br />
export F77=${FC}<br />
export F90=${FC}<br />
module load mpi/openmpi4-x86_64-intel<br />
export OMPI_MCA_pml=^ucx<br />
export OMPI_MCA_btl=self,tcp<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
ulimit -s unlimited<br />
<br />
==== CP2K basic openmpi ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
# Tested with: intel 19.1.1.217, OPENMPICH 4.0.3, OpenBLAS 0.3.0, ScaLAPACK 2.1.0, FFTW 3.3.8, Libint 2.6.0, Libxc 4.3.4, libxsmm 1.15,SPGLIB 1.12.2<br><br />
# Author: David Dubbeldam (d.dubbeldam@uva.nl, University of Amsterdam, May 2020)<br><br />
<br><br />
CC = icc<br><br />
FC = ifort<br><br />
LD = ifort<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -fp-model precise -I/opt/include<br><br />
<br><br />
DFLAGS = -D__MKL -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/opt/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
FCFLAGS += -I/opt/include -I/opt/lib/libint2-intel-max6/include<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
INTEL_MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /opt/lib/libgsl.a /opt/lib/libgslcblas.a<br><br />
LIBS += /opt/lib/libxcf03.a /opt/lib/libxc.a<br><br />
LIBS += /opt/lib/libxsmmf.a /opt/lib/libxsmm.a<br><br />
LIBS += /opt/lib/libint2-intel-max6/lib/libint2.a<br><br />
LIBS += -Wl,--start-group \<br><br />
$(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_lapack95_lp64 -lmkl_blas95_lp64 \<br><br />
-Wl,--end-group -lpthread -lm<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br><br />
</blockquote><br />
<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 3<br><br />
Number of CORRECT tests 3198<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 3 3198 3 3204 X<br><br />
<br><br />
Summary: correct: 3198 / 3204; new: 3; wrong: 3; 8min<br><br />
Status: FAILED<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1275
CP2K compiling with Intel
2020-06-11T11:42:10Z
<p>David Dubbeldam: /* CP2K */</p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
<br />
edit ''Makefile'' in directory ''fortran''<br />
line 12 should read (''-lstdc++'' added)<br />
COMPUTE_LIB = -L../lib -lint2 -lstdc++<br />
line 37 change CXX to FC<br />
$(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^<br />
<br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
sudo make PREFIX=/usr/local FC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/ifort CC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icc CXX=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
<pre><br />
# Tested with: intel 19.1.1.217, OPENMPICH 4.0.3, OpenBLAS 0.3.0, ScaLAPACK 2.1.0, FFTW 3.3.8, Libint 2.6.0, Libxc 4.3.4, libxsmm 1.15, SPGLIB 1.12.2<br />
# Author: David Dubbeldam (d.dubbeldam@uva.nl, University of Amsterdam, May 2020)<br />
<br />
CC = icc<br />
FC = ifort<br />
LD = ifort<br />
AR = ar -r<br />
<br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -fp-model precise -I/opt/include<br />
<br />
DFLAGS = -D__MKL -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br />
<br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/opt/include<br />
FCFLAGS += -fp-model precise<br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br />
FCFLAGS += -I/opt/include -I/opt/lib/libint2-intel-max6/include<br />
<br />
LDFLAGS = $(FCFLAGS) -static-intel<br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br />
<br />
INTEL_MKL_LIB = ${MKLROOT}/lib/intel64<br />
<br />
LIBS = /opt/lib/libgsl.a /opt/lib/libgslcblas.a<br />
LIBS += /opt/lib/libxcf03.a /opt/lib/libxc.a<br />
LIBS += /opt/lib/libxsmmf.a /opt/lib/libxsmm.a<br />
LIBS += /opt/lib/libint2-intel-max6/lib/libint2.a<br />
LIBS += -Wl,--start-group \<br />
$(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br />
-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_lapack95_lp64 -lmkl_blas95_lp64 \<br />
-Wl,--end-group -lpthread -lm<br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++ <br />
</pre><br />
</blockquote><br />
<br />
Before running the test, raise the stack-limit to avoid segmentation faults.<br />
ulimit -s unlimited<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 4<br><br />
Number of CORRECT tests 3197<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 4 3197 3 3204 X<br><br />
<br><br />
Summary: correct: 3197 / 3204; new: 3; wrong: 4; 50min<br><br />
Status: FAILED<br />
</blockquote><br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="/usr/lib64/openmpi4-intel/bin/mpifort"<br />
export CC="/usr/lib64/openmpi4-intel/bin/mpicc"<br />
export CXX="/usr/lib64/openmpi4-intel/bin/mpicxx"<br />
export F77=${FC}<br />
export F90=${FC}<br />
module load mpi/openmpi4-x86_64-intel<br />
export OMPI_MCA_pml=^ucx<br />
export OMPI_MCA_btl=self,tcp<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
ulimit -s unlimited<br />
<br />
==== CP2K basic openmpi ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
# Tested with: intel 19.1.1.217, OPENMPICH 4.0.3, OpenBLAS 0.3.0, ScaLAPACK 2.1.0, FFTW 3.3.8, Libint 2.6.0, Libxc 4.3.4, libxsmm 1.15,SPGLIB 1.12.2<br><br />
# Author: David Dubbeldam (d.dubbeldam@uva.nl, University of Amsterdam, May 2020)<br><br />
<br><br />
CC = icc<br><br />
FC = ifort<br><br />
LD = ifort<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -fp-model precise -I/opt/include<br><br />
<br><br />
DFLAGS = -D__MKL -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/opt/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
FCFLAGS += -I/opt/include -I/opt/lib/libint2-intel-max6/include<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
INTEL_MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /opt/lib/libgsl.a /opt/lib/libgslcblas.a<br><br />
LIBS += /opt/lib/libxcf03.a /opt/lib/libxc.a<br><br />
LIBS += /opt/lib/libxsmmf.a /opt/lib/libxsmm.a<br><br />
LIBS += /opt/lib/libint2-intel-max6/lib/libint2.a<br><br />
LIBS += -Wl,--start-group \<br><br />
$(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_lapack95_lp64 -lmkl_blas95_lp64 \<br><br />
-Wl,--end-group -lpthread -lm<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br><br />
</blockquote><br />
<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 3<br><br />
Number of CORRECT tests 3198<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 3 3198 3 3204 X<br><br />
<br><br />
Summary: correct: 3198 / 3204; new: 3; wrong: 3; 8min<br><br />
Status: FAILED<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1274
CP2K compiling with Intel
2020-06-11T11:32:36Z
<p>David Dubbeldam: </p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
<br />
edit ''Makefile'' in directory ''fortran''<br />
line 12 should read (''-lstdc++'' added)<br />
COMPUTE_LIB = -L../lib -lint2 -lstdc++<br />
line 37 change CXX to FC<br />
$(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^<br />
<br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
sudo make PREFIX=/usr/local FC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/ifort CC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icc CXX=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
CC = icc<br><br />
FC = ifort<br><br />
LD = ifort<br><br />
AR = ar -r<br><br />
<br><br />
DFLAGS = -D__MKL -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -I/usr/local/include<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/usr/local/include -L/usr/local/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += -Wl,--start-group \<br><br />
$(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_lapack95_lp64 -lmkl_blas95_lp64 \<br><br />
-Wl,--end-group -lpthread -lm<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br><br />
<br><br />
# Required due to memory leak that occurs if high optimisations are used<br><br />
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F<br><br />
$(FC) -c $(subst O2,O0,$(FCFLAGS)) $<<br />
</blockquote><br />
<br />
Before running the test, raise the stack-limit to avoid segmentation faults.<br />
ulimit -s unlimited<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 4<br><br />
Number of CORRECT tests 3197<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 4 3197 3 3204 X<br><br />
<br><br />
Summary: correct: 3197 / 3204; new: 3; wrong: 4; 50min<br><br />
Status: FAILED<br />
</blockquote><br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="/usr/lib64/openmpi4-intel/bin/mpifort"<br />
export CC="/usr/lib64/openmpi4-intel/bin/mpicc"<br />
export CXX="/usr/lib64/openmpi4-intel/bin/mpicxx"<br />
export F77=${FC}<br />
export F90=${FC}<br />
module load mpi/openmpi4-x86_64-intel<br />
export OMPI_MCA_pml=^ucx<br />
export OMPI_MCA_btl=self,tcp<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
ulimit -s unlimited<br />
<br />
==== CP2K basic openmpi ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
# Tested with: intel 19.1.1.217, OPENMPICH 4.0.3, OpenBLAS 0.3.0, ScaLAPACK 2.1.0, FFTW 3.3.8, Libint 2.6.0, Libxc 4.3.4, libxsmm 1.15,SPGLIB 1.12.2<br><br />
# Author: David Dubbeldam (d.dubbeldam@uva.nl, University of Amsterdam, May 2020)<br><br />
<br><br />
CC = icc<br><br />
FC = ifort<br><br />
LD = ifort<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -fp-model precise -I/opt/include<br><br />
<br><br />
DFLAGS = -D__MKL -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/opt/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
FCFLAGS += -I/opt/include -I/opt/lib/libint2-intel-max6/include<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
INTEL_MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /opt/lib/libgsl.a /opt/lib/libgslcblas.a<br><br />
LIBS += /opt/lib/libxcf03.a /opt/lib/libxc.a<br><br />
LIBS += /opt/lib/libxsmmf.a /opt/lib/libxsmm.a<br><br />
LIBS += /opt/lib/libint2-intel-max6/lib/libint2.a<br><br />
LIBS += -Wl,--start-group \<br><br />
$(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_lapack95_lp64 -lmkl_blas95_lp64 \<br><br />
-Wl,--end-group -lpthread -lm<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br><br />
</blockquote><br />
<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 3<br><br />
Number of CORRECT tests 3198<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 3 3198 3 3204 X<br><br />
<br><br />
Summary: correct: 3198 / 3204; new: 3; wrong: 3; 8min<br><br />
Status: FAILED<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1273
CP2K compiling with Intel
2020-06-11T11:18:15Z
<p>David Dubbeldam: /* CP2K */</p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
<br />
edit ''Makefile'' in directory ''fortran''<br />
line 12 should read (''-lstdc++'' added)<br />
COMPUTE_LIB = -L../lib -lint2 -lstdc++<br />
line 37 change CXX to FC<br />
$(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^<br />
<br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
sudo make PREFIX=/usr/local FC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/ifort CC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icc CXX=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
CC = icc<br><br />
FC = ifort<br><br />
LD = ifort<br><br />
AR = ar -r<br><br />
<br><br />
DFLAGS = -D__MKL -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -I/usr/local/include<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/usr/local/include -L/usr/local/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += -Wl,--start-group \<br><br />
$(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_lapack95_lp64 -lmkl_blas95_lp64 \<br><br />
-Wl,--end-group -lpthread -lm<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br><br />
<br><br />
# Required due to memory leak that occurs if high optimisations are used<br><br />
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F<br><br />
$(FC) -c $(subst O2,O0,$(FCFLAGS)) $<<br />
</blockquote><br />
<br />
Before running the test, raise the stack-limit to avoid segmentation faults.<br />
ulimit -s unlimited<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 4<br><br />
Number of CORRECT tests 3197<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 4 3197 3 3204 X<br><br />
<br><br />
Summary: correct: 3197 / 3204; new: 3; wrong: 4; 50min<br><br />
Status: FAILED<br />
</blockquote><br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="/usr/lib64/openmpi4-intel/bin/mpifort"<br />
export CC="/usr/lib64/openmpi4-intel/bin/mpicc"<br />
export CXX="/usr/lib64/openmpi4-intel/bin/mpicxx"<br />
export F77=${FC}<br />
export F90=${FC}<br />
module load mpi/openmpi4-x86_64-intel<br />
export OMPI_MCA_pml=^ucx<br />
export OMPI_MCA_btl=self,tcp<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
ulimit -s unlimited<br />
<br />
==== CP2K basic openmpi ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
CC = /usr/lib64/openmpi4-intel/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-intel/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-intel/bin/mpifort<br><br />
AR = xiar -r<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__MKL -D__FFTW3 -D__SPGLIB<br><br />
DFLAGS += -D__LIBXC -D__LIBINT -D__LIBXSMM<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -fp-model precise -I/usr/local/include<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/usr/local/include -L/usr/local/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
INTEL_MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += $(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-Wl,--start-group \<br><br />
$(INTEL_MKL_LIB)/libmkl_scalapack_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_blacs_openmpi_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_intel_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_sequential.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_core.a \<br><br />
-Wl,--end-group<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lm -lstdc++ -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
# Required due to memory leak that occurs if high optimisations are used<br><br />
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F<br><br />
$(FC) -c $(subst O2,O0,$(FCFLAGS)) $<<br />
</blockquote><br />
<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 3<br><br />
Number of WRONG tests 2<br><br />
Number of CORRECT tests 3264<br><br />
Number of NEW tests 0<br><br />
Total number of tests 3269<br><br />
GREPME 3 2 3264 0 3269 X<br><br />
<br><br />
Summary: correct: 3264 / 3269; wrong: 2; failed: 3; 61min<br><br />
Status: FAILED<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_GFortran&diff=1272
CP2K compiling with GFortran
2020-06-08T10:03:46Z
<p>David Dubbeldam: /* ParMETIS */</p>
<hr />
<div>Compiling <br />
<br />
== Caveats ==<br />
<br />
# the gcc version 4.8.5 mostly works, but fails for the plumed-part in CP2K (plumed itself compiles fine)<br />
# gcc version 9.1.1 fails (compiles but lots of CP2K unit tests fail, even with ''-O2 -g -mtune=generic'')<br />
# gcc version 8.3.1 works, but sometimes optimization needs to be reduced (e.g. gsl).<br />
<br />
== Compiling subpackages ==<br />
<br />
The following assumes that CP2K will be build from static libraries installed in /usr/local using the ''devtoolset-8'' on ''rocks'' (centos 7.4).<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
export CC=/opt/rh/devtoolset-8/root/usr/bin/gcc<br />
export CXX=/opt/rh/devtoolset-8/root/usr/bin/g++<br />
export F77=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
export FC=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
<br />
==== Blas and Lapack ====<br />
wget https://github.com/Reference-LAPACK/lapack/archive/v3.9.0.tar.gz<br />
mv v3.9.0.tar.gz lapack-3.9.0.tar.gz<br />
tar -zxvf lapack-3.9.0.tar.gz<br />
cd lapack-3.9.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_COMPILER=gfortran -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Result: 100% tests passed, 0 tests failed out of 103<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib64/libblas.a<br><br />
/usr/local/lib64/liblapack.a<br><br />
/usr/local/lib64/libtmglib.a<br />
</blockquote><br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=0 USE_OPENMP=0 NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
./configure CC=gcc CXX=g++x F77=gfortran FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --disable-shared --enable-static<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br><br />
</blockquote><br />
sudo make install<br />
<br />
The serial version is created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3.a<br><br />
</blockquote><br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1"<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="'''-O1''' -march=native -mno-avx512f" CFLAGS="'''-O1''' -march=native -mno-avx512f" CXXFLAGS="'''-O1''' -march=native -mno-avx512f" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
============================================================================<br><br />
Testsuite summary for gsl 2.6<br><br />
============================================================================<br><br />
all checks passed<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libgslcblas.a<br><br />
/usr/local/lib/libgsl.a<br />
</blockquote><br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="'''-O2''' -march=native -mno-avx512f" CFLAGS="'''-O2''' -march=native -mno-avx512f" CXXFLAGS="'''-O2''' -march=native -mno-avx512f" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -march=native -mno-avx512f"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
make PREFIX=/usr/local FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== libvdwxc ====<br />
Libvdwxc is a general library for evaluating energy and potential for exchange-correlation (XC) functionals from the vdW-DF.<br />
wget https://www.cp2k.org/static/downloads/libvdwxc-0.4.0.tar.gz<br />
tar -zxvf libvdwxc-0.4.0.tar.gz<br />
./configure CC=gcc FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" FFTW3_INCLUDES="-I/usr/local/include/" FFTW3_LIBS="/usr/local/lib/libfftw3.a" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes<br />
make -j 24<br />
make check<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libvdwxcfort.a<br><br />
/usr/local/lib/libvdwxc.a<br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== Spglib ====<br />
A library for finding and handling crystal symmetries<br />
wget https://github.com/spglib/spglib/archive/v1.11.2.1.tar.gz<br />
mv v1.11.2.1.tar.gz spglib-v1.11.2.1.tar.gz<br />
tar -zxvf spglib-v1.11.2.1.tar.gz<br />
cd spglib-1.11.2.1<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsymspg.a<br />
</blockquote><br />
<br />
Rocks/Centos/RH 7 provides precompiled packages<br />
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/s/spglib-1.11.1-2.el7.x86_64.rpm<br />
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/s/spglib-devel-1.11.1-2.el7.x86_64.rpm<br />
sudo rpm -ivh spglib-1.11.1-2.el7.x86_64.rpm spglib-devel-1.11.1-2.el7.x86_64.rpm<br />
<br />
<br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
CC = gcc<br><br />
FC = gfortran<br><br />
LD = gfortran<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O2 -march=native -mno-avx512f -I/usr/local/include -L/usr/local/include<br><br />
<br><br />
DFLAGS = -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libopenblas.a<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
make ARCH=local VERSION=sopt test<br />
<blockquote style="background-color: lightgreen; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3201<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 0 3201 3 3204 X<br><br />
<br><br />
Summary: correct: 3201 / 3204; new: 3; 27min<br><br />
Status: OK<br />
</blockquote><br />
<br />
=== OpenMP ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
export CC=/opt/rh/devtoolset-8/root/usr/bin/gcc<br />
export CXX=/opt/rh/devtoolset-8/root/usr/bin/g++<br />
export F77=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
export FC=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=1 USE_OPENMP=1 NUM_THREADS=64 LIBNAMESUFFIX=omp NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local LIBNAMESUFFIX=omp NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas_omp.a<br />
</blockquote><br />
<br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
./configure CC=gcc CXX=g++x F77=gfortran FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-openmp --disable-shared --enable-static --enable-threads<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br />
FFTW threaded transforms passed basic tests!<br />
</blockquote><br />
sudo make install<br />
<br />
The serial version is created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3_omp.a<br><br />
/usr/local/lib/libfftw3_threads.a<br />
</blockquote><br />
<br />
==== Elpa ====<br />
ELPA replaces the ScaLapack SYEVD to improve the performance of Eigen-vector/value problems.<br />
wget http://elpa.mpcdf.mpg.de/html/Releases/2019.11.001/elpa-2019.11.001.tar.gz<br />
tar -zxvf elpa-2019.11.001.tar.gz<br />
cd elpa-2019.11.001<br />
./configure FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes --enable-openmp=yes --disable-avx512<br />
''hack'': change ''LIBS'' in Makefile: ''LIBS = /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas_omp.a''<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
some skipped, all others passed<br />
</blockquote> <br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa_constants.mod<br><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa_api.mod<br><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa.mod<br><br />
/usr/local/lib/libelpa_openmp.a<br />
</blockquote><br />
<br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
module load mpi/openmpi4-x86_64-gcc8<br />
export CC=/usr/lib64/openmpi4-gcc8/bin/mpicc<br />
export CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx<br />
export F77=/usr/lib64/openmpi4-gcc8/bin/mpif77<br />
export FC=/usr/lib64/openmpi4-gcc8/bin/mpifort<br />
<br />
Allow ''infiniband'' and ''vader'' to run<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Note that the used MPI installation must match the used Fortran compiler. If not, then MPI needs to be recompiled using the same compiler.<br />
</blockquote><br />
<br />
<br />
==== Blas and Lapack ====<br />
Lapack is needed for SIRIUS<br />
wget https://github.com/Reference-LAPACK/lapack/archive/v3.9.0.tar.gz<br />
mv v3.9.0.tar.gz lapack-3.9.0.tar.gz<br />
tar -zxvf lapack-3.9.0.tar.gz<br />
cd lapack-3.9.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_COMPILER=gfortran -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Result: 100% tests passed, 0 tests failed out of 103<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib64/libblas.a<br><br />
/usr/local/lib64/liblapack.a<br><br />
/usr/local/lib64/libtmglib.a<br />
</blockquote><br />
<br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=0 USE_OPENMP=0 NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
==== Scalapack ====<br />
wget https://www.cp2k.org/static/downloads/scalapack-2.1.0.tgz<br />
tar -zxvf scalapack-2.1.0.tgz<br />
scalapack-2.1.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_C_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_BUILD_TYPE=Release -DMPI_BASE_DIR=/usr/lib64/openmpi4-gcc9/lib -DMPI_INCLUDE_PATH=/usr/include/openmpi4-x86_64-gcc8 -DMPIEXEC=/usr/lib64/openmpi4-gcc8/bin/mpiexec -DBLAS_LIBRARIES=/usr/local/lib/libopenblas.a -DLAPACK_LIBRARIES=/usr/local/lib/libopenblas.a -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
100% tests passed, 0 tests failed out of 96<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/linscalapack.a<br />
</blockquote><br />
<br />
==== COSMA ====<br />
Distributed Communication-Optimal Matrix-Matrix Multiplication Algorithm. COSMA is a replacement of the ''pdgemm'' routine included in scalapack.<br />
git clone --recursive https://github.com/eth-cscs/COSMA cosma <br />
cd cosma<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_INCLUDEDIR=/usr/local/include -DCMAKE_BUILD_TYPE=Release -DCOSMA_BLAS=OPENBLAS -DCOSMA_SCALAPACK=CUSTOM -DBUILD_SHARED_LIBS=OFF -DSCALAPACK_LIBRARIES="/usr/local/lib/libscalapack.a;/usr/local/lib/libopenblas.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libquadmath.a" -DOPENBLAS_LIBRARIES="/usr/local/lib/libopenblas.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a"<br />
make test<br />
<br />
<blockquote style="background-color: red; border: solid thin grey;"><br />
20% tests passed, 4 tests failed out of 5<br><br />
<br><br />
Total Test time (real) = 7.99 sec<br><br />
<br><br />
The following tests FAILED:<br><br />
2 - test.multiply_using_layout (Failed)<br><br />
3 - test.multiply (Failed)<br><br />
4 - test.scalar_matmul (Failed)<br><br />
5 - test.pdgemm (Failed)<br><br />
Errors while running CTest<br><br />
</blockquote><br />
<br />
Place the library in front of the scalapack library during linking time.<br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
module load mpi/openmpi4-x86_64-gcc8<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
export OMPI_MCA_btl=openib,self,vader<br />
export OMPI_MCA_pml=^ucx <br />
./configure CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx F77=/usr/lib64/openmpi4-gcc8/bin/mpifort FC=/usr/lib64/openmpi4-gcc8/bin/mpifort FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-openmp --enable-mpi --disable-shared --enable-static --enable-threads<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br><br />
FFTW threaded transforms passed basic tests!<br><br />
MPI FFTW transforms passed 10 tests, 1 CPU<br><br />
MPI FFTW transforms passed 10 tests, 2 CPUs<br><br />
MPI FFTW transforms passed 10 tests, 3 CPUs<br><br />
MPI FFTW transforms passed 10 tests, 4 CPUs<br><br />
MPI FFTW threaded transforms passed 10 tests!<br />
</blockquote><br />
sudo make install<br />
<br />
The serial, mpi, threaded, and openmp versions are created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3.a<br><br />
/usr/local/lib/libftw3_mpi.a<br> <br />
/usr/local/lib/libfftw3_omp.a<br><br />
/usr/local/lib/libfftw3_threads.a <br />
</blockquote><br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1"<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="'''-O1''' -march=native -mno-avx512f" CFLAGS="'''-O1''' -march=native -mno-avx512f" CXXFLAGS="'''-O1''' -march=native -mno-avx512f" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
============================================================================<br><br />
Testsuite summary for gsl 2.6<br><br />
============================================================================<br><br />
all checks passed<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libgslcblas.a<br><br />
/usr/local/lib/libgsl.a<br />
</blockquote><br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="'''-O2''' -march=native -mno-avx512f" CFLAGS="'''-O2''' -march=native -mno-avx512f" CXXFLAGS="'''-O2''' -march=native -mno-avx512f" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -march=native -mno-avx512f"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
make PREFIX=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== libvdwxc ====<br />
Libvdwxc is a general library for evaluating energy and potential for exchange-correlation (XC) functionals from the vdW-DF.<br />
wget https://www.cp2k.org/static/downloads/libvdwxc-0.4.0.tar.gz<br />
tar -zxvf libvdwxc-0.4.0.tar.gz<br />
./configure CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort FCFLAGS="-O3 -march=native -mno-avx512f" FFTW3_INCLUDES="-I/usr/local/include/" FFTW3_LIBS="/usr/local/lib/libfftw3_mpi.a /usr/local/lib/libfftw3.a" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes<br />
make -j 24<br />
make check<br />
sudo make install<br />
<br />
<br />
==== METIS ====<br />
tar -zxvf parmetis-4.0.3.tar.gz<br />
cd parmetis-4.0.3<br />
cd metis<br />
make config prefix=/share/apps/METIS CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 24<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/share/apps/METIS/lib/libmetis.a<br />
</blockquote><br />
<br />
==== ParMETIS ====<br />
wget https://www.cp2k.org/static/downloads/parmetis-4.0.3.tar.gz<br />
tar -zxvf parmetis-4.0.3.tar.gz<br />
cd parmetis-4.0.3<br />
make config prefix=/share/apps/ParMETIS CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 24<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/share/apps/ParMETIS/lib/libparmetis.a<br />
</blockquote><br />
<br />
==== Superlu-6.1.1 ====<br />
wget https://github.com/xiaoyeli/superlu_dist/archive/v6.1.1.tar.gz<br />
mv v6.1.1.tar.gz superlu_dist_6.1.1.tar.gz<br />
tar -zxvf superlu_dist_6.1.1.tar.gz<br />
mkdir build1<br />
cd build1<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DTPL_PARMETIS_LIBRARIES="-L/share/apps/METIS/lib -L/share/apps/ParMETIS/lib /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a -pthread -Wl,-rpath -Wl,/usr/lib64/openmpi4-gcc8/lib -Wl,--enable-new-dtags -L/usr/lib64/openmpi4-gcc8/lib -lmpi_mpifh -lmpi_cxx -lmpi" -DTPL_PARMETIS_INCLUDE_DIRS=/share/apps/ParMETIS/include -DBUILD_STATIC_LIBS=OFF -DCMAKE_C_FLAGS="-std=c99 -O3 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DTPL_LAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DTPL_BLAS_LIBRARIES=/usr/local/lib/libopenblas.a<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 24 tests passed<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsuperlu_dist.a<br />
</blockquote><br />
<br />
==== Superlu-5.1.2 ====<br />
wget http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_dist_5.1.2.tar.gz<br />
tar -zxvf superlu_dist_5.1.2.tar.gz<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DTPL_PARMETIS_LIBRARIES="-L/share/apps/METIS/lib -L/share/apps/ParMETIS/lib /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a -pthread -Wl,-rpath -Wl,/usr/lib64/openmpi4-gcc8/lib -Wl,--enable-new-dtags -L/usr/lib64/openmpi4-gcc8/lib -lmpi_mpifh -lmpi_cxx -lmpi" -DTPL_PARMETIS_INCLUDE_DIRS=/share/apps/ParMETIS/include -DCMAKE_C_FLAGS="-std=c99 -O3 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DTPL_BLAS_LIBRARIES=/usr/local/lib/libopenblas_omp.a<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Running tests...<br><br />
Test project /usr/local/src/SuperLU_DIST_5.1.2/build<br><br />
Start 1: pddrive<br><br />
1/2 Test #1: pddrive .......................... Passed 79.70 sec<br><br />
Start 2: pddrive1<br><br />
2/2 Test #2: pddrive1 ......................... Passed 78.40 sec<br><br />
<br><br />
100% tests passed, 0 tests failed out of 2<br><br />
<br><br />
Total Test time (real) = 158.10 sec<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsuperlu_dist.a<br />
</blockquote><br />
<br />
<br />
==== Elpa ====<br />
ELPA replaces the ScaLapack SYEVD to improve the performance of Eigen-vector/value problems.<br />
wget http://elpa.mpcdf.mpg.de/html/Releases/2019.11.001/elpa-2019.11.001.tar.gz<br />
tar -zxvf elpa-2019.11.001.tar.gz<br />
cd elpa-2019.11.001<br />
./configure FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes --enable-openmp=no --disable-avx512<br />
''hack'': change ''LIBS'' in Makefile: ''LIBS = /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a''<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
some skipped, all others passed<br />
</blockquote> <br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/include/elpa-2019.11.001/modules/elpa_constants.mod<br><br />
/usr/local/include/elpa-2019.11.001/modules/elpa_api.mod<br><br />
/usr/local/include/elpa-2019.11.001/modules/elpa.mod<br><br />
/usr/local/lib/libelpa.a<br />
</blockquote><br />
<br />
==== Pexsi 1.2 ====<br />
The source code must be edited for use with openmpi-4.<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
MPI_Address &#8594; MPI_Get_address<br><br />
MPI_Type_hindexed &#8594; MPI_Type_create_hindexed<br><br />
MPI_Type_struct &#8594; MPI_Type_create_struct<br><br />
MPI_Errhandler_set&#8594; remove lines<br />
</blockquote><br />
The Pole EXpansion and Selected Inversion (PEXSI) method requires the PEXSI library and two dependencies (ParMETIS and SuperLU_DIST).<br />
wget https://www.cp2k.org/static/downloads/pexsi_v1.2.0.tar.gz<br />
tar -zxvf pexsi_v1.2.0.tar.gz<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DMETIS_LIBRARIES=/share/apps/METIS/lib/libmetis.a -DPARMETIS_LIBRARIES=/share/apps/ParMETIS/lib/libparmetis.a -Dlinalg_BLAS_LIBRARIES=/usr/local/lib/libopenblas.a -Dlinalg_LAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DCMAKE_CXX_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_C_FLAGS="-std=c99 -O2 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
<br />
edit ''cmake/modules/FindLinAlg.cmake'' uncomment line 373 and 375.<br />
<br />
make -j 24<br />
sudo make install<br />
sudo make finstall<br />
<br />
==== Pexsi 0.10.2 ====<br />
cp config/make.inc.linux.gnu ./make.inc<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PAR_ND_LIBRARY = parmetis<br><br />
SEQ_ND_LIBRARY = metis<br><br />
<br><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
CXX = /usr/lib64/openmpi4-gcc8/bin/mpicxx<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LOADER = /usr/lib64/openmpi4-gcc8/bin/mpicxx<br><br />
<br><br />
DSUPERLU_DIR = /usr/local<br><br />
METIS_DIR = /share/apps/METIS<br><br />
PARMETIS_DIR = /share/apps/ParMETIS<br><br />
<br><br />
DSUPERLU_INCLUDE = -I/usr/local/include<br><br />
<br><br />
GFORTRAN_LIB = /opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a<br><br />
LAPACK_LIB = /usr/local/lib/libscalapack.a<br><br />
BLAS_LIB = /usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
The source code must be edited for use with openmpi-4.<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
MPI_Address &#8594; MPI_Get_address<br><br />
MPI_Type_hindexed &#8594; MPI_Type_create_hindexed<br><br />
MPI_Type_struct &#8594; MPI_Type_create_struct<br><br />
</blockquote><br />
<br />
make<br />
make install<br />
sudo cp /usr/local/src/pexsi_v0.10.2/build/lib/libpexsi_linux_v0.10.2.a /usr/local/lib<br />
sudo cp /usr/local/src/pexsi_v0.10.2/build/include/* /usr/local/include/<br />
<br />
==== SpFFT ====<br />
Needed in SIRIUS.<br />
wget https://github.com/eth-cscs/SpFFT/archive/v0.9.9.tar.gz<br />
mv v0.9.9.tar.gz SpFFT-0.9.9.tar.gz<br />
tar -zxvf SpFFT-0.9.9.tar.gz<br />
cd SpFFT-0.9.9<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE -DSPFFT_OMP=ON -DSPFFT_MPI=ON -DSPFFT_INSTALL=ON -DSPFFT_STATIC=ON<br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libspfft.a<br />
</blockquote><br />
<br />
==== SIRIUS 6.5.3 ====<br />
SIRIUS is a domain specific library for electronic structure calculations.<br />
wget https://github.com/electronic-structure/SIRIUS/archive/v6.5.3.tar.gz<br />
mv v6.5.3.tar.gz SIRIUS-v6.5.3.tar.gz<br />
tar -zxvf SIRIUS-v6.5.3.tar.gz<br />
cd SIRIUS-6.5.3<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/share/apps/SIRIUS -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DGSL_CBLAS_LIBRARY=/usr/local/lib/libgsl.a -DGSL_CBLAS_LIBRARY_DEBUG=/usr/local/lib/libgslcblas.a -DGSL_LIBRARY=/usr/local/lib/libgsl.a -DGSL_LIBRARY_DEBUG=/usr/local/lib/libgsl.a -DUSE_ELPA=ON -DELPA_INCLUDE_DIR=/usr/local/include/elpa-2019.11.001/elpa -DELPA_LIBRARIES="/usr/local/lib/libelpa.a;/usr/local/lib/libscalapack.a;/usr/local/lib/libopenblas.a" -DUSE_VDWXC=ON -DLIBVDWXC_LIBRARIES="/usr/local/lib/libvdwxc.a;/usr/local/lib/libfftw3.a"<br />
make -j 24<br />
make install<br />
<br />
==== SIRIUS 6.3.2 ====<br />
wget https://www.cp2k.org/static/downloads/SIRIUS-6.3.2.tar.gz<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/share/apps/SIRIUS -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DUSE_SCALAPACK=ON -DSCALAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DBLAS_openblas_LIBRARY=/usr/local/lib/libopenblas.a -DLAPACK_openblas_LIBRARY=/usr/local/lib/libopenblas.a -DGSL_CBLAS_LIBRARY=/usr/local/lib/libgsl.a -DGSL_CBLAS_LIBRARY_DEBUG=/usr/local/lib/libgslcblas.a -DGSL_LIBRARY=/usr/local/lib/libgsl.a -DGSL_LIBRARY_DEBUG=/usr/local/lib/libgsl.a<br />
make -j 24<br />
make install -j 24<br />
cp src/mod_files/sirius.mod /share/apps/SIRIUS/include/<br />
<br />
==== Plumed ====<br />
Library that enables various enhanced sampling methods.<br />
tar -zxvf plumed-2.6.0.tgz<br />
./configure --prefix=/share/apps/plumed/plumed-2.6.0 --enable-shared=no<br />
<br />
change in Makefile.conf<br />
DYNAMIC_LIBS= -lstdc++ -lfftw3 -lgsl -lgslcblas -lz -ldl -llapack -lblas -fopenmp<br />
to<br />
DYNAMIC_LIBS= -lstdc++ /usr/local/lib/libfftw3.a /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a -lz -ldl /usr/local/lib/libopenblas_omp.a -fopenmp -lgfortran<br />
<br />
make -j 24<br />
make install<br />
<br />
==== QUIP ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Do not build using parallel-make<br />
</blockquote><br />
QUantum mechanics and Interatomic Potentials allows for a wider range of interaction potentials.<br />
<br />
wget https://www.cp2k.org/static/downloads/QUIP-cc83ceea5776c40fcb5ab224a25ab04d62175449.zip<br />
export QUIP_ARCH=linux_x86_64_gfortran_openmpi<br />
<br />
make config<br />
<br />
Please enter the linking options for LAPACK and BLAS libraries:<br />
fill in /usr/local/lib/libopenblas.a<br />
Do you want to compile with CP2K support? y<br><br />
Do you want to compile with VASP support? y<br><br />
Do you want to compile with Tight Binding (TB) support? y<br><br />
Please enter directories where METIS libraries are kept:<br />
fill in /share/apps/METIS/lib/<br />
<br />
make libquip<br />
mkdir -p /share/apps/QUIP/QUIP-2015<br />
make PREFIX=/share/apps/QUIP/QUIP-2015 QUIP_INSTALLDIR=/share/apps/QUIP/QUIP-2015 install<br />
mkdir /share/apps/QUIP/QUIP-2015/include/<br />
cp build/linux_x86_64_gfortran_openmpi/quip_unified_wrapper_module.mod /share/apps/QUIP/QUIP-2015/include/<br />
mkdir /share/apps/QUIP/QUIP-2015/lib/<br />
cp build/linux_x86_64_gfortran_openmpi/*.a /share/apps/QUIP/QUIP-2015/lib<br />
cp src/FoX-4.0.3/objs.linux_x86_64_gfortran_openmpi/lib/libFoX_*.a /share/apps/QUIP/QUIP-2015/lib<br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O2 -g -march=native -mno-avx512f -I/usr/local/include/ -L/usr/local/include/<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include -I/share/apps/QUIP/QUIP-2015/include/ -I/share/apps/METIS/include/ -I/share/apps/ParMETIS/include -I/share/apps/plumed/plumed-2.6.0/include/ -I/share/apps/SIRIUS/include/<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++ -lgomp -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightgreen; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3261<br><br />
Number of NEW tests 8<br><br />
Total number of tests 3269<br><br />
GREPME 0 0 3261 8 3269 X<br><br />
<br><br />
Summary: correct: 3261 / 3269; new: 8; 38min<br><br />
Status: OK<br />
</blockquote><br />
<br />
<br />
To solve SIRIUS warnings in the top of the output, use the latest version of SIRIUS and modify the following cp2k source files:<br />
cd cp2k-7.1<br />
cd src<br />
wget https://raw.githubusercontent.com/cp2k/cp2k/b1fc8cddc7ca9b30bf6de29e87ac9e3f14c60136/src/sirius_interface.F<br />
wget https://raw.githubusercontent.com/cp2k/cp2k/b1fc8cddc7ca9b30bf6de29e87ac9e3f14c60136/src/input_cp2k_pwdft.F<br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
# Tested with: GFortran 8.3.1, OPENMPICH 4.0.3, OpenBLAS 0.3.0, ScaLAPACK 2.1.0, FFTW 3.3.8, Libint 2.6.0, Libxc 4.3.4, libxsmm 1.15,<br><br />
# ELPA 2019.11.001, PLUMED 2.6.0, SPGLIB 1.12.2, QUIP-2015, ParMETIS-4.0.3, Pexsi-1.2.0, SIRIUS 6.5.3, SpFFT 0.9.9, libvdw 0.4.0<br><br />
# Author: David Dubbeldam (d.dubbeldam@uva.nl, University of Amsterdam, May 2020)<br><br />
<br><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O2 -g -march =native -mno-avx512f -I/usr/local/include/ -L/usr/local/include/<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
DFLAGS += -D__SIRIUS -D__PLUMED2 -D__QUIP -D__LIBPEXSI -D__ELPA<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include -I/share/apps/QUIP/QUIP-2015/include/ -I/share/apps/METIS/include/ -I/share/apps/ParMETIS/include<br><br />
FCFLAGS += -I/share/apps/plumed/plumed-2.6.0/include/ -I/share/apps/SIRIUS/include/sirius<br><br />
FCFLAGS += -I/usr/local/include/elpa-2019.11.001/elpa -I/usr/local/include/elpa-2019.11.001/modules<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = $(PLUMED_DEPENDENCIES) /share/apps/plumed/plumed-2.6.0/lib/libplumed.a<br><br />
LIBS += /usr/local/lib/libelpa.a<br><br />
LIBS += /usr/local/lib64/libpexsi.a<br><br />
LIBS += /share/apps/SIRIUS/lib64/libsirius.a<br><br />
LIBS += /usr/local/lib/libspfft.a<br><br />
LIBS += /usr/local/lib/libvdwxc.a<br><br />
LIBS += /usr/local/lib64/libsuperlu_dist.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libquip_core.a /share/apps/QUIP/QUIP-2015/lib/libatoms.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_sax.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_common.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_utils.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_fsys.a<br><br />
LIBS += /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a<br><br />
LIBS += /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a<br><br />
LIBS += -lnetcdf -lhdf5_hl -lhdf5 -lz -lsymspg -ldl -lpthread -lstdc++ -lgomp -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
All tests are fine, but the regression-test hangs on one job, after killing it the test results are<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Summary --------------------------------<br><br />
Number of FAILED tests 1<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3285<br><br />
Number of NEW tests 0<br><br />
Total number of tests 3286<br><br />
GREPME 1 0 3285 0 3286 X<br><br />
<br><br />
Summary: correct: 3285 / 3286; failed: 1; 95min<br><br />
Status: FAILED<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=Rpm_commands&diff=1271
Rpm commands
2020-06-07T11:22:33Z
<p>David Dubbeldam: </p>
<hr />
<div><br />
Remove all rpms that contain the string "intel"<br />
rpm -qa | grep intel | while read -r line; do yum remove -y $line; done<br />
<br />
<br />
Create rpm package<br />
fpm -s dir -t rpm -C /usr/local/libint/ --name libint2 --version 2.6.0 --iteration 1 --description "A library for efficient evaluation of electron repulsion integrals" .</div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_GFortran&diff=1270
CP2K compiling with GFortran
2020-06-07T08:57:12Z
<p>David Dubbeldam: /* fftw */</p>
<hr />
<div>Compiling <br />
<br />
== Caveats ==<br />
<br />
# the gcc version 4.8.5 mostly works, but fails for the plumed-part in CP2K (plumed itself compiles fine)<br />
# gcc version 9.1.1 fails (compiles but lots of CP2K unit tests fail, even with ''-O2 -g -mtune=generic'')<br />
# gcc version 8.3.1 works, but sometimes optimization needs to be reduced (e.g. gsl).<br />
<br />
== Compiling subpackages ==<br />
<br />
The following assumes that CP2K will be build from static libraries installed in /usr/local using the ''devtoolset-8'' on ''rocks'' (centos 7.4).<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
export CC=/opt/rh/devtoolset-8/root/usr/bin/gcc<br />
export CXX=/opt/rh/devtoolset-8/root/usr/bin/g++<br />
export F77=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
export FC=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
<br />
==== Blas and Lapack ====<br />
wget https://github.com/Reference-LAPACK/lapack/archive/v3.9.0.tar.gz<br />
mv v3.9.0.tar.gz lapack-3.9.0.tar.gz<br />
tar -zxvf lapack-3.9.0.tar.gz<br />
cd lapack-3.9.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_COMPILER=gfortran -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Result: 100% tests passed, 0 tests failed out of 103<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib64/libblas.a<br><br />
/usr/local/lib64/liblapack.a<br><br />
/usr/local/lib64/libtmglib.a<br />
</blockquote><br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=0 USE_OPENMP=0 NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
./configure CC=gcc CXX=g++x F77=gfortran FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --disable-shared --enable-static<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br><br />
</blockquote><br />
sudo make install<br />
<br />
The serial version is created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3.a<br><br />
</blockquote><br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1"<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="'''-O1''' -march=native -mno-avx512f" CFLAGS="'''-O1''' -march=native -mno-avx512f" CXXFLAGS="'''-O1''' -march=native -mno-avx512f" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
============================================================================<br><br />
Testsuite summary for gsl 2.6<br><br />
============================================================================<br><br />
all checks passed<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libgslcblas.a<br><br />
/usr/local/lib/libgsl.a<br />
</blockquote><br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="'''-O2''' -march=native -mno-avx512f" CFLAGS="'''-O2''' -march=native -mno-avx512f" CXXFLAGS="'''-O2''' -march=native -mno-avx512f" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -march=native -mno-avx512f"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
make PREFIX=/usr/local FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== libvdwxc ====<br />
Libvdwxc is a general library for evaluating energy and potential for exchange-correlation (XC) functionals from the vdW-DF.<br />
wget https://www.cp2k.org/static/downloads/libvdwxc-0.4.0.tar.gz<br />
tar -zxvf libvdwxc-0.4.0.tar.gz<br />
./configure CC=gcc FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" FFTW3_INCLUDES="-I/usr/local/include/" FFTW3_LIBS="/usr/local/lib/libfftw3.a" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes<br />
make -j 24<br />
make check<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libvdwxcfort.a<br><br />
/usr/local/lib/libvdwxc.a<br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== Spglib ====<br />
A library for finding and handling crystal symmetries<br />
wget https://github.com/spglib/spglib/archive/v1.11.2.1.tar.gz<br />
mv v1.11.2.1.tar.gz spglib-v1.11.2.1.tar.gz<br />
tar -zxvf spglib-v1.11.2.1.tar.gz<br />
cd spglib-1.11.2.1<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsymspg.a<br />
</blockquote><br />
<br />
Rocks/Centos/RH 7 provides precompiled packages<br />
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/s/spglib-1.11.1-2.el7.x86_64.rpm<br />
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/s/spglib-devel-1.11.1-2.el7.x86_64.rpm<br />
sudo rpm -ivh spglib-1.11.1-2.el7.x86_64.rpm spglib-devel-1.11.1-2.el7.x86_64.rpm<br />
<br />
<br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
CC = gcc<br><br />
FC = gfortran<br><br />
LD = gfortran<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O2 -march=native -mno-avx512f -I/usr/local/include -L/usr/local/include<br><br />
<br><br />
DFLAGS = -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libopenblas.a<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
make ARCH=local VERSION=sopt test<br />
<blockquote style="background-color: lightgreen; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3201<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 0 3201 3 3204 X<br><br />
<br><br />
Summary: correct: 3201 / 3204; new: 3; 27min<br><br />
Status: OK<br />
</blockquote><br />
<br />
=== OpenMP ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
export CC=/opt/rh/devtoolset-8/root/usr/bin/gcc<br />
export CXX=/opt/rh/devtoolset-8/root/usr/bin/g++<br />
export F77=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
export FC=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=1 USE_OPENMP=1 NUM_THREADS=64 LIBNAMESUFFIX=omp NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local LIBNAMESUFFIX=omp NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas_omp.a<br />
</blockquote><br />
<br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
./configure CC=gcc CXX=g++x F77=gfortran FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-openmp --disable-shared --enable-static --enable-threads<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br />
FFTW threaded transforms passed basic tests!<br />
</blockquote><br />
sudo make install<br />
<br />
The serial version is created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3_omp.a<br><br />
/usr/local/lib/libfftw3_threads.a<br />
</blockquote><br />
<br />
==== Elpa ====<br />
ELPA replaces the ScaLapack SYEVD to improve the performance of Eigen-vector/value problems.<br />
wget http://elpa.mpcdf.mpg.de/html/Releases/2019.11.001/elpa-2019.11.001.tar.gz<br />
tar -zxvf elpa-2019.11.001.tar.gz<br />
cd elpa-2019.11.001<br />
./configure FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes --enable-openmp=yes --disable-avx512<br />
''hack'': change ''LIBS'' in Makefile: ''LIBS = /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas_omp.a''<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
some skipped, all others passed<br />
</blockquote> <br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa_constants.mod<br><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa_api.mod<br><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa.mod<br><br />
/usr/local/lib/libelpa_openmp.a<br />
</blockquote><br />
<br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
module load mpi/openmpi4-x86_64-gcc8<br />
export CC=/usr/lib64/openmpi4-gcc8/bin/mpicc<br />
export CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx<br />
export F77=/usr/lib64/openmpi4-gcc8/bin/mpif77<br />
export FC=/usr/lib64/openmpi4-gcc8/bin/mpifort<br />
<br />
Allow ''infiniband'' and ''vader'' to run<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Note that the used MPI installation must match the used Fortran compiler. If not, then MPI needs to be recompiled using the same compiler.<br />
</blockquote><br />
<br />
<br />
==== Blas and Lapack ====<br />
Lapack is needed for SIRIUS<br />
wget https://github.com/Reference-LAPACK/lapack/archive/v3.9.0.tar.gz<br />
mv v3.9.0.tar.gz lapack-3.9.0.tar.gz<br />
tar -zxvf lapack-3.9.0.tar.gz<br />
cd lapack-3.9.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_COMPILER=gfortran -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Result: 100% tests passed, 0 tests failed out of 103<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib64/libblas.a<br><br />
/usr/local/lib64/liblapack.a<br><br />
/usr/local/lib64/libtmglib.a<br />
</blockquote><br />
<br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=0 USE_OPENMP=0 NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
==== Scalapack ====<br />
wget https://www.cp2k.org/static/downloads/scalapack-2.1.0.tgz<br />
tar -zxvf scalapack-2.1.0.tgz<br />
scalapack-2.1.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_C_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_BUILD_TYPE=Release -DMPI_BASE_DIR=/usr/lib64/openmpi4-gcc9/lib -DMPI_INCLUDE_PATH=/usr/include/openmpi4-x86_64-gcc8 -DMPIEXEC=/usr/lib64/openmpi4-gcc8/bin/mpiexec -DBLAS_LIBRARIES=/usr/local/lib/libopenblas.a -DLAPACK_LIBRARIES=/usr/local/lib/libopenblas.a -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
100% tests passed, 0 tests failed out of 96<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/linscalapack.a<br />
</blockquote><br />
<br />
==== COSMA ====<br />
Distributed Communication-Optimal Matrix-Matrix Multiplication Algorithm. COSMA is a replacement of the ''pdgemm'' routine included in scalapack.<br />
git clone --recursive https://github.com/eth-cscs/COSMA cosma <br />
cd cosma<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_INCLUDEDIR=/usr/local/include -DCMAKE_BUILD_TYPE=Release -DCOSMA_BLAS=OPENBLAS -DCOSMA_SCALAPACK=CUSTOM -DBUILD_SHARED_LIBS=OFF -DSCALAPACK_LIBRARIES="/usr/local/lib/libscalapack.a;/usr/local/lib/libopenblas.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libquadmath.a" -DOPENBLAS_LIBRARIES="/usr/local/lib/libopenblas.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a"<br />
make test<br />
<br />
<blockquote style="background-color: red; border: solid thin grey;"><br />
20% tests passed, 4 tests failed out of 5<br><br />
<br><br />
Total Test time (real) = 7.99 sec<br><br />
<br><br />
The following tests FAILED:<br><br />
2 - test.multiply_using_layout (Failed)<br><br />
3 - test.multiply (Failed)<br><br />
4 - test.scalar_matmul (Failed)<br><br />
5 - test.pdgemm (Failed)<br><br />
Errors while running CTest<br><br />
</blockquote><br />
<br />
Place the library in front of the scalapack library during linking time.<br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
module load mpi/openmpi4-x86_64-gcc8<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
export OMPI_MCA_btl=openib,self,vader<br />
export OMPI_MCA_pml=^ucx <br />
./configure CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx F77=/usr/lib64/openmpi4-gcc8/bin/mpifort FC=/usr/lib64/openmpi4-gcc8/bin/mpifort FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-openmp --enable-mpi --disable-shared --enable-static --enable-threads<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br><br />
FFTW threaded transforms passed basic tests!<br><br />
MPI FFTW transforms passed 10 tests, 1 CPU<br><br />
MPI FFTW transforms passed 10 tests, 2 CPUs<br><br />
MPI FFTW transforms passed 10 tests, 3 CPUs<br><br />
MPI FFTW transforms passed 10 tests, 4 CPUs<br><br />
MPI FFTW threaded transforms passed 10 tests!<br />
</blockquote><br />
sudo make install<br />
<br />
The serial, mpi, threaded, and openmp versions are created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3.a<br><br />
/usr/local/lib/libftw3_mpi.a<br> <br />
/usr/local/lib/libfftw3_omp.a<br><br />
/usr/local/lib/libfftw3_threads.a <br />
</blockquote><br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1"<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="'''-O1''' -march=native -mno-avx512f" CFLAGS="'''-O1''' -march=native -mno-avx512f" CXXFLAGS="'''-O1''' -march=native -mno-avx512f" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
============================================================================<br><br />
Testsuite summary for gsl 2.6<br><br />
============================================================================<br><br />
all checks passed<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libgslcblas.a<br><br />
/usr/local/lib/libgsl.a<br />
</blockquote><br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="'''-O2''' -march=native -mno-avx512f" CFLAGS="'''-O2''' -march=native -mno-avx512f" CXXFLAGS="'''-O2''' -march=native -mno-avx512f" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -march=native -mno-avx512f"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
make PREFIX=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== libvdwxc ====<br />
Libvdwxc is a general library for evaluating energy and potential for exchange-correlation (XC) functionals from the vdW-DF.<br />
wget https://www.cp2k.org/static/downloads/libvdwxc-0.4.0.tar.gz<br />
tar -zxvf libvdwxc-0.4.0.tar.gz<br />
./configure CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort FCFLAGS="-O3 -march=native -mno-avx512f" FFTW3_INCLUDES="-I/usr/local/include/" FFTW3_LIBS="/usr/local/lib/libfftw3_mpi.a /usr/local/lib/libfftw3.a" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes<br />
make -j 24<br />
make check<br />
sudo make install<br />
<br />
<br />
==== METIS ====<br />
tar -zxvf parmetis-4.0.3.tar.gz<br />
cd parmetis-4.0.3<br />
cd metis<br />
make config prefix=/share/apps/METIS CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 24<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/share/apps/METIS/lib/libmetis.a<br />
</blockquote><br />
<br />
==== ParMETIS ====<br />
tar -zxvf parmetis-4.0.3.tar.gz<br />
cd parmetis-4.0.3<br />
make config prefix=/share/apps/ParMETIS CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 24<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/share/apps/ParMETIS/lib/libparmetis.a<br />
</blockquote><br />
<br />
==== Superlu-6.1.1 ====<br />
wget https://github.com/xiaoyeli/superlu_dist/archive/v6.1.1.tar.gz<br />
mv v6.1.1.tar.gz superlu_dist_6.1.1.tar.gz<br />
tar -zxvf superlu_dist_6.1.1.tar.gz<br />
mkdir build1<br />
cd build1<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DTPL_PARMETIS_LIBRARIES="-L/share/apps/METIS/lib -L/share/apps/ParMETIS/lib /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a -pthread -Wl,-rpath -Wl,/usr/lib64/openmpi4-gcc8/lib -Wl,--enable-new-dtags -L/usr/lib64/openmpi4-gcc8/lib -lmpi_mpifh -lmpi_cxx -lmpi" -DTPL_PARMETIS_INCLUDE_DIRS=/share/apps/ParMETIS/include -DBUILD_STATIC_LIBS=OFF -DCMAKE_C_FLAGS="-std=c99 -O3 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DTPL_LAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DTPL_BLAS_LIBRARIES=/usr/local/lib/libopenblas.a<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 24 tests passed<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsuperlu_dist.a<br />
</blockquote><br />
<br />
==== Superlu-5.1.2 ====<br />
wget http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_dist_5.1.2.tar.gz<br />
tar -zxvf superlu_dist_5.1.2.tar.gz<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DTPL_PARMETIS_LIBRARIES="-L/share/apps/METIS/lib -L/share/apps/ParMETIS/lib /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a -pthread -Wl,-rpath -Wl,/usr/lib64/openmpi4-gcc8/lib -Wl,--enable-new-dtags -L/usr/lib64/openmpi4-gcc8/lib -lmpi_mpifh -lmpi_cxx -lmpi" -DTPL_PARMETIS_INCLUDE_DIRS=/share/apps/ParMETIS/include -DCMAKE_C_FLAGS="-std=c99 -O3 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DTPL_BLAS_LIBRARIES=/usr/local/lib/libopenblas_omp.a<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Running tests...<br><br />
Test project /usr/local/src/SuperLU_DIST_5.1.2/build<br><br />
Start 1: pddrive<br><br />
1/2 Test #1: pddrive .......................... Passed 79.70 sec<br><br />
Start 2: pddrive1<br><br />
2/2 Test #2: pddrive1 ......................... Passed 78.40 sec<br><br />
<br><br />
100% tests passed, 0 tests failed out of 2<br><br />
<br><br />
Total Test time (real) = 158.10 sec<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsuperlu_dist.a<br />
</blockquote><br />
<br />
<br />
==== Elpa ====<br />
ELPA replaces the ScaLapack SYEVD to improve the performance of Eigen-vector/value problems.<br />
wget http://elpa.mpcdf.mpg.de/html/Releases/2019.11.001/elpa-2019.11.001.tar.gz<br />
tar -zxvf elpa-2019.11.001.tar.gz<br />
cd elpa-2019.11.001<br />
./configure FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes --enable-openmp=no --disable-avx512<br />
''hack'': change ''LIBS'' in Makefile: ''LIBS = /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a''<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
some skipped, all others passed<br />
</blockquote> <br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/include/elpa-2019.11.001/modules/elpa_constants.mod<br><br />
/usr/local/include/elpa-2019.11.001/modules/elpa_api.mod<br><br />
/usr/local/include/elpa-2019.11.001/modules/elpa.mod<br><br />
/usr/local/lib/libelpa.a<br />
</blockquote><br />
<br />
==== Pexsi 1.2 ====<br />
The source code must be edited for use with openmpi-4.<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
MPI_Address &#8594; MPI_Get_address<br><br />
MPI_Type_hindexed &#8594; MPI_Type_create_hindexed<br><br />
MPI_Type_struct &#8594; MPI_Type_create_struct<br><br />
MPI_Errhandler_set&#8594; remove lines<br />
</blockquote><br />
The Pole EXpansion and Selected Inversion (PEXSI) method requires the PEXSI library and two dependencies (ParMETIS and SuperLU_DIST).<br />
wget https://www.cp2k.org/static/downloads/pexsi_v1.2.0.tar.gz<br />
tar -zxvf pexsi_v1.2.0.tar.gz<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DMETIS_LIBRARIES=/share/apps/METIS/lib/libmetis.a -DPARMETIS_LIBRARIES=/share/apps/ParMETIS/lib/libparmetis.a -Dlinalg_BLAS_LIBRARIES=/usr/local/lib/libopenblas.a -Dlinalg_LAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DCMAKE_CXX_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_C_FLAGS="-std=c99 -O2 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
<br />
edit ''cmake/modules/FindLinAlg.cmake'' uncomment line 373 and 375.<br />
<br />
make -j 24<br />
sudo make install<br />
sudo make finstall<br />
<br />
==== Pexsi 0.10.2 ====<br />
cp config/make.inc.linux.gnu ./make.inc<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PAR_ND_LIBRARY = parmetis<br><br />
SEQ_ND_LIBRARY = metis<br><br />
<br><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
CXX = /usr/lib64/openmpi4-gcc8/bin/mpicxx<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LOADER = /usr/lib64/openmpi4-gcc8/bin/mpicxx<br><br />
<br><br />
DSUPERLU_DIR = /usr/local<br><br />
METIS_DIR = /share/apps/METIS<br><br />
PARMETIS_DIR = /share/apps/ParMETIS<br><br />
<br><br />
DSUPERLU_INCLUDE = -I/usr/local/include<br><br />
<br><br />
GFORTRAN_LIB = /opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a<br><br />
LAPACK_LIB = /usr/local/lib/libscalapack.a<br><br />
BLAS_LIB = /usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
The source code must be edited for use with openmpi-4.<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
MPI_Address &#8594; MPI_Get_address<br><br />
MPI_Type_hindexed &#8594; MPI_Type_create_hindexed<br><br />
MPI_Type_struct &#8594; MPI_Type_create_struct<br><br />
</blockquote><br />
<br />
make<br />
make install<br />
sudo cp /usr/local/src/pexsi_v0.10.2/build/lib/libpexsi_linux_v0.10.2.a /usr/local/lib<br />
sudo cp /usr/local/src/pexsi_v0.10.2/build/include/* /usr/local/include/<br />
<br />
==== SpFFT ====<br />
Needed in SIRIUS.<br />
wget https://github.com/eth-cscs/SpFFT/archive/v0.9.9.tar.gz<br />
mv v0.9.9.tar.gz SpFFT-0.9.9.tar.gz<br />
tar -zxvf SpFFT-0.9.9.tar.gz<br />
cd SpFFT-0.9.9<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE -DSPFFT_OMP=ON -DSPFFT_MPI=ON -DSPFFT_INSTALL=ON -DSPFFT_STATIC=ON<br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libspfft.a<br />
</blockquote><br />
<br />
==== SIRIUS 6.5.3 ====<br />
SIRIUS is a domain specific library for electronic structure calculations.<br />
wget https://github.com/electronic-structure/SIRIUS/archive/v6.5.3.tar.gz<br />
mv v6.5.3.tar.gz SIRIUS-v6.5.3.tar.gz<br />
tar -zxvf SIRIUS-v6.5.3.tar.gz<br />
cd SIRIUS-6.5.3<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/share/apps/SIRIUS -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DGSL_CBLAS_LIBRARY=/usr/local/lib/libgsl.a -DGSL_CBLAS_LIBRARY_DEBUG=/usr/local/lib/libgslcblas.a -DGSL_LIBRARY=/usr/local/lib/libgsl.a -DGSL_LIBRARY_DEBUG=/usr/local/lib/libgsl.a -DUSE_ELPA=ON -DELPA_INCLUDE_DIR=/usr/local/include/elpa-2019.11.001/elpa -DELPA_LIBRARIES="/usr/local/lib/libelpa.a;/usr/local/lib/libscalapack.a;/usr/local/lib/libopenblas.a" -DUSE_VDWXC=ON -DLIBVDWXC_LIBRARIES="/usr/local/lib/libvdwxc.a;/usr/local/lib/libfftw3.a"<br />
make -j 24<br />
make install<br />
<br />
==== SIRIUS 6.3.2 ====<br />
wget https://www.cp2k.org/static/downloads/SIRIUS-6.3.2.tar.gz<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/share/apps/SIRIUS -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DUSE_SCALAPACK=ON -DSCALAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DBLAS_openblas_LIBRARY=/usr/local/lib/libopenblas.a -DLAPACK_openblas_LIBRARY=/usr/local/lib/libopenblas.a -DGSL_CBLAS_LIBRARY=/usr/local/lib/libgsl.a -DGSL_CBLAS_LIBRARY_DEBUG=/usr/local/lib/libgslcblas.a -DGSL_LIBRARY=/usr/local/lib/libgsl.a -DGSL_LIBRARY_DEBUG=/usr/local/lib/libgsl.a<br />
make -j 24<br />
make install -j 24<br />
cp src/mod_files/sirius.mod /share/apps/SIRIUS/include/<br />
<br />
==== Plumed ====<br />
Library that enables various enhanced sampling methods.<br />
tar -zxvf plumed-2.6.0.tgz<br />
./configure --prefix=/share/apps/plumed/plumed-2.6.0 --enable-shared=no<br />
<br />
change in Makefile.conf<br />
DYNAMIC_LIBS= -lstdc++ -lfftw3 -lgsl -lgslcblas -lz -ldl -llapack -lblas -fopenmp<br />
to<br />
DYNAMIC_LIBS= -lstdc++ /usr/local/lib/libfftw3.a /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a -lz -ldl /usr/local/lib/libopenblas_omp.a -fopenmp -lgfortran<br />
<br />
make -j 24<br />
make install<br />
<br />
==== QUIP ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Do not build using parallel-make<br />
</blockquote><br />
QUantum mechanics and Interatomic Potentials allows for a wider range of interaction potentials.<br />
<br />
wget https://www.cp2k.org/static/downloads/QUIP-cc83ceea5776c40fcb5ab224a25ab04d62175449.zip<br />
export QUIP_ARCH=linux_x86_64_gfortran_openmpi<br />
<br />
make config<br />
<br />
Please enter the linking options for LAPACK and BLAS libraries:<br />
fill in /usr/local/lib/libopenblas.a<br />
Do you want to compile with CP2K support? y<br><br />
Do you want to compile with VASP support? y<br><br />
Do you want to compile with Tight Binding (TB) support? y<br><br />
Please enter directories where METIS libraries are kept:<br />
fill in /share/apps/METIS/lib/<br />
<br />
make libquip<br />
mkdir -p /share/apps/QUIP/QUIP-2015<br />
make PREFIX=/share/apps/QUIP/QUIP-2015 QUIP_INSTALLDIR=/share/apps/QUIP/QUIP-2015 install<br />
mkdir /share/apps/QUIP/QUIP-2015/include/<br />
cp build/linux_x86_64_gfortran_openmpi/quip_unified_wrapper_module.mod /share/apps/QUIP/QUIP-2015/include/<br />
mkdir /share/apps/QUIP/QUIP-2015/lib/<br />
cp build/linux_x86_64_gfortran_openmpi/*.a /share/apps/QUIP/QUIP-2015/lib<br />
cp src/FoX-4.0.3/objs.linux_x86_64_gfortran_openmpi/lib/libFoX_*.a /share/apps/QUIP/QUIP-2015/lib<br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O2 -g -march=native -mno-avx512f -I/usr/local/include/ -L/usr/local/include/<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include -I/share/apps/QUIP/QUIP-2015/include/ -I/share/apps/METIS/include/ -I/share/apps/ParMETIS/include -I/share/apps/plumed/plumed-2.6.0/include/ -I/share/apps/SIRIUS/include/<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++ -lgomp -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightgreen; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3261<br><br />
Number of NEW tests 8<br><br />
Total number of tests 3269<br><br />
GREPME 0 0 3261 8 3269 X<br><br />
<br><br />
Summary: correct: 3261 / 3269; new: 8; 38min<br><br />
Status: OK<br />
</blockquote><br />
<br />
<br />
To solve SIRIUS warnings in the top of the output, use the latest version of SIRIUS and modify the following cp2k source files:<br />
cd cp2k-7.1<br />
cd src<br />
wget https://raw.githubusercontent.com/cp2k/cp2k/b1fc8cddc7ca9b30bf6de29e87ac9e3f14c60136/src/sirius_interface.F<br />
wget https://raw.githubusercontent.com/cp2k/cp2k/b1fc8cddc7ca9b30bf6de29e87ac9e3f14c60136/src/input_cp2k_pwdft.F<br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
# Tested with: GFortran 8.3.1, OPENMPICH 4.0.3, OpenBLAS 0.3.0, ScaLAPACK 2.1.0, FFTW 3.3.8, Libint 2.6.0, Libxc 4.3.4, libxsmm 1.15,<br><br />
# ELPA 2019.11.001, PLUMED 2.6.0, SPGLIB 1.12.2, QUIP-2015, ParMETIS-4.0.3, Pexsi-1.2.0, SIRIUS 6.5.3, SpFFT 0.9.9, libvdw 0.4.0<br><br />
# Author: David Dubbeldam (d.dubbeldam@uva.nl, University of Amsterdam, May 2020)<br><br />
<br><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O2 -g -march =native -mno-avx512f -I/usr/local/include/ -L/usr/local/include/<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
DFLAGS += -D__SIRIUS -D__PLUMED2 -D__QUIP -D__LIBPEXSI -D__ELPA<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include -I/share/apps/QUIP/QUIP-2015/include/ -I/share/apps/METIS/include/ -I/share/apps/ParMETIS/include<br><br />
FCFLAGS += -I/share/apps/plumed/plumed-2.6.0/include/ -I/share/apps/SIRIUS/include/sirius<br><br />
FCFLAGS += -I/usr/local/include/elpa-2019.11.001/elpa -I/usr/local/include/elpa-2019.11.001/modules<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = $(PLUMED_DEPENDENCIES) /share/apps/plumed/plumed-2.6.0/lib/libplumed.a<br><br />
LIBS += /usr/local/lib/libelpa.a<br><br />
LIBS += /usr/local/lib64/libpexsi.a<br><br />
LIBS += /share/apps/SIRIUS/lib64/libsirius.a<br><br />
LIBS += /usr/local/lib/libspfft.a<br><br />
LIBS += /usr/local/lib/libvdwxc.a<br><br />
LIBS += /usr/local/lib64/libsuperlu_dist.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libquip_core.a /share/apps/QUIP/QUIP-2015/lib/libatoms.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_sax.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_common.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_utils.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_fsys.a<br><br />
LIBS += /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a<br><br />
LIBS += /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a<br><br />
LIBS += -lnetcdf -lhdf5_hl -lhdf5 -lz -lsymspg -ldl -lpthread -lstdc++ -lgomp -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
All tests are fine, but the regression-test hangs on one job, after killing it the test results are<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Summary --------------------------------<br><br />
Number of FAILED tests 1<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3285<br><br />
Number of NEW tests 0<br><br />
Total number of tests 3286<br><br />
GREPME 1 0 3285 0 3286 X<br><br />
<br><br />
Summary: correct: 3285 / 3286; failed: 1; 95min<br><br />
Status: FAILED<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_GFortran&diff=1269
CP2K compiling with GFortran
2020-06-07T08:56:18Z
<p>David Dubbeldam: /* fftw */</p>
<hr />
<div>Compiling <br />
<br />
== Caveats ==<br />
<br />
# the gcc version 4.8.5 mostly works, but fails for the plumed-part in CP2K (plumed itself compiles fine)<br />
# gcc version 9.1.1 fails (compiles but lots of CP2K unit tests fail, even with ''-O2 -g -mtune=generic'')<br />
# gcc version 8.3.1 works, but sometimes optimization needs to be reduced (e.g. gsl).<br />
<br />
== Compiling subpackages ==<br />
<br />
The following assumes that CP2K will be build from static libraries installed in /usr/local using the ''devtoolset-8'' on ''rocks'' (centos 7.4).<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
export CC=/opt/rh/devtoolset-8/root/usr/bin/gcc<br />
export CXX=/opt/rh/devtoolset-8/root/usr/bin/g++<br />
export F77=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
export FC=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
<br />
==== Blas and Lapack ====<br />
wget https://github.com/Reference-LAPACK/lapack/archive/v3.9.0.tar.gz<br />
mv v3.9.0.tar.gz lapack-3.9.0.tar.gz<br />
tar -zxvf lapack-3.9.0.tar.gz<br />
cd lapack-3.9.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_COMPILER=gfortran -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Result: 100% tests passed, 0 tests failed out of 103<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib64/libblas.a<br><br />
/usr/local/lib64/liblapack.a<br><br />
/usr/local/lib64/libtmglib.a<br />
</blockquote><br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=0 USE_OPENMP=0 NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
./configure CC=gcc CXX=g++x F77=gfortran FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --disable-shared --enable-static<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br><br />
</blockquote><br />
sudo make install<br />
<br />
The serial version is created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3.a<br><br />
</blockquote><br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1"<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="'''-O1''' -march=native -mno-avx512f" CFLAGS="'''-O1''' -march=native -mno-avx512f" CXXFLAGS="'''-O1''' -march=native -mno-avx512f" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
============================================================================<br><br />
Testsuite summary for gsl 2.6<br><br />
============================================================================<br><br />
all checks passed<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libgslcblas.a<br><br />
/usr/local/lib/libgsl.a<br />
</blockquote><br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="'''-O2''' -march=native -mno-avx512f" CFLAGS="'''-O2''' -march=native -mno-avx512f" CXXFLAGS="'''-O2''' -march=native -mno-avx512f" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -march=native -mno-avx512f"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
make PREFIX=/usr/local FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== libvdwxc ====<br />
Libvdwxc is a general library for evaluating energy and potential for exchange-correlation (XC) functionals from the vdW-DF.<br />
wget https://www.cp2k.org/static/downloads/libvdwxc-0.4.0.tar.gz<br />
tar -zxvf libvdwxc-0.4.0.tar.gz<br />
./configure CC=gcc FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" FFTW3_INCLUDES="-I/usr/local/include/" FFTW3_LIBS="/usr/local/lib/libfftw3.a" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes<br />
make -j 24<br />
make check<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libvdwxcfort.a<br><br />
/usr/local/lib/libvdwxc.a<br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== Spglib ====<br />
A library for finding and handling crystal symmetries<br />
wget https://github.com/spglib/spglib/archive/v1.11.2.1.tar.gz<br />
mv v1.11.2.1.tar.gz spglib-v1.11.2.1.tar.gz<br />
tar -zxvf spglib-v1.11.2.1.tar.gz<br />
cd spglib-1.11.2.1<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsymspg.a<br />
</blockquote><br />
<br />
Rocks/Centos/RH 7 provides precompiled packages<br />
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/s/spglib-1.11.1-2.el7.x86_64.rpm<br />
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/s/spglib-devel-1.11.1-2.el7.x86_64.rpm<br />
sudo rpm -ivh spglib-1.11.1-2.el7.x86_64.rpm spglib-devel-1.11.1-2.el7.x86_64.rpm<br />
<br />
<br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
CC = gcc<br><br />
FC = gfortran<br><br />
LD = gfortran<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O2 -march=native -mno-avx512f -I/usr/local/include -L/usr/local/include<br><br />
<br><br />
DFLAGS = -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libopenblas.a<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
make ARCH=local VERSION=sopt test<br />
<blockquote style="background-color: lightgreen; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3201<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 0 3201 3 3204 X<br><br />
<br><br />
Summary: correct: 3201 / 3204; new: 3; 27min<br><br />
Status: OK<br />
</blockquote><br />
<br />
=== OpenMP ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
export CC=/opt/rh/devtoolset-8/root/usr/bin/gcc<br />
export CXX=/opt/rh/devtoolset-8/root/usr/bin/g++<br />
export F77=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
export FC=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=1 USE_OPENMP=1 NUM_THREADS=64 LIBNAMESUFFIX=omp NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local LIBNAMESUFFIX=omp NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas_omp.a<br />
</blockquote><br />
<br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
./configure CC=gcc CXX=g++x F77=gfortran FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-openmp --disable-shared --enable-static --enable-threads<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br />
FFTW threaded transforms passed basic tests!<br />
</blockquote><br />
sudo make install<br />
<br />
The serial version is created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3_omp.a<br><br />
/usr/local/lib/libfftw3_threads.a<br />
</blockquote><br />
<br />
==== Elpa ====<br />
ELPA replaces the ScaLapack SYEVD to improve the performance of Eigen-vector/value problems.<br />
wget http://elpa.mpcdf.mpg.de/html/Releases/2019.11.001/elpa-2019.11.001.tar.gz<br />
tar -zxvf elpa-2019.11.001.tar.gz<br />
cd elpa-2019.11.001<br />
./configure FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes --enable-openmp=yes --disable-avx512<br />
''hack'': change ''LIBS'' in Makefile: ''LIBS = /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas_omp.a''<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
some skipped, all others passed<br />
</blockquote> <br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa_constants.mod<br><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa_api.mod<br><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa.mod<br><br />
/usr/local/lib/libelpa_openmp.a<br />
</blockquote><br />
<br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
module load mpi/openmpi4-x86_64-gcc8<br />
export CC=/usr/lib64/openmpi4-gcc8/bin/mpicc<br />
export CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx<br />
export F77=/usr/lib64/openmpi4-gcc8/bin/mpif77<br />
export FC=/usr/lib64/openmpi4-gcc8/bin/mpifort<br />
<br />
Allow ''infiniband'' and ''vader'' to run<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Note that the used MPI installation must match the used Fortran compiler. If not, then MPI needs to be recompiled using the same compiler.<br />
</blockquote><br />
<br />
<br />
==== Blas and Lapack ====<br />
Lapack is needed for SIRIUS<br />
wget https://github.com/Reference-LAPACK/lapack/archive/v3.9.0.tar.gz<br />
mv v3.9.0.tar.gz lapack-3.9.0.tar.gz<br />
tar -zxvf lapack-3.9.0.tar.gz<br />
cd lapack-3.9.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_COMPILER=gfortran -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Result: 100% tests passed, 0 tests failed out of 103<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib64/libblas.a<br><br />
/usr/local/lib64/liblapack.a<br><br />
/usr/local/lib64/libtmglib.a<br />
</blockquote><br />
<br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=0 USE_OPENMP=0 NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
==== Scalapack ====<br />
wget https://www.cp2k.org/static/downloads/scalapack-2.1.0.tgz<br />
tar -zxvf scalapack-2.1.0.tgz<br />
scalapack-2.1.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_C_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_BUILD_TYPE=Release -DMPI_BASE_DIR=/usr/lib64/openmpi4-gcc9/lib -DMPI_INCLUDE_PATH=/usr/include/openmpi4-x86_64-gcc8 -DMPIEXEC=/usr/lib64/openmpi4-gcc8/bin/mpiexec -DBLAS_LIBRARIES=/usr/local/lib/libopenblas.a -DLAPACK_LIBRARIES=/usr/local/lib/libopenblas.a -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
100% tests passed, 0 tests failed out of 96<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/linscalapack.a<br />
</blockquote><br />
<br />
==== COSMA ====<br />
Distributed Communication-Optimal Matrix-Matrix Multiplication Algorithm. COSMA is a replacement of the ''pdgemm'' routine included in scalapack.<br />
git clone --recursive https://github.com/eth-cscs/COSMA cosma <br />
cd cosma<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_INCLUDEDIR=/usr/local/include -DCMAKE_BUILD_TYPE=Release -DCOSMA_BLAS=OPENBLAS -DCOSMA_SCALAPACK=CUSTOM -DBUILD_SHARED_LIBS=OFF -DSCALAPACK_LIBRARIES="/usr/local/lib/libscalapack.a;/usr/local/lib/libopenblas.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libquadmath.a" -DOPENBLAS_LIBRARIES="/usr/local/lib/libopenblas.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a"<br />
make test<br />
<br />
<blockquote style="background-color: red; border: solid thin grey;"><br />
20% tests passed, 4 tests failed out of 5<br><br />
<br><br />
Total Test time (real) = 7.99 sec<br><br />
<br><br />
The following tests FAILED:<br><br />
2 - test.multiply_using_layout (Failed)<br><br />
3 - test.multiply (Failed)<br><br />
4 - test.scalar_matmul (Failed)<br><br />
5 - test.pdgemm (Failed)<br><br />
Errors while running CTest<br><br />
</blockquote><br />
<br />
Place the library in front of the scalapack library during linking time.<br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
module load mpi/openmpi4-x86_64-gcc8<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
export OMPI_MCA_btl=openib,self,vader<br />
export OMPI_MCA_pml=^ucx ./configure CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx F77=/usr/lib64/openmpi4-gcc8/bin/mpifort FC=/usr/lib64/openmpi4-gcc8/bin/mpifort FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-openmp --enable-mpi --disable-shared --enable-static --enable-threads<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br><br />
FFTW threaded transforms passed basic tests!<br><br />
MPI FFTW transforms passed 10 tests, 1 CPU<br><br />
MPI FFTW transforms passed 10 tests, 2 CPUs<br><br />
MPI FFTW transforms passed 10 tests, 3 CPUs<br><br />
MPI FFTW transforms passed 10 tests, 4 CPUs<br><br />
MPI FFTW threaded transforms passed 10 tests!<br />
</blockquote><br />
sudo make install<br />
<br />
The serial, mpi, threaded, and openmp versions are created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3.a<br><br />
/usr/local/lib/libftw3_mpi.a<br> <br />
/usr/local/lib/libfftw3_omp.a<br><br />
/usr/local/lib/libfftw3_threads.a <br />
</blockquote><br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1"<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="'''-O1''' -march=native -mno-avx512f" CFLAGS="'''-O1''' -march=native -mno-avx512f" CXXFLAGS="'''-O1''' -march=native -mno-avx512f" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
============================================================================<br><br />
Testsuite summary for gsl 2.6<br><br />
============================================================================<br><br />
all checks passed<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libgslcblas.a<br><br />
/usr/local/lib/libgsl.a<br />
</blockquote><br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="'''-O2''' -march=native -mno-avx512f" CFLAGS="'''-O2''' -march=native -mno-avx512f" CXXFLAGS="'''-O2''' -march=native -mno-avx512f" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -march=native -mno-avx512f"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
make PREFIX=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== libvdwxc ====<br />
Libvdwxc is a general library for evaluating energy and potential for exchange-correlation (XC) functionals from the vdW-DF.<br />
wget https://www.cp2k.org/static/downloads/libvdwxc-0.4.0.tar.gz<br />
tar -zxvf libvdwxc-0.4.0.tar.gz<br />
./configure CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort FCFLAGS="-O3 -march=native -mno-avx512f" FFTW3_INCLUDES="-I/usr/local/include/" FFTW3_LIBS="/usr/local/lib/libfftw3_mpi.a /usr/local/lib/libfftw3.a" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes<br />
make -j 24<br />
make check<br />
sudo make install<br />
<br />
<br />
==== METIS ====<br />
tar -zxvf parmetis-4.0.3.tar.gz<br />
cd parmetis-4.0.3<br />
cd metis<br />
make config prefix=/share/apps/METIS CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 24<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/share/apps/METIS/lib/libmetis.a<br />
</blockquote><br />
<br />
==== ParMETIS ====<br />
tar -zxvf parmetis-4.0.3.tar.gz<br />
cd parmetis-4.0.3<br />
make config prefix=/share/apps/ParMETIS CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 24<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/share/apps/ParMETIS/lib/libparmetis.a<br />
</blockquote><br />
<br />
==== Superlu-6.1.1 ====<br />
wget https://github.com/xiaoyeli/superlu_dist/archive/v6.1.1.tar.gz<br />
mv v6.1.1.tar.gz superlu_dist_6.1.1.tar.gz<br />
tar -zxvf superlu_dist_6.1.1.tar.gz<br />
mkdir build1<br />
cd build1<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DTPL_PARMETIS_LIBRARIES="-L/share/apps/METIS/lib -L/share/apps/ParMETIS/lib /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a -pthread -Wl,-rpath -Wl,/usr/lib64/openmpi4-gcc8/lib -Wl,--enable-new-dtags -L/usr/lib64/openmpi4-gcc8/lib -lmpi_mpifh -lmpi_cxx -lmpi" -DTPL_PARMETIS_INCLUDE_DIRS=/share/apps/ParMETIS/include -DBUILD_STATIC_LIBS=OFF -DCMAKE_C_FLAGS="-std=c99 -O3 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DTPL_LAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DTPL_BLAS_LIBRARIES=/usr/local/lib/libopenblas.a<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 24 tests passed<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsuperlu_dist.a<br />
</blockquote><br />
<br />
==== Superlu-5.1.2 ====<br />
wget http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_dist_5.1.2.tar.gz<br />
tar -zxvf superlu_dist_5.1.2.tar.gz<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DTPL_PARMETIS_LIBRARIES="-L/share/apps/METIS/lib -L/share/apps/ParMETIS/lib /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a -pthread -Wl,-rpath -Wl,/usr/lib64/openmpi4-gcc8/lib -Wl,--enable-new-dtags -L/usr/lib64/openmpi4-gcc8/lib -lmpi_mpifh -lmpi_cxx -lmpi" -DTPL_PARMETIS_INCLUDE_DIRS=/share/apps/ParMETIS/include -DCMAKE_C_FLAGS="-std=c99 -O3 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DTPL_BLAS_LIBRARIES=/usr/local/lib/libopenblas_omp.a<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Running tests...<br><br />
Test project /usr/local/src/SuperLU_DIST_5.1.2/build<br><br />
Start 1: pddrive<br><br />
1/2 Test #1: pddrive .......................... Passed 79.70 sec<br><br />
Start 2: pddrive1<br><br />
2/2 Test #2: pddrive1 ......................... Passed 78.40 sec<br><br />
<br><br />
100% tests passed, 0 tests failed out of 2<br><br />
<br><br />
Total Test time (real) = 158.10 sec<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsuperlu_dist.a<br />
</blockquote><br />
<br />
<br />
==== Elpa ====<br />
ELPA replaces the ScaLapack SYEVD to improve the performance of Eigen-vector/value problems.<br />
wget http://elpa.mpcdf.mpg.de/html/Releases/2019.11.001/elpa-2019.11.001.tar.gz<br />
tar -zxvf elpa-2019.11.001.tar.gz<br />
cd elpa-2019.11.001<br />
./configure FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes --enable-openmp=no --disable-avx512<br />
''hack'': change ''LIBS'' in Makefile: ''LIBS = /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a''<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
some skipped, all others passed<br />
</blockquote> <br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/include/elpa-2019.11.001/modules/elpa_constants.mod<br><br />
/usr/local/include/elpa-2019.11.001/modules/elpa_api.mod<br><br />
/usr/local/include/elpa-2019.11.001/modules/elpa.mod<br><br />
/usr/local/lib/libelpa.a<br />
</blockquote><br />
<br />
==== Pexsi 1.2 ====<br />
The source code must be edited for use with openmpi-4.<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
MPI_Address &#8594; MPI_Get_address<br><br />
MPI_Type_hindexed &#8594; MPI_Type_create_hindexed<br><br />
MPI_Type_struct &#8594; MPI_Type_create_struct<br><br />
MPI_Errhandler_set&#8594; remove lines<br />
</blockquote><br />
The Pole EXpansion and Selected Inversion (PEXSI) method requires the PEXSI library and two dependencies (ParMETIS and SuperLU_DIST).<br />
wget https://www.cp2k.org/static/downloads/pexsi_v1.2.0.tar.gz<br />
tar -zxvf pexsi_v1.2.0.tar.gz<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DMETIS_LIBRARIES=/share/apps/METIS/lib/libmetis.a -DPARMETIS_LIBRARIES=/share/apps/ParMETIS/lib/libparmetis.a -Dlinalg_BLAS_LIBRARIES=/usr/local/lib/libopenblas.a -Dlinalg_LAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DCMAKE_CXX_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_C_FLAGS="-std=c99 -O2 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
<br />
edit ''cmake/modules/FindLinAlg.cmake'' uncomment line 373 and 375.<br />
<br />
make -j 24<br />
sudo make install<br />
sudo make finstall<br />
<br />
==== Pexsi 0.10.2 ====<br />
cp config/make.inc.linux.gnu ./make.inc<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PAR_ND_LIBRARY = parmetis<br><br />
SEQ_ND_LIBRARY = metis<br><br />
<br><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
CXX = /usr/lib64/openmpi4-gcc8/bin/mpicxx<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LOADER = /usr/lib64/openmpi4-gcc8/bin/mpicxx<br><br />
<br><br />
DSUPERLU_DIR = /usr/local<br><br />
METIS_DIR = /share/apps/METIS<br><br />
PARMETIS_DIR = /share/apps/ParMETIS<br><br />
<br><br />
DSUPERLU_INCLUDE = -I/usr/local/include<br><br />
<br><br />
GFORTRAN_LIB = /opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a<br><br />
LAPACK_LIB = /usr/local/lib/libscalapack.a<br><br />
BLAS_LIB = /usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
The source code must be edited for use with openmpi-4.<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
MPI_Address &#8594; MPI_Get_address<br><br />
MPI_Type_hindexed &#8594; MPI_Type_create_hindexed<br><br />
MPI_Type_struct &#8594; MPI_Type_create_struct<br><br />
</blockquote><br />
<br />
make<br />
make install<br />
sudo cp /usr/local/src/pexsi_v0.10.2/build/lib/libpexsi_linux_v0.10.2.a /usr/local/lib<br />
sudo cp /usr/local/src/pexsi_v0.10.2/build/include/* /usr/local/include/<br />
<br />
==== SpFFT ====<br />
Needed in SIRIUS.<br />
wget https://github.com/eth-cscs/SpFFT/archive/v0.9.9.tar.gz<br />
mv v0.9.9.tar.gz SpFFT-0.9.9.tar.gz<br />
tar -zxvf SpFFT-0.9.9.tar.gz<br />
cd SpFFT-0.9.9<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE -DSPFFT_OMP=ON -DSPFFT_MPI=ON -DSPFFT_INSTALL=ON -DSPFFT_STATIC=ON<br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libspfft.a<br />
</blockquote><br />
<br />
==== SIRIUS 6.5.3 ====<br />
SIRIUS is a domain specific library for electronic structure calculations.<br />
wget https://github.com/electronic-structure/SIRIUS/archive/v6.5.3.tar.gz<br />
mv v6.5.3.tar.gz SIRIUS-v6.5.3.tar.gz<br />
tar -zxvf SIRIUS-v6.5.3.tar.gz<br />
cd SIRIUS-6.5.3<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/share/apps/SIRIUS -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DGSL_CBLAS_LIBRARY=/usr/local/lib/libgsl.a -DGSL_CBLAS_LIBRARY_DEBUG=/usr/local/lib/libgslcblas.a -DGSL_LIBRARY=/usr/local/lib/libgsl.a -DGSL_LIBRARY_DEBUG=/usr/local/lib/libgsl.a -DUSE_ELPA=ON -DELPA_INCLUDE_DIR=/usr/local/include/elpa-2019.11.001/elpa -DELPA_LIBRARIES="/usr/local/lib/libelpa.a;/usr/local/lib/libscalapack.a;/usr/local/lib/libopenblas.a" -DUSE_VDWXC=ON -DLIBVDWXC_LIBRARIES="/usr/local/lib/libvdwxc.a;/usr/local/lib/libfftw3.a"<br />
make -j 24<br />
make install<br />
<br />
==== SIRIUS 6.3.2 ====<br />
wget https://www.cp2k.org/static/downloads/SIRIUS-6.3.2.tar.gz<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/share/apps/SIRIUS -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DUSE_SCALAPACK=ON -DSCALAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DBLAS_openblas_LIBRARY=/usr/local/lib/libopenblas.a -DLAPACK_openblas_LIBRARY=/usr/local/lib/libopenblas.a -DGSL_CBLAS_LIBRARY=/usr/local/lib/libgsl.a -DGSL_CBLAS_LIBRARY_DEBUG=/usr/local/lib/libgslcblas.a -DGSL_LIBRARY=/usr/local/lib/libgsl.a -DGSL_LIBRARY_DEBUG=/usr/local/lib/libgsl.a<br />
make -j 24<br />
make install -j 24<br />
cp src/mod_files/sirius.mod /share/apps/SIRIUS/include/<br />
<br />
==== Plumed ====<br />
Library that enables various enhanced sampling methods.<br />
tar -zxvf plumed-2.6.0.tgz<br />
./configure --prefix=/share/apps/plumed/plumed-2.6.0 --enable-shared=no<br />
<br />
change in Makefile.conf<br />
DYNAMIC_LIBS= -lstdc++ -lfftw3 -lgsl -lgslcblas -lz -ldl -llapack -lblas -fopenmp<br />
to<br />
DYNAMIC_LIBS= -lstdc++ /usr/local/lib/libfftw3.a /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a -lz -ldl /usr/local/lib/libopenblas_omp.a -fopenmp -lgfortran<br />
<br />
make -j 24<br />
make install<br />
<br />
==== QUIP ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Do not build using parallel-make<br />
</blockquote><br />
QUantum mechanics and Interatomic Potentials allows for a wider range of interaction potentials.<br />
<br />
wget https://www.cp2k.org/static/downloads/QUIP-cc83ceea5776c40fcb5ab224a25ab04d62175449.zip<br />
export QUIP_ARCH=linux_x86_64_gfortran_openmpi<br />
<br />
make config<br />
<br />
Please enter the linking options for LAPACK and BLAS libraries:<br />
fill in /usr/local/lib/libopenblas.a<br />
Do you want to compile with CP2K support? y<br><br />
Do you want to compile with VASP support? y<br><br />
Do you want to compile with Tight Binding (TB) support? y<br><br />
Please enter directories where METIS libraries are kept:<br />
fill in /share/apps/METIS/lib/<br />
<br />
make libquip<br />
mkdir -p /share/apps/QUIP/QUIP-2015<br />
make PREFIX=/share/apps/QUIP/QUIP-2015 QUIP_INSTALLDIR=/share/apps/QUIP/QUIP-2015 install<br />
mkdir /share/apps/QUIP/QUIP-2015/include/<br />
cp build/linux_x86_64_gfortran_openmpi/quip_unified_wrapper_module.mod /share/apps/QUIP/QUIP-2015/include/<br />
mkdir /share/apps/QUIP/QUIP-2015/lib/<br />
cp build/linux_x86_64_gfortran_openmpi/*.a /share/apps/QUIP/QUIP-2015/lib<br />
cp src/FoX-4.0.3/objs.linux_x86_64_gfortran_openmpi/lib/libFoX_*.a /share/apps/QUIP/QUIP-2015/lib<br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O2 -g -march=native -mno-avx512f -I/usr/local/include/ -L/usr/local/include/<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include -I/share/apps/QUIP/QUIP-2015/include/ -I/share/apps/METIS/include/ -I/share/apps/ParMETIS/include -I/share/apps/plumed/plumed-2.6.0/include/ -I/share/apps/SIRIUS/include/<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++ -lgomp -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightgreen; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3261<br><br />
Number of NEW tests 8<br><br />
Total number of tests 3269<br><br />
GREPME 0 0 3261 8 3269 X<br><br />
<br><br />
Summary: correct: 3261 / 3269; new: 8; 38min<br><br />
Status: OK<br />
</blockquote><br />
<br />
<br />
To solve SIRIUS warnings in the top of the output, use the latest version of SIRIUS and modify the following cp2k source files:<br />
cd cp2k-7.1<br />
cd src<br />
wget https://raw.githubusercontent.com/cp2k/cp2k/b1fc8cddc7ca9b30bf6de29e87ac9e3f14c60136/src/sirius_interface.F<br />
wget https://raw.githubusercontent.com/cp2k/cp2k/b1fc8cddc7ca9b30bf6de29e87ac9e3f14c60136/src/input_cp2k_pwdft.F<br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
# Tested with: GFortran 8.3.1, OPENMPICH 4.0.3, OpenBLAS 0.3.0, ScaLAPACK 2.1.0, FFTW 3.3.8, Libint 2.6.0, Libxc 4.3.4, libxsmm 1.15,<br><br />
# ELPA 2019.11.001, PLUMED 2.6.0, SPGLIB 1.12.2, QUIP-2015, ParMETIS-4.0.3, Pexsi-1.2.0, SIRIUS 6.5.3, SpFFT 0.9.9, libvdw 0.4.0<br><br />
# Author: David Dubbeldam (d.dubbeldam@uva.nl, University of Amsterdam, May 2020)<br><br />
<br><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O2 -g -march =native -mno-avx512f -I/usr/local/include/ -L/usr/local/include/<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
DFLAGS += -D__SIRIUS -D__PLUMED2 -D__QUIP -D__LIBPEXSI -D__ELPA<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include -I/share/apps/QUIP/QUIP-2015/include/ -I/share/apps/METIS/include/ -I/share/apps/ParMETIS/include<br><br />
FCFLAGS += -I/share/apps/plumed/plumed-2.6.0/include/ -I/share/apps/SIRIUS/include/sirius<br><br />
FCFLAGS += -I/usr/local/include/elpa-2019.11.001/elpa -I/usr/local/include/elpa-2019.11.001/modules<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = $(PLUMED_DEPENDENCIES) /share/apps/plumed/plumed-2.6.0/lib/libplumed.a<br><br />
LIBS += /usr/local/lib/libelpa.a<br><br />
LIBS += /usr/local/lib64/libpexsi.a<br><br />
LIBS += /share/apps/SIRIUS/lib64/libsirius.a<br><br />
LIBS += /usr/local/lib/libspfft.a<br><br />
LIBS += /usr/local/lib/libvdwxc.a<br><br />
LIBS += /usr/local/lib64/libsuperlu_dist.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libquip_core.a /share/apps/QUIP/QUIP-2015/lib/libatoms.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_sax.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_common.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_utils.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_fsys.a<br><br />
LIBS += /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a<br><br />
LIBS += /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a<br><br />
LIBS += -lnetcdf -lhdf5_hl -lhdf5 -lz -lsymspg -ldl -lpthread -lstdc++ -lgomp -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
All tests are fine, but the regression-test hangs on one job, after killing it the test results are<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Summary --------------------------------<br><br />
Number of FAILED tests 1<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3285<br><br />
Number of NEW tests 0<br><br />
Total number of tests 3286<br><br />
GREPME 1 0 3285 0 3286 X<br><br />
<br><br />
Summary: correct: 3285 / 3286; failed: 1; 95min<br><br />
Status: FAILED<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1268
CP2K compiling with Intel
2020-05-27T05:36:05Z
<p>David Dubbeldam: </p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
<br />
edit ''Makefile'' in directory ''fortran''<br />
line 12 should read (''-lstdc++'' added)<br />
COMPUTE_LIB = -L../lib -lint2 -lstdc++<br />
line 37 change CXX to FC<br />
$(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^<br />
<br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
sudo make PREFIX=/usr/local FC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/ifort CC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icc CXX=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
CC = icc<br><br />
FC = ifort<br><br />
LD = ifort<br><br />
AR = ar -r<br><br />
<br><br />
DFLAGS = -D__MKL -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -I/usr/local/include<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/usr/local/include -L/usr/local/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += -Wl,--start-group \<br><br />
$(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_lapack95_lp64 -lmkl_blas95_lp64 \<br><br />
-Wl,--end-group -lpthread -lm<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br><br />
<br><br />
# Required due to memory leak that occurs if high optimisations are used<br><br />
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F<br><br />
$(FC) -c $(subst O2,O0,$(FCFLAGS)) $<<br />
</blockquote><br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 4<br><br />
Number of CORRECT tests 3197<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 4 3197 3 3204 X<br><br />
<br><br />
Summary: correct: 3197 / 3204; new: 3; wrong: 4; 50min<br><br />
Status: FAILED<br />
</blockquote><br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="/usr/lib64/openmpi4-intel/bin/mpifort"<br />
export CC="/usr/lib64/openmpi4-intel/bin/mpicc"<br />
export CXX="/usr/lib64/openmpi4-intel/bin/mpicxx"<br />
export F77=${FC}<br />
export F90=${FC}<br />
module load mpi/openmpi4-x86_64-intel<br />
export OMPI_MCA_pml=^ucx<br />
export OMPI_MCA_btl=self,tcp<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
ulimit -s unlimited<br />
<br />
==== CP2K basic openmpi ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
CC = /usr/lib64/openmpi4-intel/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-intel/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-intel/bin/mpifort<br><br />
AR = xiar -r<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__MKL -D__FFTW3 -D__SPGLIB<br><br />
DFLAGS += -D__LIBXC -D__LIBINT -D__LIBXSMM<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -fp-model precise -I/usr/local/include<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/usr/local/include -L/usr/local/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
INTEL_MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += $(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-Wl,--start-group \<br><br />
$(INTEL_MKL_LIB)/libmkl_scalapack_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_blacs_openmpi_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_intel_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_sequential.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_core.a \<br><br />
-Wl,--end-group<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lm -lstdc++ -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
# Required due to memory leak that occurs if high optimisations are used<br><br />
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F<br><br />
$(FC) -c $(subst O2,O0,$(FCFLAGS)) $<<br />
</blockquote><br />
<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 3<br><br />
Number of WRONG tests 2<br><br />
Number of CORRECT tests 3264<br><br />
Number of NEW tests 0<br><br />
Total number of tests 3269<br><br />
GREPME 3 2 3264 0 3269 X<br><br />
<br><br />
Summary: correct: 3264 / 3269; wrong: 2; failed: 3; 61min<br><br />
Status: FAILED<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_GFortran&diff=1267
CP2K compiling with GFortran
2020-05-27T05:35:40Z
<p>David Dubbeldam: /* CP2K */</p>
<hr />
<div>Compiling <br />
<br />
== Caveats ==<br />
<br />
# the gcc version 4.8.5 mostly works, but fails for the plumed-part in CP2K (plumed itself compiles fine)<br />
# gcc version 9.1.1 fails (compiles but lots of CP2K unit tests fail, even with ''-O2 -g -mtune=generic'')<br />
# gcc version 8.3.1 works, but sometimes optimization needs to be reduced (e.g. gsl).<br />
<br />
== Compiling subpackages ==<br />
<br />
The following assumes that CP2K will be build from static libraries installed in /usr/local using the ''devtoolset-8'' on ''rocks'' (centos 7.4).<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
export CC=/opt/rh/devtoolset-8/root/usr/bin/gcc<br />
export CXX=/opt/rh/devtoolset-8/root/usr/bin/g++<br />
export F77=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
export FC=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
<br />
==== Blas and Lapack ====<br />
wget https://github.com/Reference-LAPACK/lapack/archive/v3.9.0.tar.gz<br />
mv v3.9.0.tar.gz lapack-3.9.0.tar.gz<br />
tar -zxvf lapack-3.9.0.tar.gz<br />
cd lapack-3.9.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_COMPILER=gfortran -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Result: 100% tests passed, 0 tests failed out of 103<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib64/libblas.a<br><br />
/usr/local/lib64/liblapack.a<br><br />
/usr/local/lib64/libtmglib.a<br />
</blockquote><br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=0 USE_OPENMP=0 NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
./configure CC=gcc CXX=g++x F77=gfortran FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --disable-shared --enable-static<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br><br />
</blockquote><br />
sudo make install<br />
<br />
The serial version is created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3.a<br><br />
</blockquote><br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1"<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="'''-O1''' -march=native -mno-avx512f" CFLAGS="'''-O1''' -march=native -mno-avx512f" CXXFLAGS="'''-O1''' -march=native -mno-avx512f" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
============================================================================<br><br />
Testsuite summary for gsl 2.6<br><br />
============================================================================<br><br />
all checks passed<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libgslcblas.a<br><br />
/usr/local/lib/libgsl.a<br />
</blockquote><br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="'''-O2''' -march=native -mno-avx512f" CFLAGS="'''-O2''' -march=native -mno-avx512f" CXXFLAGS="'''-O2''' -march=native -mno-avx512f" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -march=native -mno-avx512f"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
make PREFIX=/usr/local FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== libvdwxc ====<br />
Libvdwxc is a general library for evaluating energy and potential for exchange-correlation (XC) functionals from the vdW-DF.<br />
wget https://www.cp2k.org/static/downloads/libvdwxc-0.4.0.tar.gz<br />
tar -zxvf libvdwxc-0.4.0.tar.gz<br />
./configure CC=gcc FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" FFTW3_INCLUDES="-I/usr/local/include/" FFTW3_LIBS="/usr/local/lib/libfftw3.a" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes<br />
make -j 24<br />
make check<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libvdwxcfort.a<br><br />
/usr/local/lib/libvdwxc.a<br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== Spglib ====<br />
A library for finding and handling crystal symmetries<br />
wget https://github.com/spglib/spglib/archive/v1.11.2.1.tar.gz<br />
mv v1.11.2.1.tar.gz spglib-v1.11.2.1.tar.gz<br />
tar -zxvf spglib-v1.11.2.1.tar.gz<br />
cd spglib-1.11.2.1<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsymspg.a<br />
</blockquote><br />
<br />
Rocks/Centos/RH 7 provides precompiled packages<br />
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/s/spglib-1.11.1-2.el7.x86_64.rpm<br />
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/s/spglib-devel-1.11.1-2.el7.x86_64.rpm<br />
sudo rpm -ivh spglib-1.11.1-2.el7.x86_64.rpm spglib-devel-1.11.1-2.el7.x86_64.rpm<br />
<br />
<br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
CC = gcc<br><br />
FC = gfortran<br><br />
LD = gfortran<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O2 -march=native -mno-avx512f -I/usr/local/include -L/usr/local/include<br><br />
<br><br />
DFLAGS = -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libopenblas.a<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
make ARCH=local VERSION=sopt test<br />
<blockquote style="background-color: lightgreen; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3201<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 0 3201 3 3204 X<br><br />
<br><br />
Summary: correct: 3201 / 3204; new: 3; 27min<br><br />
Status: OK<br />
</blockquote><br />
<br />
=== OpenMP ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
export CC=/opt/rh/devtoolset-8/root/usr/bin/gcc<br />
export CXX=/opt/rh/devtoolset-8/root/usr/bin/g++<br />
export F77=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
export FC=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=1 USE_OPENMP=1 NUM_THREADS=64 LIBNAMESUFFIX=omp NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local LIBNAMESUFFIX=omp NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas_omp.a<br />
</blockquote><br />
<br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
./configure CC=gcc CXX=g++x F77=gfortran FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-openmp --disable-shared --enable-static --enable-threads<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br />
FFTW threaded transforms passed basic tests!<br />
</blockquote><br />
sudo make install<br />
<br />
The serial version is created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3_omp.a<br><br />
/usr/local/lib/libfftw3_threads.a<br />
</blockquote><br />
<br />
==== Elpa ====<br />
ELPA replaces the ScaLapack SYEVD to improve the performance of Eigen-vector/value problems.<br />
wget http://elpa.mpcdf.mpg.de/html/Releases/2019.11.001/elpa-2019.11.001.tar.gz<br />
tar -zxvf elpa-2019.11.001.tar.gz<br />
cd elpa-2019.11.001<br />
./configure FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes --enable-openmp=yes --disable-avx512<br />
''hack'': change ''LIBS'' in Makefile: ''LIBS = /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas_omp.a''<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
some skipped, all others passed<br />
</blockquote> <br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa_constants.mod<br><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa_api.mod<br><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa.mod<br><br />
/usr/local/lib/libelpa_openmp.a<br />
</blockquote><br />
<br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
module load mpi/openmpi4-x86_64-gcc8<br />
export CC=/usr/lib64/openmpi4-gcc8/bin/mpicc<br />
export CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx<br />
export F77=/usr/lib64/openmpi4-gcc8/bin/mpif77<br />
export FC=/usr/lib64/openmpi4-gcc8/bin/mpifort<br />
<br />
Allow ''infiniband'' and ''vader'' to run<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Note that the used MPI installation must match the used Fortran compiler. If not, then MPI needs to be recompiled using the same compiler.<br />
</blockquote><br />
<br />
<br />
==== Blas and Lapack ====<br />
Lapack is needed for SIRIUS<br />
wget https://github.com/Reference-LAPACK/lapack/archive/v3.9.0.tar.gz<br />
mv v3.9.0.tar.gz lapack-3.9.0.tar.gz<br />
tar -zxvf lapack-3.9.0.tar.gz<br />
cd lapack-3.9.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_COMPILER=gfortran -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Result: 100% tests passed, 0 tests failed out of 103<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib64/libblas.a<br><br />
/usr/local/lib64/liblapack.a<br><br />
/usr/local/lib64/libtmglib.a<br />
</blockquote><br />
<br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=0 USE_OPENMP=0 NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
==== Scalapack ====<br />
wget https://www.cp2k.org/static/downloads/scalapack-2.1.0.tgz<br />
tar -zxvf scalapack-2.1.0.tgz<br />
scalapack-2.1.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_C_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_BUILD_TYPE=Release -DMPI_BASE_DIR=/usr/lib64/openmpi4-gcc9/lib -DMPI_INCLUDE_PATH=/usr/include/openmpi4-x86_64-gcc8 -DMPIEXEC=/usr/lib64/openmpi4-gcc8/bin/mpiexec -DBLAS_LIBRARIES=/usr/local/lib/libopenblas.a -DLAPACK_LIBRARIES=/usr/local/lib/libopenblas.a -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
100% tests passed, 0 tests failed out of 96<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/linscalapack.a<br />
</blockquote><br />
<br />
==== COSMA ====<br />
Distributed Communication-Optimal Matrix-Matrix Multiplication Algorithm. COSMA is a replacement of the ''pdgemm'' routine included in scalapack.<br />
git clone --recursive https://github.com/eth-cscs/COSMA cosma <br />
cd cosma<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_INCLUDEDIR=/usr/local/include -DCMAKE_BUILD_TYPE=Release -DCOSMA_BLAS=OPENBLAS -DCOSMA_SCALAPACK=CUSTOM -DBUILD_SHARED_LIBS=OFF -DSCALAPACK_LIBRARIES="/usr/local/lib/libscalapack.a;/usr/local/lib/libopenblas.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libquadmath.a" -DOPENBLAS_LIBRARIES="/usr/local/lib/libopenblas.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a"<br />
make test<br />
<br />
<blockquote style="background-color: red; border: solid thin grey;"><br />
20% tests passed, 4 tests failed out of 5<br><br />
<br><br />
Total Test time (real) = 7.99 sec<br><br />
<br><br />
The following tests FAILED:<br><br />
2 - test.multiply_using_layout (Failed)<br><br />
3 - test.multiply (Failed)<br><br />
4 - test.scalar_matmul (Failed)<br><br />
5 - test.pdgemm (Failed)<br><br />
Errors while running CTest<br><br />
</blockquote><br />
<br />
Place the library in front of the scalapack library during linking time.<br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
module load mpi/openmpi4-x86_64-gcc8<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
./configure CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx F77=/usr/lib64/openmpi4-gcc8/bin/mpifort FC=/usr/lib64/openmpi4-gcc8/bin/mpifort FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-openmp --enable-mpi --disable-shared --enable-static --enable-threads<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br><br />
FFTW threaded transforms passed basic tests!<br><br />
MPI FFTW transforms passed 10 tests, 1 CPU<br><br />
MPI FFTW transforms passed 10 tests, 2 CPUs<br><br />
MPI FFTW transforms passed 10 tests, 3 CPUs<br><br />
MPI FFTW transforms passed 10 tests, 4 CPUs<br><br />
MPI FFTW threaded transforms passed 10 tests!<br />
</blockquote><br />
sudo make install<br />
<br />
The serial, mpi, threaded, and openmp versions are created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3.a<br><br />
/usr/local/lib/libftw3_mpi.a<br> <br />
/usr/local/lib/libfftw3_omp.a<br><br />
/usr/local/lib/libfftw3_threads.a <br />
</blockquote><br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1"<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="'''-O1''' -march=native -mno-avx512f" CFLAGS="'''-O1''' -march=native -mno-avx512f" CXXFLAGS="'''-O1''' -march=native -mno-avx512f" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
============================================================================<br><br />
Testsuite summary for gsl 2.6<br><br />
============================================================================<br><br />
all checks passed<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libgslcblas.a<br><br />
/usr/local/lib/libgsl.a<br />
</blockquote><br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="'''-O2''' -march=native -mno-avx512f" CFLAGS="'''-O2''' -march=native -mno-avx512f" CXXFLAGS="'''-O2''' -march=native -mno-avx512f" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -march=native -mno-avx512f"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
make PREFIX=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== libvdwxc ====<br />
Libvdwxc is a general library for evaluating energy and potential for exchange-correlation (XC) functionals from the vdW-DF.<br />
wget https://www.cp2k.org/static/downloads/libvdwxc-0.4.0.tar.gz<br />
tar -zxvf libvdwxc-0.4.0.tar.gz<br />
./configure CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort FCFLAGS="-O3 -march=native -mno-avx512f" FFTW3_INCLUDES="-I/usr/local/include/" FFTW3_LIBS="/usr/local/lib/libfftw3_mpi.a /usr/local/lib/libfftw3.a" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes<br />
make -j 24<br />
make check<br />
sudo make install<br />
<br />
<br />
==== METIS ====<br />
tar -zxvf parmetis-4.0.3.tar.gz<br />
cd parmetis-4.0.3<br />
cd metis<br />
make config prefix=/share/apps/METIS CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 24<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/share/apps/METIS/lib/libmetis.a<br />
</blockquote><br />
<br />
==== ParMETIS ====<br />
tar -zxvf parmetis-4.0.3.tar.gz<br />
cd parmetis-4.0.3<br />
make config prefix=/share/apps/ParMETIS CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 24<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/share/apps/ParMETIS/lib/libparmetis.a<br />
</blockquote><br />
<br />
==== Superlu-6.1.1 ====<br />
wget https://github.com/xiaoyeli/superlu_dist/archive/v6.1.1.tar.gz<br />
mv v6.1.1.tar.gz superlu_dist_6.1.1.tar.gz<br />
tar -zxvf superlu_dist_6.1.1.tar.gz<br />
mkdir build1<br />
cd build1<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DTPL_PARMETIS_LIBRARIES="-L/share/apps/METIS/lib -L/share/apps/ParMETIS/lib /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a -pthread -Wl,-rpath -Wl,/usr/lib64/openmpi4-gcc8/lib -Wl,--enable-new-dtags -L/usr/lib64/openmpi4-gcc8/lib -lmpi_mpifh -lmpi_cxx -lmpi" -DTPL_PARMETIS_INCLUDE_DIRS=/share/apps/ParMETIS/include -DBUILD_STATIC_LIBS=OFF -DCMAKE_C_FLAGS="-std=c99 -O3 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DTPL_LAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DTPL_BLAS_LIBRARIES=/usr/local/lib/libopenblas.a<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 24 tests passed<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsuperlu_dist.a<br />
</blockquote><br />
<br />
==== Superlu-5.1.2 ====<br />
wget http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_dist_5.1.2.tar.gz<br />
tar -zxvf superlu_dist_5.1.2.tar.gz<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DTPL_PARMETIS_LIBRARIES="-L/share/apps/METIS/lib -L/share/apps/ParMETIS/lib /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a -pthread -Wl,-rpath -Wl,/usr/lib64/openmpi4-gcc8/lib -Wl,--enable-new-dtags -L/usr/lib64/openmpi4-gcc8/lib -lmpi_mpifh -lmpi_cxx -lmpi" -DTPL_PARMETIS_INCLUDE_DIRS=/share/apps/ParMETIS/include -DCMAKE_C_FLAGS="-std=c99 -O3 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DTPL_BLAS_LIBRARIES=/usr/local/lib/libopenblas_omp.a<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Running tests...<br><br />
Test project /usr/local/src/SuperLU_DIST_5.1.2/build<br><br />
Start 1: pddrive<br><br />
1/2 Test #1: pddrive .......................... Passed 79.70 sec<br><br />
Start 2: pddrive1<br><br />
2/2 Test #2: pddrive1 ......................... Passed 78.40 sec<br><br />
<br><br />
100% tests passed, 0 tests failed out of 2<br><br />
<br><br />
Total Test time (real) = 158.10 sec<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsuperlu_dist.a<br />
</blockquote><br />
<br />
<br />
==== Elpa ====<br />
ELPA replaces the ScaLapack SYEVD to improve the performance of Eigen-vector/value problems.<br />
wget http://elpa.mpcdf.mpg.de/html/Releases/2019.11.001/elpa-2019.11.001.tar.gz<br />
tar -zxvf elpa-2019.11.001.tar.gz<br />
cd elpa-2019.11.001<br />
./configure FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes --enable-openmp=no --disable-avx512<br />
''hack'': change ''LIBS'' in Makefile: ''LIBS = /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a''<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
some skipped, all others passed<br />
</blockquote> <br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/include/elpa-2019.11.001/modules/elpa_constants.mod<br><br />
/usr/local/include/elpa-2019.11.001/modules/elpa_api.mod<br><br />
/usr/local/include/elpa-2019.11.001/modules/elpa.mod<br><br />
/usr/local/lib/libelpa.a<br />
</blockquote><br />
<br />
==== Pexsi 1.2 ====<br />
The source code must be edited for use with openmpi-4.<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
MPI_Address &#8594; MPI_Get_address<br><br />
MPI_Type_hindexed &#8594; MPI_Type_create_hindexed<br><br />
MPI_Type_struct &#8594; MPI_Type_create_struct<br><br />
MPI_Errhandler_set&#8594; remove lines<br />
</blockquote><br />
The Pole EXpansion and Selected Inversion (PEXSI) method requires the PEXSI library and two dependencies (ParMETIS and SuperLU_DIST).<br />
wget https://www.cp2k.org/static/downloads/pexsi_v1.2.0.tar.gz<br />
tar -zxvf pexsi_v1.2.0.tar.gz<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DMETIS_LIBRARIES=/share/apps/METIS/lib/libmetis.a -DPARMETIS_LIBRARIES=/share/apps/ParMETIS/lib/libparmetis.a -Dlinalg_BLAS_LIBRARIES=/usr/local/lib/libopenblas.a -Dlinalg_LAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DCMAKE_CXX_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_C_FLAGS="-std=c99 -O2 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
<br />
edit ''cmake/modules/FindLinAlg.cmake'' uncomment line 373 and 375.<br />
<br />
make -j 24<br />
sudo make install<br />
sudo make finstall<br />
<br />
==== Pexsi 0.10.2 ====<br />
cp config/make.inc.linux.gnu ./make.inc<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PAR_ND_LIBRARY = parmetis<br><br />
SEQ_ND_LIBRARY = metis<br><br />
<br><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
CXX = /usr/lib64/openmpi4-gcc8/bin/mpicxx<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LOADER = /usr/lib64/openmpi4-gcc8/bin/mpicxx<br><br />
<br><br />
DSUPERLU_DIR = /usr/local<br><br />
METIS_DIR = /share/apps/METIS<br><br />
PARMETIS_DIR = /share/apps/ParMETIS<br><br />
<br><br />
DSUPERLU_INCLUDE = -I/usr/local/include<br><br />
<br><br />
GFORTRAN_LIB = /opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a<br><br />
LAPACK_LIB = /usr/local/lib/libscalapack.a<br><br />
BLAS_LIB = /usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
The source code must be edited for use with openmpi-4.<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
MPI_Address &#8594; MPI_Get_address<br><br />
MPI_Type_hindexed &#8594; MPI_Type_create_hindexed<br><br />
MPI_Type_struct &#8594; MPI_Type_create_struct<br><br />
</blockquote><br />
<br />
make<br />
make install<br />
sudo cp /usr/local/src/pexsi_v0.10.2/build/lib/libpexsi_linux_v0.10.2.a /usr/local/lib<br />
sudo cp /usr/local/src/pexsi_v0.10.2/build/include/* /usr/local/include/<br />
<br />
==== SpFFT ====<br />
Needed in SIRIUS.<br />
wget https://github.com/eth-cscs/SpFFT/archive/v0.9.9.tar.gz<br />
mv v0.9.9.tar.gz SpFFT-0.9.9.tar.gz<br />
tar -zxvf SpFFT-0.9.9.tar.gz<br />
cd SpFFT-0.9.9<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE -DSPFFT_OMP=ON -DSPFFT_MPI=ON -DSPFFT_INSTALL=ON -DSPFFT_STATIC=ON<br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libspfft.a<br />
</blockquote><br />
<br />
==== SIRIUS 6.5.3 ====<br />
SIRIUS is a domain specific library for electronic structure calculations.<br />
wget https://github.com/electronic-structure/SIRIUS/archive/v6.5.3.tar.gz<br />
mv v6.5.3.tar.gz SIRIUS-v6.5.3.tar.gz<br />
tar -zxvf SIRIUS-v6.5.3.tar.gz<br />
cd SIRIUS-6.5.3<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/share/apps/SIRIUS -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DGSL_CBLAS_LIBRARY=/usr/local/lib/libgsl.a -DGSL_CBLAS_LIBRARY_DEBUG=/usr/local/lib/libgslcblas.a -DGSL_LIBRARY=/usr/local/lib/libgsl.a -DGSL_LIBRARY_DEBUG=/usr/local/lib/libgsl.a -DUSE_ELPA=ON -DELPA_INCLUDE_DIR=/usr/local/include/elpa-2019.11.001/elpa -DELPA_LIBRARIES="/usr/local/lib/libelpa.a;/usr/local/lib/libscalapack.a;/usr/local/lib/libopenblas.a" -DUSE_VDWXC=ON -DLIBVDWXC_LIBRARIES="/usr/local/lib/libvdwxc.a;/usr/local/lib/libfftw3.a"<br />
make -j 24<br />
make install<br />
<br />
==== SIRIUS 6.3.2 ====<br />
wget https://www.cp2k.org/static/downloads/SIRIUS-6.3.2.tar.gz<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/share/apps/SIRIUS -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DUSE_SCALAPACK=ON -DSCALAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DBLAS_openblas_LIBRARY=/usr/local/lib/libopenblas.a -DLAPACK_openblas_LIBRARY=/usr/local/lib/libopenblas.a -DGSL_CBLAS_LIBRARY=/usr/local/lib/libgsl.a -DGSL_CBLAS_LIBRARY_DEBUG=/usr/local/lib/libgslcblas.a -DGSL_LIBRARY=/usr/local/lib/libgsl.a -DGSL_LIBRARY_DEBUG=/usr/local/lib/libgsl.a<br />
make -j 24<br />
make install -j 24<br />
cp src/mod_files/sirius.mod /share/apps/SIRIUS/include/<br />
<br />
==== Plumed ====<br />
Library that enables various enhanced sampling methods.<br />
tar -zxvf plumed-2.6.0.tgz<br />
./configure --prefix=/share/apps/plumed/plumed-2.6.0 --enable-shared=no<br />
<br />
change in Makefile.conf<br />
DYNAMIC_LIBS= -lstdc++ -lfftw3 -lgsl -lgslcblas -lz -ldl -llapack -lblas -fopenmp<br />
to<br />
DYNAMIC_LIBS= -lstdc++ /usr/local/lib/libfftw3.a /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a -lz -ldl /usr/local/lib/libopenblas_omp.a -fopenmp -lgfortran<br />
<br />
make -j 24<br />
make install<br />
<br />
==== QUIP ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Do not build using parallel-make<br />
</blockquote><br />
QUantum mechanics and Interatomic Potentials allows for a wider range of interaction potentials.<br />
<br />
wget https://www.cp2k.org/static/downloads/QUIP-cc83ceea5776c40fcb5ab224a25ab04d62175449.zip<br />
export QUIP_ARCH=linux_x86_64_gfortran_openmpi<br />
<br />
make config<br />
<br />
Please enter the linking options for LAPACK and BLAS libraries:<br />
fill in /usr/local/lib/libopenblas.a<br />
Do you want to compile with CP2K support? y<br><br />
Do you want to compile with VASP support? y<br><br />
Do you want to compile with Tight Binding (TB) support? y<br><br />
Please enter directories where METIS libraries are kept:<br />
fill in /share/apps/METIS/lib/<br />
<br />
make libquip<br />
mkdir -p /share/apps/QUIP/QUIP-2015<br />
make PREFIX=/share/apps/QUIP/QUIP-2015 QUIP_INSTALLDIR=/share/apps/QUIP/QUIP-2015 install<br />
mkdir /share/apps/QUIP/QUIP-2015/include/<br />
cp build/linux_x86_64_gfortran_openmpi/quip_unified_wrapper_module.mod /share/apps/QUIP/QUIP-2015/include/<br />
mkdir /share/apps/QUIP/QUIP-2015/lib/<br />
cp build/linux_x86_64_gfortran_openmpi/*.a /share/apps/QUIP/QUIP-2015/lib<br />
cp src/FoX-4.0.3/objs.linux_x86_64_gfortran_openmpi/lib/libFoX_*.a /share/apps/QUIP/QUIP-2015/lib<br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O2 -g -march=native -mno-avx512f -I/usr/local/include/ -L/usr/local/include/<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include -I/share/apps/QUIP/QUIP-2015/include/ -I/share/apps/METIS/include/ -I/share/apps/ParMETIS/include -I/share/apps/plumed/plumed-2.6.0/include/ -I/share/apps/SIRIUS/include/<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++ -lgomp -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightgreen; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3261<br><br />
Number of NEW tests 8<br><br />
Total number of tests 3269<br><br />
GREPME 0 0 3261 8 3269 X<br><br />
<br><br />
Summary: correct: 3261 / 3269; new: 8; 38min<br><br />
Status: OK<br />
</blockquote><br />
<br />
<br />
To solve SIRIUS warnings in the top of the output, use the latest version of SIRIUS and modify the following cp2k source files:<br />
cd cp2k-7.1<br />
cd src<br />
wget https://raw.githubusercontent.com/cp2k/cp2k/b1fc8cddc7ca9b30bf6de29e87ac9e3f14c60136/src/sirius_interface.F<br />
wget https://raw.githubusercontent.com/cp2k/cp2k/b1fc8cddc7ca9b30bf6de29e87ac9e3f14c60136/src/input_cp2k_pwdft.F<br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
# Tested with: GFortran 8.3.1, OPENMPICH 4.0.3, OpenBLAS 0.3.0, ScaLAPACK 2.1.0, FFTW 3.3.8, Libint 2.6.0, Libxc 4.3.4, libxsmm 1.15,<br><br />
# ELPA 2019.11.001, PLUMED 2.6.0, SPGLIB 1.12.2, QUIP-2015, ParMETIS-4.0.3, Pexsi-1.2.0, SIRIUS 6.5.3, SpFFT 0.9.9, libvdw 0.4.0<br><br />
# Author: David Dubbeldam (d.dubbeldam@uva.nl, University of Amsterdam, May 2020)<br><br />
<br><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O2 -g -march =native -mno-avx512f -I/usr/local/include/ -L/usr/local/include/<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
DFLAGS += -D__SIRIUS -D__PLUMED2 -D__QUIP -D__LIBPEXSI -D__ELPA<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include -I/share/apps/QUIP/QUIP-2015/include/ -I/share/apps/METIS/include/ -I/share/apps/ParMETIS/include<br><br />
FCFLAGS += -I/share/apps/plumed/plumed-2.6.0/include/ -I/share/apps/SIRIUS/include/sirius<br><br />
FCFLAGS += -I/usr/local/include/elpa-2019.11.001/elpa -I/usr/local/include/elpa-2019.11.001/modules<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = $(PLUMED_DEPENDENCIES) /share/apps/plumed/plumed-2.6.0/lib/libplumed.a<br><br />
LIBS += /usr/local/lib/libelpa.a<br><br />
LIBS += /usr/local/lib64/libpexsi.a<br><br />
LIBS += /share/apps/SIRIUS/lib64/libsirius.a<br><br />
LIBS += /usr/local/lib/libspfft.a<br><br />
LIBS += /usr/local/lib/libvdwxc.a<br><br />
LIBS += /usr/local/lib64/libsuperlu_dist.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libquip_core.a /share/apps/QUIP/QUIP-2015/lib/libatoms.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_sax.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_common.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_utils.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_fsys.a<br><br />
LIBS += /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a<br><br />
LIBS += /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a<br><br />
LIBS += -lnetcdf -lhdf5_hl -lhdf5 -lz -lsymspg -ldl -lpthread -lstdc++ -lgomp -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
All tests are fine, but the regression-test hangs on one job, after killing it the test results are<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Summary --------------------------------<br><br />
Number of FAILED tests 1<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3285<br><br />
Number of NEW tests 0<br><br />
Total number of tests 3286<br><br />
GREPME 1 0 3285 0 3286 X<br><br />
<br><br />
Summary: correct: 3285 / 3286; failed: 1; 95min<br><br />
Status: FAILED<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1266
CP2K compiling with Intel
2020-05-27T05:34:19Z
<p>David Dubbeldam: /* CP2K basic openmpi */</p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
<br />
edit ''Makefile'' in directory ''fortran''<br />
line 12 should read (''-lstdc++'' added)<br />
COMPUTE_LIB = -L../lib -lint2 -lstdc++<br />
line 37 change CXX to FC<br />
$(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^<br />
<br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
sudo make PREFIX=/usr/local FC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/ifort CC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icc CXX=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
CC = icc<br><br />
FC = ifort<br><br />
LD = ifort<br><br />
AR = ar -r<br><br />
<br><br />
DFLAGS = -D__MKL -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -I/usr/local/include<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/usr/local/include -L/usr/local/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += -Wl,--start-group \<br><br />
$(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_lapack95_lp64 -lmkl_blas95_lp64 \<br><br />
-Wl,--end-group -lpthread -lm<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br><br />
<br><br />
# Required due to memory leak that occurs if high optimisations are used<br><br />
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F<br><br />
$(FC) -c $(subst O2,O0,$(FCFLAGS)) $<<br />
</blockquote><br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 4<br><br />
Number of CORRECT tests 3197<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 4 3197 3 3204 X<br><br />
<br><br />
Summary: correct: 3197 / 3204; new: 3; wrong: 4; 50min<br><br />
Status: FAILED<br />
</blockquote><br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="/usr/lib64/openmpi4-intel/bin/mpifort"<br />
export CC="/usr/lib64/openmpi4-intel/bin/mpicc"<br />
export CXX="/usr/lib64/openmpi4-intel/bin/mpicxx"<br />
export F77=${FC}<br />
export F90=${FC}<br />
module load mpi/openmpi4-x86_64-intel<br />
export OMPI_MCA_pml=^ucx<br />
export OMPI_MCA_btl=self,tcp<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
ulimit -s unlimited<br />
<br />
==== CP2K basic openmpi ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
CC = /usr/lib64/openmpi4-intel/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-intel/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-intel/bin/mpifort<br><br />
AR = xiar -r<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__MKL -D__FFTW3 -D__SPGLIB<br><br />
DFLAGS += -D__LIBXC -D__LIBINT -D__LIBXSMM<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -fp-model precise -I/usr/local/include<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/usr/local/include -L/usr/local/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
INTEL_MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += $(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-Wl,--start-group \<br><br />
$(INTEL_MKL_LIB)/libmkl_scalapack_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_blacs_openmpi_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_intel_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_sequential.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_core.a \<br><br />
-Wl,--end-group<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lm -lstdc++ -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
# Required due to memory leak that occurs if high optimisations are used<br><br />
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F<br><br />
$(FC) -c $(subst O2,O0,$(FCFLAGS)) $<<br />
</blockquote><br />
<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 3<br><br />
Number of WRONG tests 2<br><br />
Number of CORRECT tests 3264<br><br />
Number of NEW tests 0<br><br />
Total number of tests 3269<br><br />
GREPME 3 2 3264 0 3269 X<br><br />
<br><br />
Summary: correct: 3264 / 3269; wrong: 2; failed: 3; 61min<br><br />
Status: FAILED<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1265
CP2K compiling with Intel
2020-05-26T19:43:37Z
<p>David Dubbeldam: /* CP2K basic openmpi */</p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
<br />
edit ''Makefile'' in directory ''fortran''<br />
line 12 should read (''-lstdc++'' added)<br />
COMPUTE_LIB = -L../lib -lint2 -lstdc++<br />
line 37 change CXX to FC<br />
$(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^<br />
<br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
sudo make PREFIX=/usr/local FC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/ifort CC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icc CXX=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
CC = icc<br><br />
FC = ifort<br><br />
LD = ifort<br><br />
AR = ar -r<br><br />
<br><br />
DFLAGS = -D__MKL -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -I/usr/local/include<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/usr/local/include -L/usr/local/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += -Wl,--start-group \<br><br />
$(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_lapack95_lp64 -lmkl_blas95_lp64 \<br><br />
-Wl,--end-group -lpthread -lm<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br><br />
<br><br />
# Required due to memory leak that occurs if high optimisations are used<br><br />
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F<br><br />
$(FC) -c $(subst O2,O0,$(FCFLAGS)) $<<br />
</blockquote><br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 4<br><br />
Number of CORRECT tests 3197<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 4 3197 3 3204 X<br><br />
<br><br />
Summary: correct: 3197 / 3204; new: 3; wrong: 4; 50min<br><br />
Status: FAILED<br />
</blockquote><br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="/usr/lib64/openmpi4-intel/bin/mpifort"<br />
export CC="/usr/lib64/openmpi4-intel/bin/mpicc"<br />
export CXX="/usr/lib64/openmpi4-intel/bin/mpicxx"<br />
export F77=${FC}<br />
export F90=${FC}<br />
module load mpi/openmpi4-x86_64-intel<br />
export OMPI_MCA_pml=^ucx<br />
export OMPI_MCA_btl=self,tcp<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
ulimit -s unlimited<br />
<br />
==== CP2K basic openmpi ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
CC = /usr/lib64/openmpi4-intel/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-intel/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-intel/bin/mpifort<br><br />
AR = xiar -r<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__MKL -D__FFTW3 -D__SPGLIB<br><br />
DFLAGS += -D__LIBXC -D__LIBINT -D__LIBXSMM<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -fp-model precise -I/usr/local/include<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/usr/local/include -L/usr/local/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
INTEL_MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += $(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-Wl,--start-group \<br><br />
$(INTEL_MKL_LIB)/libmkl_scalapack_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_blacs_openmpi_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_intel_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_sequential.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_core.a \<br><br />
-Wl,--end-group<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lm -lstdc++ -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
# Required due to memory leak that occurs if high optimisations are used<br><br />
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F<br><br />
$(FC) -c $(subst O2,O0,$(FCFLAGS)) $<<br />
</blockquote><br />
<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 3<br><br />
Number of WRONG tests 2<br><br />
Number of CORRECT tests 2846<br><br />
Number of NEW tests 8<br><br />
Total number of tests 2859<br><br />
GREPME 3 2 2846 8 2859 X<br><br />
<br><br />
Summary: correct: 2846 / 2859; new: 8; wrong: 2; failed: 3; 55min<br><br />
Status: FAILED<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1264
CP2K compiling with Intel
2020-05-26T19:40:12Z
<p>David Dubbeldam: /* CP2K basic openmpi */</p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
<br />
edit ''Makefile'' in directory ''fortran''<br />
line 12 should read (''-lstdc++'' added)<br />
COMPUTE_LIB = -L../lib -lint2 -lstdc++<br />
line 37 change CXX to FC<br />
$(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^<br />
<br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
sudo make PREFIX=/usr/local FC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/ifort CC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icc CXX=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
CC = icc<br><br />
FC = ifort<br><br />
LD = ifort<br><br />
AR = ar -r<br><br />
<br><br />
DFLAGS = -D__MKL -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -I/usr/local/include<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/usr/local/include -L/usr/local/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += -Wl,--start-group \<br><br />
$(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_lapack95_lp64 -lmkl_blas95_lp64 \<br><br />
-Wl,--end-group -lpthread -lm<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br><br />
<br><br />
# Required due to memory leak that occurs if high optimisations are used<br><br />
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F<br><br />
$(FC) -c $(subst O2,O0,$(FCFLAGS)) $<<br />
</blockquote><br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 4<br><br />
Number of CORRECT tests 3197<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 4 3197 3 3204 X<br><br />
<br><br />
Summary: correct: 3197 / 3204; new: 3; wrong: 4; 50min<br><br />
Status: FAILED<br />
</blockquote><br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="/usr/lib64/openmpi4-intel/bin/mpifort"<br />
export CC="/usr/lib64/openmpi4-intel/bin/mpicc"<br />
export CXX="/usr/lib64/openmpi4-intel/bin/mpicxx"<br />
export F77=${FC}<br />
export F90=${FC}<br />
module load mpi/openmpi4-x86_64-intel<br />
export OMPI_MCA_pml=^ucx<br />
export OMPI_MCA_btl=self,tcp<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
ulimit -s unlimited<br />
<br />
==== CP2K basic openmpi ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
CC = /usr/lib64/openmpi4-intel/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-intel/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-intel/bin/mpifort<br><br />
AR = xiar -r<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__MKL -D__FFTW3 -D__SPGLIB<br><br />
DFLAGS +=-D__LIBXC -D__LIBINT -D__LIBXSMM<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -fp-model precise -I/usr/local/include<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/usr/local/include -L/usr/local/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
INTEL_MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += $(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-Wl,--start-group \<br><br />
$(INTEL_MKL_LIB)/libmkl_scalapack_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_blacs_openmpi_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_intel_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_sequential.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_core.a \<br><br />
-Wl,--end-group<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lm -lstdc++ -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
# Required due to memory leak that occurs if high optimisations are used<br><br />
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F<br><br />
$(FC) -c $(subst O2,O0,$(FCFLAGS)) $<<br />
</blockquote><br />
<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 3<br><br />
Number of WRONG tests 2<br><br />
Number of CORRECT tests 2846<br><br />
Number of NEW tests 8<br><br />
Total number of tests 2859<br><br />
GREPME 3 2 2846 8 2859 X<br><br />
<br><br />
Summary: correct: 2846 / 2859; new: 8; wrong: 2; failed: 3; 55min<br><br />
Status: FAILED<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1263
CP2K compiling with Intel
2020-05-26T19:39:07Z
<p>David Dubbeldam: /* CP2K basic openmpi */</p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
<br />
edit ''Makefile'' in directory ''fortran''<br />
line 12 should read (''-lstdc++'' added)<br />
COMPUTE_LIB = -L../lib -lint2 -lstdc++<br />
line 37 change CXX to FC<br />
$(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^<br />
<br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
sudo make PREFIX=/usr/local FC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/ifort CC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icc CXX=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
CC = icc<br><br />
FC = ifort<br><br />
LD = ifort<br><br />
AR = ar -r<br><br />
<br><br />
DFLAGS = -D__MKL -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -I/usr/local/include<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/usr/local/include -L/usr/local/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += -Wl,--start-group \<br><br />
$(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_lapack95_lp64 -lmkl_blas95_lp64 \<br><br />
-Wl,--end-group -lpthread -lm<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br><br />
<br><br />
# Required due to memory leak that occurs if high optimisations are used<br><br />
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F<br><br />
$(FC) -c $(subst O2,O0,$(FCFLAGS)) $<<br />
</blockquote><br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 4<br><br />
Number of CORRECT tests 3197<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 4 3197 3 3204 X<br><br />
<br><br />
Summary: correct: 3197 / 3204; new: 3; wrong: 4; 50min<br><br />
Status: FAILED<br />
</blockquote><br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="/usr/lib64/openmpi4-intel/bin/mpifort"<br />
export CC="/usr/lib64/openmpi4-intel/bin/mpicc"<br />
export CXX="/usr/lib64/openmpi4-intel/bin/mpicxx"<br />
export F77=${FC}<br />
export F90=${FC}<br />
module load mpi/openmpi4-x86_64-intel<br />
export OMPI_MCA_pml=^ucx<br />
export OMPI_MCA_btl=self,tcp<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
ulimit -s unlimited<br />
<br />
==== CP2K basic openmpi ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
CC = /usr/lib64/openmpi4-intel/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-intel/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-intel/bin/mpifort<br><br />
AR = xiar -r<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__MKL -D__FFTW3 -D__SPGLIB<br><br />
DFLAG +=-D__LIBXC -D__LIBINT -D__LIBXSMM<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -fp-model precise -I/usr/local/include<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/usr/local/include -L/usr/local/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
INTEL_MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += $(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-Wl,--start-group \<br><br />
$(INTEL_MKL_LIB)/libmkl_scalapack_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_blacs_openmpi_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_intel_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_sequential.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_core.a \<br><br />
-Wl,--end-group<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lm -lstdc++ -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
# Required due to memory leak that occurs if high optimisations are used<br><br />
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F<br><br />
$(FC) -c $(subst O2,O0,$(FCFLAGS)) $<<br />
</blockquote><br />
<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 3<br><br />
Number of WRONG tests 2<br><br />
Number of CORRECT tests 2846<br><br />
Number of NEW tests 8<br><br />
Total number of tests 2859<br><br />
GREPME 3 2 2846 8 2859 X<br><br />
<br><br />
Summary: correct: 2846 / 2859; new: 8; wrong: 2; failed: 3; 55min<br><br />
Status: FAILED<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1262
CP2K compiling with Intel
2020-05-26T19:23:52Z
<p>David Dubbeldam: /* Serial */</p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
<br />
edit ''Makefile'' in directory ''fortran''<br />
line 12 should read (''-lstdc++'' added)<br />
COMPUTE_LIB = -L../lib -lint2 -lstdc++<br />
line 37 change CXX to FC<br />
$(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^<br />
<br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
sudo make PREFIX=/usr/local FC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/ifort CC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icc CXX=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
CC = icc<br><br />
FC = ifort<br><br />
LD = ifort<br><br />
AR = ar -r<br><br />
<br><br />
DFLAGS = -D__MKL -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -I/usr/local/include<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/usr/local/include -L/usr/local/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += -Wl,--start-group \<br><br />
$(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_lapack95_lp64 -lmkl_blas95_lp64 \<br><br />
-Wl,--end-group -lpthread -lm<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br><br />
<br><br />
# Required due to memory leak that occurs if high optimisations are used<br><br />
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F<br><br />
$(FC) -c $(subst O2,O0,$(FCFLAGS)) $<<br />
</blockquote><br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 4<br><br />
Number of CORRECT tests 3197<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 4 3197 3 3204 X<br><br />
<br><br />
Summary: correct: 3197 / 3204; new: 3; wrong: 4; 50min<br><br />
Status: FAILED<br />
</blockquote><br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="/usr/lib64/openmpi4-intel/bin/mpifort"<br />
export CC="/usr/lib64/openmpi4-intel/bin/mpicc"<br />
export CXX="/usr/lib64/openmpi4-intel/bin/mpicxx"<br />
export F77=${FC}<br />
export F90=${FC}<br />
module load mpi/openmpi4-x86_64-intel<br />
export OMPI_MCA_pml=^ucx<br />
export OMPI_MCA_btl=self,tcp<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
ulimit -s unlimited<br />
<br />
==== CP2K basic openmpi ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
CC = /usr/lib64/openmpi4-intel/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-intel/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-intel/bin/mpifort<br><br />
AR = xiar -r<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__MKL -D__FFTW3 -D__SPGLIB<br><br />
DFLAG +=-D__LIBXC -D__LIBINT -D__LIBXSMM<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -fp-model precise -I/usr/local/include<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/usr/local/include -L/usr/local/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
INTEL_MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += $(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-Wl,--start-group \<br><br />
$(INTEL_MKL_LIB)/libmkl_scalapack_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_blacs_openmpi_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_intel_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_sequential.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_core.a \<br><br />
-Wl,--end-group<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lm -lstdc++ -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
# Required due to memory leak that occurs if high optimisations are used<br><br />
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F<br><br />
$(FC) -c $(subst O2,O0,$(FCFLAGS)) $<<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1261
CP2K compiling with Intel
2020-05-26T19:19:40Z
<p>David Dubbeldam: /* CP2K */</p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
<br />
edit ''Makefile'' in directory ''fortran''<br />
line 12 should read (''-lstdc++'' added)<br />
COMPUTE_LIB = -L../lib -lint2 -lstdc++<br />
line 37 change CXX to FC<br />
$(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^<br />
<br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
sudo make PREFIX=/usr/local FC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/ifort CC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icc CXX=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
CC = icc<br><br />
FC = ifort<br><br />
LD = ifort<br><br />
AR = ar -r<br><br />
<br><br />
DFLAGS = -D__MKL -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -I/usr/local/include<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/usr/local/include -L/usr/local/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += -Wl,--start-group \<br><br />
$(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_lapack95_lp64 -lmkl_blas95_lp64 \<br><br />
-Wl,--end-group -lpthread -lm<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br><br />
<br><br />
# Required due to memory leak that occurs if high optimisations are used<br><br />
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F<br><br />
$(FC) -c $(subst O2,O0,$(FCFLAGS)) $<<br />
</blockquote><br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 4<br><br />
Number of CORRECT tests 3197<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 4 3197 3 3204 X<br><br />
<br><br />
Summary: correct: 3197 / 3204; new: 3; wrong: 4; 50min<br><br />
Status: FAILED<br />
</blockquote><br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="/usr/lib64/openmpi4-intel/bin/mpifort"<br />
export CC="/usr/lib64/openmpi4-intel/bin/mpicc"<br />
export CXX="/usr/lib64/openmpi4-intel/bin/mpicxx"<br />
export F77=${FC}<br />
export F90=${FC}<br />
module load mpi/openmpi4-x86_64-intel<br />
export OMPI_MCA_pml=^ucx<br />
export OMPI_MCA_btl=self,tcp<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
ulimit -s unlimited<br />
<br />
==== CP2K basic openmpi ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
CC = /usr/lib64/openmpi4-intel/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-intel/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-intel/bin/mpifort<br><br />
AR = xiar -r<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__MKL -D__FFTW3 -D__SPGLIB<br><br />
DFLAG +=-D__LIBXC -D__LIBINT -D__LIBXSMM<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -fp-model precise -I/usr/local/include<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/usr/local/include -L/usr/local/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
INTEL_MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += $(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-Wl,--start-group \<br><br />
$(INTEL_MKL_LIB)/libmkl_scalapack_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_blacs_openmpi_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_intel_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_sequential.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_core.a \<br><br />
-Wl,--end-group<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lm -lstdc++ -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
# Required due to memory leak that occurs if high optimisations are used<br><br />
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F<br><br />
$(FC) -c $(subst O2,O0,$(FCFLAGS)) $<<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1260
CP2K compiling with Intel
2020-05-26T19:18:12Z
<p>David Dubbeldam: /* Libxc */</p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
<br />
edit ''Makefile'' in directory ''fortran''<br />
line 12 should read (''-lstdc++'' added)<br />
COMPUTE_LIB = -L../lib -lint2 -lstdc++<br />
line 37 change CXX to FC<br />
$(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^<br />
<br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
sudo make PREFIX=/usr/local FC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/ifort CC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icc CXX=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
CC = icc<br><br />
FC = ifort<br><br />
LD = ifort<br><br />
AR = ar -r<br><br />
<br><br />
DFLAGS = -D__MKL -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -I/usr/local/include<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/usr/local/include -L/usr/local/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += -Wl,--start-group \<br><br />
/opt/intel/compilers_and_libraries_2020.1.217/linux/mkl/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_lapack95_lp64 -lmkl_blas95_lp64 \<br><br />
-Wl,--end-group -lpthread -lm<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br><br />
<br><br />
# Required due to memory leak that occurs if high optimisations are used<br><br />
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F<br><br />
$(FC) -c $(subst O2,O0,$(FCFLAGS)) $<<br />
</blockquote><br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 4<br><br />
Number of CORRECT tests 3197<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 4 3197 3 3204 X<br><br />
<br><br />
Summary: correct: 3197 / 3204; new: 3; wrong: 4; 50min<br><br />
Status: FAILED<br />
</blockquote><br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="/usr/lib64/openmpi4-intel/bin/mpifort"<br />
export CC="/usr/lib64/openmpi4-intel/bin/mpicc"<br />
export CXX="/usr/lib64/openmpi4-intel/bin/mpicxx"<br />
export F77=${FC}<br />
export F90=${FC}<br />
module load mpi/openmpi4-x86_64-intel<br />
export OMPI_MCA_pml=^ucx<br />
export OMPI_MCA_btl=self,tcp<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
ulimit -s unlimited<br />
<br />
==== CP2K basic openmpi ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
CC = /usr/lib64/openmpi4-intel/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-intel/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-intel/bin/mpifort<br><br />
AR = xiar -r<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__MKL -D__FFTW3 -D__SPGLIB<br><br />
DFLAG +=-D__LIBXC -D__LIBINT -D__LIBXSMM<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -fp-model precise -I/usr/local/include<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/usr/local/include -L/usr/local/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
INTEL_MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += $(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-Wl,--start-group \<br><br />
$(INTEL_MKL_LIB)/libmkl_scalapack_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_blacs_openmpi_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_intel_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_sequential.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_core.a \<br><br />
-Wl,--end-group<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lm -lstdc++ -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
# Required due to memory leak that occurs if high optimisations are used<br><br />
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F<br><br />
$(FC) -c $(subst O2,O0,$(FCFLAGS)) $<<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1259
CP2K compiling with Intel
2020-05-26T19:17:40Z
<p>David Dubbeldam: /* CP2K */</p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
<br />
edit ''Makefile'' in directory ''fortran''<br />
line 12 should read (''-lstdc++'' added)<br />
COMPUTE_LIB = -L../lib -lint2 -lstdc++<br />
line 37 change CXX to FC<br />
$(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^<br />
<br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
sudo make PREFIX=/usr/local FC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/ifort CC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icc CXX=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
CC = icc<br><br />
FC = ifort<br><br />
LD = ifort<br><br />
AR = ar -r<br><br />
<br><br />
DFLAGS = -D__MKL -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -I/usr/local/include<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/usr/local/include -L/usr/local/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += -Wl,--start-group \<br><br />
/opt/intel/compilers_and_libraries_2020.1.217/linux/mkl/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_lapack95_lp64 -lmkl_blas95_lp64 \<br><br />
-Wl,--end-group -lpthread -lm<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br><br />
<br><br />
# Required due to memory leak that occurs if high optimisations are used<br><br />
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F<br><br />
$(FC) -c $(subst O2,O0,$(FCFLAGS)) $<<br />
</blockquote><br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 4<br><br />
Number of CORRECT tests 3197<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 4 3197 3 3204 X<br><br />
<br><br />
Summary: correct: 3197 / 3204; new: 3; wrong: 4; 50min<br><br />
Status: FAILED<br />
</blockquote><br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="/usr/lib64/openmpi4-intel/bin/mpifort"<br />
export CC="/usr/lib64/openmpi4-intel/bin/mpicc"<br />
export CXX="/usr/lib64/openmpi4-intel/bin/mpicxx"<br />
export F77=${FC}<br />
export F90=${FC}<br />
module load mpi/openmpi4-x86_64-intel<br />
export OMPI_MCA_pml=^ucx<br />
export OMPI_MCA_btl=self,tcp<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
ulimit -s unlimited<br />
<br />
==== CP2K basic openmpi ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
CC = /usr/lib64/openmpi4-intel/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-intel/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-intel/bin/mpifort<br><br />
AR = xiar -r<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__MKL -D__FFTW3 -D__SPGLIB<br><br />
DFLAG +=-D__LIBXC -D__LIBINT -D__LIBXSMM<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -fp-model precise -I/usr/local/include<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/usr/local/include -L/usr/local/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
INTEL_MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += $(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-Wl,--start-group \<br><br />
$(INTEL_MKL_LIB)/libmkl_scalapack_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_blacs_openmpi_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_intel_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_sequential.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_core.a \<br><br />
-Wl,--end-group<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lm -lstdc++ -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
# Required due to memory leak that occurs if high optimisations are used<br><br />
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F<br><br />
$(FC) -c $(subst O2,O0,$(FCFLAGS)) $<<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1258
CP2K compiling with Intel
2020-05-26T19:14:28Z
<p>David Dubbeldam: /* preparation */</p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
<br />
edit ''Makefile'' in directory ''fortran''<br />
line 12 should read (''-lstdc++'' added)<br />
COMPUTE_LIB = -L../lib -lint2 -lstdc++<br />
line 37 change CXX to FC<br />
$(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^<br />
<br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
sudo make PREFIX=/usr/local FC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/ifort CC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icc CXX=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 4<br><br />
Number of CORRECT tests 3197<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 4 3197 3 3204 X<br><br />
<br><br />
Summary: correct: 3197 / 3204; new: 3; wrong: 4; 50min<br><br />
Status: FAILED<br />
</blockquote><br />
<br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="/usr/lib64/openmpi4-intel/bin/mpifort"<br />
export CC="/usr/lib64/openmpi4-intel/bin/mpicc"<br />
export CXX="/usr/lib64/openmpi4-intel/bin/mpicxx"<br />
export F77=${FC}<br />
export F90=${FC}<br />
module load mpi/openmpi4-x86_64-intel<br />
export OMPI_MCA_pml=^ucx<br />
export OMPI_MCA_btl=self,tcp<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
ulimit -s unlimited<br />
<br />
==== CP2K basic openmpi ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
CC = /usr/lib64/openmpi4-intel/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-intel/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-intel/bin/mpifort<br><br />
AR = xiar -r<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__MKL -D__FFTW3 -D__SPGLIB<br><br />
DFLAG +=-D__LIBXC -D__LIBINT -D__LIBXSMM<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -fp-model precise -I/usr/local/include<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/usr/local/include -L/usr/local/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
INTEL_MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += $(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-Wl,--start-group \<br><br />
$(INTEL_MKL_LIB)/libmkl_scalapack_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_blacs_openmpi_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_intel_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_sequential.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_core.a \<br><br />
-Wl,--end-group<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lm -lstdc++ -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
# Required due to memory leak that occurs if high optimisations are used<br><br />
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F<br><br />
$(FC) -c $(subst O2,O0,$(FCFLAGS)) $<<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1257
CP2K compiling with Intel
2020-05-26T19:13:38Z
<p>David Dubbeldam: /* Serial */</p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
<br />
edit ''Makefile'' in directory ''fortran''<br />
line 12 should read (''-lstdc++'' added)<br />
COMPUTE_LIB = -L../lib -lint2 -lstdc++<br />
line 37 change CXX to FC<br />
$(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^<br />
<br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
sudo make PREFIX=/usr/local FC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/ifort CC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icc CXX=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 4<br><br />
Number of CORRECT tests 3197<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 4 3197 3 3204 X<br><br />
<br><br />
Summary: correct: 3197 / 3204; new: 3; wrong: 4; 50min<br><br />
Status: FAILED<br />
</blockquote><br />
<br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="/usr/lib64/openmpi4-intel/bin/mpifort"<br />
export CC="/usr/lib64/openmpi4-intel/bin/mpicc"<br />
export CXX="/usr/lib64/openmpi4-intel/bin/mpicxx"<br />
export F77=${FC}<br />
export F90=${FC}<br />
module load mpi/openmpi4-x86_64-intel<br />
export OMPI_MCA_pml=^ucx<br />
export OMPI_MCA_btl=self,tcp<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
<br />
==== CP2K basic openmpi ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
CC = /usr/lib64/openmpi4-intel/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-intel/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-intel/bin/mpifort<br><br />
AR = xiar -r<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__MKL -D__FFTW3 -D__SPGLIB<br><br />
DFLAG +=-D__LIBXC -D__LIBINT -D__LIBXSMM<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -fp-model precise -I/usr/local/include<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/usr/local/include -L/usr/local/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
INTEL_MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += $(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-Wl,--start-group \<br><br />
$(INTEL_MKL_LIB)/libmkl_scalapack_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_blacs_openmpi_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_intel_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_sequential.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_core.a \<br><br />
-Wl,--end-group<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lm -lstdc++ -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
# Required due to memory leak that occurs if high optimisations are used<br><br />
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F<br><br />
$(FC) -c $(subst O2,O0,$(FCFLAGS)) $<<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1256
CP2K compiling with Intel
2020-05-26T19:12:52Z
<p>David Dubbeldam: /* CP2K basic openmpi */</p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
<br />
edit ''Makefile'' in directory ''fortran''<br />
line 12 should read (''-lstdc++'' added)<br />
COMPUTE_LIB = -L../lib -lint2 -lstdc++<br />
line 37 change CXX to FC<br />
$(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^<br />
<br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
sudo make PREFIX=/usr/local FC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/ifort CC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icc CXX=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 4<br><br />
Number of CORRECT tests 3197<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 4 3197 3 3204 X<br><br />
<br><br />
Summary: correct: 3197 / 3204; new: 3; wrong: 4; 50min<br><br />
Status: FAILED<br />
</blockquote><br />
<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="/usr/lib64/openmpi4-intel/bin/mpifort"<br />
export CC="/usr/lib64/openmpi4-intel/bin/mpicc"<br />
export CXX="/usr/lib64/openmpi4-intel/bin/mpicxx"<br />
export F77=${FC}<br />
export F90=${FC}<br />
module load mpi/openmpi4-x86_64-intel<br />
export OMPI_MCA_pml=^ucx<br />
export OMPI_MCA_btl=self,tcp<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
<br />
==== CP2K basic openmpi ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
CC = /usr/lib64/openmpi4-intel/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-intel/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-intel/bin/mpifort<br><br />
AR = xiar -r<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__MKL -D__FFTW3 -D__SPGLIB<br><br />
DFLAG +=-D__LIBXC -D__LIBINT -D__LIBXSMM<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -fp-model precise -I/usr/local/include<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/usr/local/include -L/usr/local/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
INTEL_MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += $(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-Wl,--start-group \<br><br />
$(INTEL_MKL_LIB)/libmkl_scalapack_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_blacs_openmpi_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_intel_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_sequential.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_core.a \<br><br />
-Wl,--end-group<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lm -lstdc++ -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
# Required due to memory leak that occurs if high optimisations are used<br><br />
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F<br><br />
$(FC) -c $(subst O2,O0,$(FCFLAGS)) $<<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1255
CP2K compiling with Intel
2020-05-26T19:12:06Z
<p>David Dubbeldam: </p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
<br />
edit ''Makefile'' in directory ''fortran''<br />
line 12 should read (''-lstdc++'' added)<br />
COMPUTE_LIB = -L../lib -lint2 -lstdc++<br />
line 37 change CXX to FC<br />
$(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^<br />
<br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
sudo make PREFIX=/usr/local FC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/ifort CC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icc CXX=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 4<br><br />
Number of CORRECT tests 3197<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 4 3197 3 3204 X<br><br />
<br><br />
Summary: correct: 3197 / 3204; new: 3; wrong: 4; 50min<br><br />
Status: FAILED<br />
</blockquote><br />
<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="/usr/lib64/openmpi4-intel/bin/mpifort"<br />
export CC="/usr/lib64/openmpi4-intel/bin/mpicc"<br />
export CXX="/usr/lib64/openmpi4-intel/bin/mpicxx"<br />
export F77=${FC}<br />
export F90=${FC}<br />
module load mpi/openmpi4-x86_64-intel<br />
export OMPI_MCA_pml=^ucx<br />
export OMPI_MCA_btl=self,tcp<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
<br />
==== CP2K basic openmpi ====<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
CC = /usr/lib64/openmpi4-intel/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-intel/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-intel/bin/mpifort<br><br />
AR = xiar -r<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__MKL -D__FFTW3 -D__SPGLIB<br><br />
DFLAG +=-D__LIBXC -D__LIBINT -D__LIBXSMM<br><br />
<br><br />
CFLAGS = $(DFLAGS) -O2 -xcore-avx2 -fp-model precise -I/usr/local/include<br><br />
<br><br />
FCFLAGS = $(DFLAGS) -O2 -funroll-loops -fpp -free -xcore-avx2 -I/usr/local/include -L/usr/local/include<br><br />
FCFLAGS += -fp-model precise<br><br />
FCFLAGS += -g -traceback<br><br />
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw<br><br />
<br><br />
LDFLAGS = $(FCFLAGS) -static-intel<br><br />
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br><br />
<br><br />
INTEL_MKL_LIB = ${MKLROOT}/lib/intel64<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += $(MKLROOT)/interfaces/fftw3xf/libfftw3xf_intel.a \<br><br />
-Wl,--start-group \<br><br />
$(INTEL_MKL_LIB)/libmkl_scalapack_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_blacs_openmpi_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_intel_lp64.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_sequential.a \<br><br />
$(INTEL_MKL_LIB)/libmkl_core.a \<br><br />
-Wl,--end-group<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lm -lstdc++ -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
# Required due to memory leak that occurs if high optimisations are used<br><br />
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F<br><br />
$(FC) -c $(subst O2,O0,$(FCFLAGS)) $<<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_GFortran&diff=1254
CP2K compiling with GFortran
2020-05-26T13:16:00Z
<p>David Dubbeldam: /* Libint2 */</p>
<hr />
<div>Compiling <br />
<br />
== Caveats ==<br />
<br />
# the gcc version 4.8.5 mostly works, but fails for the plumed-part in CP2K (plumed itself compiles fine)<br />
# gcc version 9.1.1 fails (compiles but lots of CP2K unit tests fail, even with ''-O2 -g -mtune=generic'')<br />
# gcc version 8.3.1 works, but sometimes optimization needs to be reduced (e.g. gsl).<br />
<br />
== Compiling subpackages ==<br />
<br />
The following assumes that CP2K will be build from static libraries installed in /usr/local using the ''devtoolset-8'' on ''rocks'' (centos 7.4).<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
export CC=/opt/rh/devtoolset-8/root/usr/bin/gcc<br />
export CXX=/opt/rh/devtoolset-8/root/usr/bin/g++<br />
export F77=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
export FC=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
<br />
==== Blas and Lapack ====<br />
wget https://github.com/Reference-LAPACK/lapack/archive/v3.9.0.tar.gz<br />
mv v3.9.0.tar.gz lapack-3.9.0.tar.gz<br />
tar -zxvf lapack-3.9.0.tar.gz<br />
cd lapack-3.9.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_COMPILER=gfortran -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Result: 100% tests passed, 0 tests failed out of 103<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib64/libblas.a<br><br />
/usr/local/lib64/liblapack.a<br><br />
/usr/local/lib64/libtmglib.a<br />
</blockquote><br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=0 USE_OPENMP=0 NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
./configure CC=gcc CXX=g++x F77=gfortran FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --disable-shared --enable-static<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br><br />
</blockquote><br />
sudo make install<br />
<br />
The serial version is created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3.a<br><br />
</blockquote><br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1"<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="'''-O1''' -march=native -mno-avx512f" CFLAGS="'''-O1''' -march=native -mno-avx512f" CXXFLAGS="'''-O1''' -march=native -mno-avx512f" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
============================================================================<br><br />
Testsuite summary for gsl 2.6<br><br />
============================================================================<br><br />
all checks passed<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libgslcblas.a<br><br />
/usr/local/lib/libgsl.a<br />
</blockquote><br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="'''-O2''' -march=native -mno-avx512f" CFLAGS="'''-O2''' -march=native -mno-avx512f" CXXFLAGS="'''-O2''' -march=native -mno-avx512f" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -march=native -mno-avx512f"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
make PREFIX=/usr/local FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== libvdwxc ====<br />
Libvdwxc is a general library for evaluating energy and potential for exchange-correlation (XC) functionals from the vdW-DF.<br />
wget https://www.cp2k.org/static/downloads/libvdwxc-0.4.0.tar.gz<br />
tar -zxvf libvdwxc-0.4.0.tar.gz<br />
./configure CC=gcc FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" FFTW3_INCLUDES="-I/usr/local/include/" FFTW3_LIBS="/usr/local/lib/libfftw3.a" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes<br />
make -j 24<br />
make check<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libvdwxcfort.a<br><br />
/usr/local/lib/libvdwxc.a<br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== Spglib ====<br />
A library for finding and handling crystal symmetries<br />
wget https://github.com/spglib/spglib/archive/v1.11.2.1.tar.gz<br />
mv v1.11.2.1.tar.gz spglib-v1.11.2.1.tar.gz<br />
tar -zxvf spglib-v1.11.2.1.tar.gz<br />
cd spglib-1.11.2.1<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsymspg.a<br />
</blockquote><br />
<br />
Rocks/Centos/RH 7 provides precompiled packages<br />
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/s/spglib-1.11.1-2.el7.x86_64.rpm<br />
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/s/spglib-devel-1.11.1-2.el7.x86_64.rpm<br />
sudo rpm -ivh spglib-1.11.1-2.el7.x86_64.rpm spglib-devel-1.11.1-2.el7.x86_64.rpm<br />
<br />
<br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
CC = gcc<br><br />
FC = gfortran<br><br />
LD = gfortran<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O2 -march=native -mno-avx512f -I/usr/local/include -L/usr/local/include<br><br />
<br><br />
DFLAGS = -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libopenblas.a<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
make ARCH=local VERSION=sopt test<br />
<blockquote style="background-color: lightgreen; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3201<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 0 3201 3 3204 X<br><br />
<br><br />
Summary: correct: 3201 / 3204; new: 3; 27min<br><br />
Status: OK<br />
</blockquote><br />
<br />
=== OpenMP ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
export CC=/opt/rh/devtoolset-8/root/usr/bin/gcc<br />
export CXX=/opt/rh/devtoolset-8/root/usr/bin/g++<br />
export F77=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
export FC=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=1 USE_OPENMP=1 NUM_THREADS=64 LIBNAMESUFFIX=omp NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local LIBNAMESUFFIX=omp NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas_omp.a<br />
</blockquote><br />
<br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
./configure CC=gcc CXX=g++x F77=gfortran FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-openmp --disable-shared --enable-static --enable-threads<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br />
FFTW threaded transforms passed basic tests!<br />
</blockquote><br />
sudo make install<br />
<br />
The serial version is created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3_omp.a<br><br />
/usr/local/lib/libfftw3_threads.a<br />
</blockquote><br />
<br />
==== Elpa ====<br />
ELPA replaces the ScaLapack SYEVD to improve the performance of Eigen-vector/value problems.<br />
wget http://elpa.mpcdf.mpg.de/html/Releases/2019.11.001/elpa-2019.11.001.tar.gz<br />
tar -zxvf elpa-2019.11.001.tar.gz<br />
cd elpa-2019.11.001<br />
./configure FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes --enable-openmp=yes --disable-avx512<br />
''hack'': change ''LIBS'' in Makefile: ''LIBS = /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas_omp.a''<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
some skipped, all others passed<br />
</blockquote> <br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa_constants.mod<br><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa_api.mod<br><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa.mod<br><br />
/usr/local/lib/libelpa_openmp.a<br />
</blockquote><br />
<br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
module load mpi/openmpi4-x86_64-gcc8<br />
export CC=/usr/lib64/openmpi4-gcc8/bin/mpicc<br />
export CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx<br />
export F77=/usr/lib64/openmpi4-gcc8/bin/mpif77<br />
export FC=/usr/lib64/openmpi4-gcc8/bin/mpifort<br />
<br />
Allow ''infiniband'' and ''vader'' to run<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Note that the used MPI installation must match the used Fortran compiler. If not, then MPI needs to be recompiled using the same compiler.<br />
</blockquote><br />
<br />
<br />
==== Blas and Lapack ====<br />
Lapack is needed for SIRIUS<br />
wget https://github.com/Reference-LAPACK/lapack/archive/v3.9.0.tar.gz<br />
mv v3.9.0.tar.gz lapack-3.9.0.tar.gz<br />
tar -zxvf lapack-3.9.0.tar.gz<br />
cd lapack-3.9.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_COMPILER=gfortran -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Result: 100% tests passed, 0 tests failed out of 103<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib64/libblas.a<br><br />
/usr/local/lib64/liblapack.a<br><br />
/usr/local/lib64/libtmglib.a<br />
</blockquote><br />
<br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=0 USE_OPENMP=0 NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
==== Scalapack ====<br />
wget https://www.cp2k.org/static/downloads/scalapack-2.1.0.tgz<br />
tar -zxvf scalapack-2.1.0.tgz<br />
scalapack-2.1.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_C_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_BUILD_TYPE=Release -DMPI_BASE_DIR=/usr/lib64/openmpi4-gcc9/lib -DMPI_INCLUDE_PATH=/usr/include/openmpi4-x86_64-gcc8 -DMPIEXEC=/usr/lib64/openmpi4-gcc8/bin/mpiexec -DBLAS_LIBRARIES=/usr/local/lib/libopenblas.a -DLAPACK_LIBRARIES=/usr/local/lib/libopenblas.a -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
100% tests passed, 0 tests failed out of 96<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/linscalapack.a<br />
</blockquote><br />
<br />
==== COSMA ====<br />
Distributed Communication-Optimal Matrix-Matrix Multiplication Algorithm. COSMA is a replacement of the ''pdgemm'' routine included in scalapack.<br />
git clone --recursive https://github.com/eth-cscs/COSMA cosma <br />
cd cosma<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_INCLUDEDIR=/usr/local/include -DCMAKE_BUILD_TYPE=Release -DCOSMA_BLAS=OPENBLAS -DCOSMA_SCALAPACK=CUSTOM -DBUILD_SHARED_LIBS=OFF -DSCALAPACK_LIBRARIES="/usr/local/lib/libscalapack.a;/usr/local/lib/libopenblas.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libquadmath.a" -DOPENBLAS_LIBRARIES="/usr/local/lib/libopenblas.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a"<br />
make test<br />
<br />
<blockquote style="background-color: red; border: solid thin grey;"><br />
20% tests passed, 4 tests failed out of 5<br><br />
<br><br />
Total Test time (real) = 7.99 sec<br><br />
<br><br />
The following tests FAILED:<br><br />
2 - test.multiply_using_layout (Failed)<br><br />
3 - test.multiply (Failed)<br><br />
4 - test.scalar_matmul (Failed)<br><br />
5 - test.pdgemm (Failed)<br><br />
Errors while running CTest<br><br />
</blockquote><br />
<br />
Place the library in front of the scalapack library during linking time.<br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
module load mpi/openmpi4-x86_64-gcc8<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
./configure CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx F77=/usr/lib64/openmpi4-gcc8/bin/mpifort FC=/usr/lib64/openmpi4-gcc8/bin/mpifort FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-openmp --enable-mpi --disable-shared --enable-static --enable-threads<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br><br />
FFTW threaded transforms passed basic tests!<br><br />
MPI FFTW transforms passed 10 tests, 1 CPU<br><br />
MPI FFTW transforms passed 10 tests, 2 CPUs<br><br />
MPI FFTW transforms passed 10 tests, 3 CPUs<br><br />
MPI FFTW transforms passed 10 tests, 4 CPUs<br><br />
MPI FFTW threaded transforms passed 10 tests!<br />
</blockquote><br />
sudo make install<br />
<br />
The serial, mpi, threaded, and openmp versions are created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3.a<br><br />
/usr/local/lib/libftw3_mpi.a<br> <br />
/usr/local/lib/libfftw3_omp.a<br><br />
/usr/local/lib/libfftw3_threads.a <br />
</blockquote><br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1"<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="'''-O1''' -march=native -mno-avx512f" CFLAGS="'''-O1''' -march=native -mno-avx512f" CXXFLAGS="'''-O1''' -march=native -mno-avx512f" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
============================================================================<br><br />
Testsuite summary for gsl 2.6<br><br />
============================================================================<br><br />
all checks passed<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libgslcblas.a<br><br />
/usr/local/lib/libgsl.a<br />
</blockquote><br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="'''-O2''' -march=native -mno-avx512f" CFLAGS="'''-O2''' -march=native -mno-avx512f" CXXFLAGS="'''-O2''' -march=native -mno-avx512f" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -march=native -mno-avx512f"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
make PREFIX=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== libvdwxc ====<br />
Libvdwxc is a general library for evaluating energy and potential for exchange-correlation (XC) functionals from the vdW-DF.<br />
wget https://www.cp2k.org/static/downloads/libvdwxc-0.4.0.tar.gz<br />
tar -zxvf libvdwxc-0.4.0.tar.gz<br />
./configure CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort FCFLAGS="-O3 -march=native -mno-avx512f" FFTW3_INCLUDES="-I/usr/local/include/" FFTW3_LIBS="/usr/local/lib/libfftw3_mpi.a /usr/local/lib/libfftw3.a" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes<br />
make -j 24<br />
make check<br />
sudo make install<br />
<br />
<br />
==== METIS ====<br />
tar -zxvf parmetis-4.0.3.tar.gz<br />
cd parmetis-4.0.3<br />
cd metis<br />
make config prefix=/share/apps/METIS CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 24<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/share/apps/METIS/lib/libmetis.a<br />
</blockquote><br />
<br />
==== ParMETIS ====<br />
tar -zxvf parmetis-4.0.3.tar.gz<br />
cd parmetis-4.0.3<br />
make config prefix=/share/apps/ParMETIS CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 24<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/share/apps/ParMETIS/lib/libparmetis.a<br />
</blockquote><br />
<br />
==== Superlu-6.1.1 ====<br />
wget https://github.com/xiaoyeli/superlu_dist/archive/v6.1.1.tar.gz<br />
mv v6.1.1.tar.gz superlu_dist_6.1.1.tar.gz<br />
tar -zxvf superlu_dist_6.1.1.tar.gz<br />
mkdir build1<br />
cd build1<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DTPL_PARMETIS_LIBRARIES="-L/share/apps/METIS/lib -L/share/apps/ParMETIS/lib /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a -pthread -Wl,-rpath -Wl,/usr/lib64/openmpi4-gcc8/lib -Wl,--enable-new-dtags -L/usr/lib64/openmpi4-gcc8/lib -lmpi_mpifh -lmpi_cxx -lmpi" -DTPL_PARMETIS_INCLUDE_DIRS=/share/apps/ParMETIS/include -DBUILD_STATIC_LIBS=OFF -DCMAKE_C_FLAGS="-std=c99 -O3 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DTPL_LAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DTPL_BLAS_LIBRARIES=/usr/local/lib/libopenblas.a<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 24 tests passed<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsuperlu_dist.a<br />
</blockquote><br />
<br />
==== Superlu-5.1.2 ====<br />
wget http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_dist_5.1.2.tar.gz<br />
tar -zxvf superlu_dist_5.1.2.tar.gz<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DTPL_PARMETIS_LIBRARIES="-L/share/apps/METIS/lib -L/share/apps/ParMETIS/lib /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a -pthread -Wl,-rpath -Wl,/usr/lib64/openmpi4-gcc8/lib -Wl,--enable-new-dtags -L/usr/lib64/openmpi4-gcc8/lib -lmpi_mpifh -lmpi_cxx -lmpi" -DTPL_PARMETIS_INCLUDE_DIRS=/share/apps/ParMETIS/include -DCMAKE_C_FLAGS="-std=c99 -O3 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DTPL_BLAS_LIBRARIES=/usr/local/lib/libopenblas_omp.a<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Running tests...<br><br />
Test project /usr/local/src/SuperLU_DIST_5.1.2/build<br><br />
Start 1: pddrive<br><br />
1/2 Test #1: pddrive .......................... Passed 79.70 sec<br><br />
Start 2: pddrive1<br><br />
2/2 Test #2: pddrive1 ......................... Passed 78.40 sec<br><br />
<br><br />
100% tests passed, 0 tests failed out of 2<br><br />
<br><br />
Total Test time (real) = 158.10 sec<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsuperlu_dist.a<br />
</blockquote><br />
<br />
<br />
==== Elpa ====<br />
ELPA replaces the ScaLapack SYEVD to improve the performance of Eigen-vector/value problems.<br />
wget http://elpa.mpcdf.mpg.de/html/Releases/2019.11.001/elpa-2019.11.001.tar.gz<br />
tar -zxvf elpa-2019.11.001.tar.gz<br />
cd elpa-2019.11.001<br />
./configure FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes --enable-openmp=no --disable-avx512<br />
''hack'': change ''LIBS'' in Makefile: ''LIBS = /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a''<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
some skipped, all others passed<br />
</blockquote> <br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/include/elpa-2019.11.001/modules/elpa_constants.mod<br><br />
/usr/local/include/elpa-2019.11.001/modules/elpa_api.mod<br><br />
/usr/local/include/elpa-2019.11.001/modules/elpa.mod<br><br />
/usr/local/lib/libelpa.a<br />
</blockquote><br />
<br />
==== Pexsi 1.2 ====<br />
The source code must be edited for use with openmpi-4.<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
MPI_Address &#8594; MPI_Get_address<br><br />
MPI_Type_hindexed &#8594; MPI_Type_create_hindexed<br><br />
MPI_Type_struct &#8594; MPI_Type_create_struct<br><br />
MPI_Errhandler_set&#8594; remove lines<br />
</blockquote><br />
The Pole EXpansion and Selected Inversion (PEXSI) method requires the PEXSI library and two dependencies (ParMETIS and SuperLU_DIST).<br />
wget https://www.cp2k.org/static/downloads/pexsi_v1.2.0.tar.gz<br />
tar -zxvf pexsi_v1.2.0.tar.gz<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DMETIS_LIBRARIES=/share/apps/METIS/lib/libmetis.a -DPARMETIS_LIBRARIES=/share/apps/ParMETIS/lib/libparmetis.a -Dlinalg_BLAS_LIBRARIES=/usr/local/lib/libopenblas.a -Dlinalg_LAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DCMAKE_CXX_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_C_FLAGS="-std=c99 -O2 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
<br />
edit ''cmake/modules/FindLinAlg.cmake'' uncomment line 373 and 375.<br />
<br />
make -j 24<br />
sudo make install<br />
sudo make finstall<br />
<br />
==== Pexsi 0.10.2 ====<br />
cp config/make.inc.linux.gnu ./make.inc<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PAR_ND_LIBRARY = parmetis<br><br />
SEQ_ND_LIBRARY = metis<br><br />
<br><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
CXX = /usr/lib64/openmpi4-gcc8/bin/mpicxx<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LOADER = /usr/lib64/openmpi4-gcc8/bin/mpicxx<br><br />
<br><br />
DSUPERLU_DIR = /usr/local<br><br />
METIS_DIR = /share/apps/METIS<br><br />
PARMETIS_DIR = /share/apps/ParMETIS<br><br />
<br><br />
DSUPERLU_INCLUDE = -I/usr/local/include<br><br />
<br><br />
GFORTRAN_LIB = /opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a<br><br />
LAPACK_LIB = /usr/local/lib/libscalapack.a<br><br />
BLAS_LIB = /usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
The source code must be edited for use with openmpi-4.<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
MPI_Address &#8594; MPI_Get_address<br><br />
MPI_Type_hindexed &#8594; MPI_Type_create_hindexed<br><br />
MPI_Type_struct &#8594; MPI_Type_create_struct<br><br />
</blockquote><br />
<br />
make<br />
make install<br />
sudo cp /usr/local/src/pexsi_v0.10.2/build/lib/libpexsi_linux_v0.10.2.a /usr/local/lib<br />
sudo cp /usr/local/src/pexsi_v0.10.2/build/include/* /usr/local/include/<br />
<br />
==== SpFFT ====<br />
Needed in SIRIUS.<br />
wget https://github.com/eth-cscs/SpFFT/archive/v0.9.9.tar.gz<br />
mv v0.9.9.tar.gz SpFFT-0.9.9.tar.gz<br />
tar -zxvf SpFFT-0.9.9.tar.gz<br />
cd SpFFT-0.9.9<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE -DSPFFT_OMP=ON -DSPFFT_MPI=ON -DSPFFT_INSTALL=ON -DSPFFT_STATIC=ON<br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libspfft.a<br />
</blockquote><br />
<br />
==== SIRIUS 6.5.3 ====<br />
SIRIUS is a domain specific library for electronic structure calculations.<br />
wget https://github.com/electronic-structure/SIRIUS/archive/v6.5.3.tar.gz<br />
mv v6.5.3.tar.gz SIRIUS-v6.5.3.tar.gz<br />
tar -zxvf SIRIUS-v6.5.3.tar.gz<br />
cd SIRIUS-6.5.3<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/share/apps/SIRIUS -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DGSL_CBLAS_LIBRARY=/usr/local/lib/libgsl.a -DGSL_CBLAS_LIBRARY_DEBUG=/usr/local/lib/libgslcblas.a -DGSL_LIBRARY=/usr/local/lib/libgsl.a -DGSL_LIBRARY_DEBUG=/usr/local/lib/libgsl.a -DUSE_ELPA=ON -DELPA_INCLUDE_DIR=/usr/local/include/elpa-2019.11.001/elpa -DELPA_LIBRARIES="/usr/local/lib/libelpa.a;/usr/local/lib/libscalapack.a;/usr/local/lib/libopenblas.a" -DUSE_VDWXC=ON -DLIBVDWXC_LIBRARIES="/usr/local/lib/libvdwxc.a;/usr/local/lib/libfftw3.a"<br />
make -j 24<br />
make install<br />
<br />
==== SIRIUS 6.3.2 ====<br />
wget https://www.cp2k.org/static/downloads/SIRIUS-6.3.2.tar.gz<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/share/apps/SIRIUS -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DUSE_SCALAPACK=ON -DSCALAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DBLAS_openblas_LIBRARY=/usr/local/lib/libopenblas.a -DLAPACK_openblas_LIBRARY=/usr/local/lib/libopenblas.a -DGSL_CBLAS_LIBRARY=/usr/local/lib/libgsl.a -DGSL_CBLAS_LIBRARY_DEBUG=/usr/local/lib/libgslcblas.a -DGSL_LIBRARY=/usr/local/lib/libgsl.a -DGSL_LIBRARY_DEBUG=/usr/local/lib/libgsl.a<br />
make -j 24<br />
make install -j 24<br />
cp src/mod_files/sirius.mod /share/apps/SIRIUS/include/<br />
<br />
==== Plumed ====<br />
Library that enables various enhanced sampling methods.<br />
tar -zxvf plumed-2.6.0.tgz<br />
./configure --prefix=/share/apps/plumed/plumed-2.6.0 --enable-shared=no<br />
<br />
change in Makefile.conf<br />
DYNAMIC_LIBS= -lstdc++ -lfftw3 -lgsl -lgslcblas -lz -ldl -llapack -lblas -fopenmp<br />
to<br />
DYNAMIC_LIBS= -lstdc++ /usr/local/lib/libfftw3.a /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a -lz -ldl /usr/local/lib/libopenblas_omp.a -fopenmp -lgfortran<br />
<br />
make -j 24<br />
make install<br />
<br />
==== QUIP ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Do not build using parallel-make<br />
</blockquote><br />
QUantum mechanics and Interatomic Potentials allows for a wider range of interaction potentials.<br />
<br />
wget https://www.cp2k.org/static/downloads/QUIP-cc83ceea5776c40fcb5ab224a25ab04d62175449.zip<br />
export QUIP_ARCH=linux_x86_64_gfortran_openmpi<br />
<br />
make config<br />
<br />
Please enter the linking options for LAPACK and BLAS libraries:<br />
fill in /usr/local/lib/libopenblas.a<br />
Do you want to compile with CP2K support? y<br><br />
Do you want to compile with VASP support? y<br><br />
Do you want to compile with Tight Binding (TB) support? y<br><br />
Please enter directories where METIS libraries are kept:<br />
fill in /share/apps/METIS/lib/<br />
<br />
make libquip<br />
mkdir -p /share/apps/QUIP/QUIP-2015<br />
make PREFIX=/share/apps/QUIP/QUIP-2015 QUIP_INSTALLDIR=/share/apps/QUIP/QUIP-2015 install<br />
mkdir /share/apps/QUIP/QUIP-2015/include/<br />
cp build/linux_x86_64_gfortran_openmpi/quip_unified_wrapper_module.mod /share/apps/QUIP/QUIP-2015/include/<br />
mkdir /share/apps/QUIP/QUIP-2015/lib/<br />
cp build/linux_x86_64_gfortran_openmpi/*.a /share/apps/QUIP/QUIP-2015/lib<br />
cp src/FoX-4.0.3/objs.linux_x86_64_gfortran_openmpi/lib/libFoX_*.a /share/apps/QUIP/QUIP-2015/lib<br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O2 -g -march=native -mno-avx512f -I/usr/local/include/ -L/usr/local/include/<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include -I/share/apps/QUIP/QUIP-2015/include/ -I/share/apps/METIS/include/ -I/share/apps/ParMETIS/include -I/share/apps/plumed/plumed-2.6.0/include/ -I/share/apps/SIRIUS/include/<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++ -lgomp -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightgreen; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3261<br><br />
Number of NEW tests 8<br><br />
Total number of tests 3269<br><br />
GREPME 0 0 3261 8 3269 X<br><br />
<br><br />
Summary: correct: 3261 / 3269; new: 8; 38min<br><br />
Status: OK<br />
</blockquote><br />
<br />
<br />
To solve SIRIUS warnings in the top of the output, use the latest version of SIRIUS and modify the following cp2k source files:<br />
cd cp2k-7.1<br />
cd src<br />
wget https://raw.githubusercontent.com/cp2k/cp2k/b1fc8cddc7ca9b30bf6de29e87ac9e3f14c60136/src/sirius_interface.F<br />
wget https://raw.githubusercontent.com/cp2k/cp2k/b1fc8cddc7ca9b30bf6de29e87ac9e3f14c60136/src/input_cp2k_pwdft.F<br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
# Tested with: GFortran 8.3.1, OPENMPICH 4.0.3, OpenBLAS 0.3.0, ScaLAPACK 2.1.0, FFTW 3.3.8, Libint 2.6.0, Libxc 4.3.4, libxsmm 1.15,<br><br />
# ELPA 2019.11.001, PLUMED 2.6.0, SPGLIB 1.12.2, QUIP-2015, ParMETIS-4.0.3, Pexsi-1.2.0, SIRIUS 6.5.3, SpFFT 0.9.9, libvdw 0.4.0<br><br />
# Author: David Dubbeldam (d.dubbeldam@uva.nl, University of Amsterdam, May 2020)<br><br />
<br><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O2 -g -march =native -mno-avx512f -I/usr/local/include/ -L/usr/local/include/<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
DFLAGS += -D__SIRIUS -D__PLUMED2 -D__QUIP -D__LIBPEXSI -D__ELPA<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include -I/share/apps/QUIP/QUIP-2015/include/ -I/share/apps/METIS/include/ -I/share/apps/ParMETIS/include<br><br />
FCFLAGS += -I/share/apps/plumed/plumed-2.6.0/include/ -I/share/apps/SIRIUS/include/sirius<br><br />
FCFLAGS += -I/usr/local/include/elpa-2019.11.001/elpa -I/usr/local/include/elpa-2019.11.001/modules<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = $(PLUMED_DEPENDENCIES) /share/apps/plumed/plumed-2.6.0/lib/libplumed.a<br><br />
LIBS += /usr/local/lib/libelpa.a<br><br />
LIBS += /usr/local/lib64/libpexsi.a<br><br />
LIBS += /share/apps/SIRIUS/lib64/libsirius.a<br><br />
LIBS += /usr/local/lib/libspfft.a<br><br />
LIBS += /usr/local/lib/libvdwxc.a<br><br />
LIBS += /usr/local/lib64/libsuperlu_dist.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libquip_core.a /share/apps/QUIP/QUIP-2015/lib/libatoms.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_sax.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_common.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_utils.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_fsys.a<br><br />
LIBS += /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a<br><br />
LIBS += /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a<br><br />
LIBS += -lnetcdf -lhdf5_hl -lhdf5 -lz -lsymspg -ldl -lpthread -lstdc++ -lgomp -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
All tests are fine, but the regression-test hangs on one job, after killing it the test results are<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Number of FAILED tests 1<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3285<br><br />
Number of NEW tests 0<br><br />
Total number of tests 3286<br><br />
GREPME 1 0 3285 0 3286 X<br><br />
<br><br />
Summary: correct: 3285 / 3286; failed: 1; 95min<br><br />
Status: FAILED<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_GFortran&diff=1253
CP2K compiling with GFortran
2020-05-26T13:15:43Z
<p>David Dubbeldam: /* Libint2 */</p>
<hr />
<div>Compiling <br />
<br />
== Caveats ==<br />
<br />
# the gcc version 4.8.5 mostly works, but fails for the plumed-part in CP2K (plumed itself compiles fine)<br />
# gcc version 9.1.1 fails (compiles but lots of CP2K unit tests fail, even with ''-O2 -g -mtune=generic'')<br />
# gcc version 8.3.1 works, but sometimes optimization needs to be reduced (e.g. gsl).<br />
<br />
== Compiling subpackages ==<br />
<br />
The following assumes that CP2K will be build from static libraries installed in /usr/local using the ''devtoolset-8'' on ''rocks'' (centos 7.4).<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
export CC=/opt/rh/devtoolset-8/root/usr/bin/gcc<br />
export CXX=/opt/rh/devtoolset-8/root/usr/bin/g++<br />
export F77=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
export FC=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
<br />
==== Blas and Lapack ====<br />
wget https://github.com/Reference-LAPACK/lapack/archive/v3.9.0.tar.gz<br />
mv v3.9.0.tar.gz lapack-3.9.0.tar.gz<br />
tar -zxvf lapack-3.9.0.tar.gz<br />
cd lapack-3.9.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_COMPILER=gfortran -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Result: 100% tests passed, 0 tests failed out of 103<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib64/libblas.a<br><br />
/usr/local/lib64/liblapack.a<br><br />
/usr/local/lib64/libtmglib.a<br />
</blockquote><br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=0 USE_OPENMP=0 NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
./configure CC=gcc CXX=g++x F77=gfortran FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --disable-shared --enable-static<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br><br />
</blockquote><br />
sudo make install<br />
<br />
The serial version is created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3.a<br><br />
</blockquote><br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1"<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="'''-O1''' -march=native -mno-avx512f" CFLAGS="'''-O1''' -march=native -mno-avx512f" CXXFLAGS="'''-O1''' -march=native -mno-avx512f" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
============================================================================<br><br />
Testsuite summary for gsl 2.6<br><br />
============================================================================<br><br />
all checks passed<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libgslcblas.a<br><br />
/usr/local/lib/libgsl.a<br />
</blockquote><br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="'''-O2''' -march=native -mno-avx512f" CFLAGS="'''-O2''' -march=native -mno-avx512f" CXXFLAGS="'''-O2''' -march=native -mno-avx512f" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -march=native -mno-avx512f"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
make PREFIX=/usr/local FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== libvdwxc ====<br />
Libvdwxc is a general library for evaluating energy and potential for exchange-correlation (XC) functionals from the vdW-DF.<br />
wget https://www.cp2k.org/static/downloads/libvdwxc-0.4.0.tar.gz<br />
tar -zxvf libvdwxc-0.4.0.tar.gz<br />
./configure CC=gcc FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" FFTW3_INCLUDES="-I/usr/local/include/" FFTW3_LIBS="/usr/local/lib/libfftw3.a" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes<br />
make -j 24<br />
make check<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libvdwxcfort.a<br><br />
/usr/local/lib/libvdwxc.a<br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== Spglib ====<br />
A library for finding and handling crystal symmetries<br />
wget https://github.com/spglib/spglib/archive/v1.11.2.1.tar.gz<br />
mv v1.11.2.1.tar.gz spglib-v1.11.2.1.tar.gz<br />
tar -zxvf spglib-v1.11.2.1.tar.gz<br />
cd spglib-1.11.2.1<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsymspg.a<br />
</blockquote><br />
<br />
Rocks/Centos/RH 7 provides precompiled packages<br />
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/s/spglib-1.11.1-2.el7.x86_64.rpm<br />
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/s/spglib-devel-1.11.1-2.el7.x86_64.rpm<br />
sudo rpm -ivh spglib-1.11.1-2.el7.x86_64.rpm spglib-devel-1.11.1-2.el7.x86_64.rpm<br />
<br />
<br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
CC = gcc<br><br />
FC = gfortran<br><br />
LD = gfortran<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O2 -march=native -mno-avx512f -I/usr/local/include -L/usr/local/include<br><br />
<br><br />
DFLAGS = -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libopenblas.a<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
make ARCH=local VERSION=sopt test<br />
<blockquote style="background-color: lightgreen; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3201<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 0 3201 3 3204 X<br><br />
<br><br />
Summary: correct: 3201 / 3204; new: 3; 27min<br><br />
Status: OK<br />
</blockquote><br />
<br />
=== OpenMP ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
export CC=/opt/rh/devtoolset-8/root/usr/bin/gcc<br />
export CXX=/opt/rh/devtoolset-8/root/usr/bin/g++<br />
export F77=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
export FC=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=1 USE_OPENMP=1 NUM_THREADS=64 LIBNAMESUFFIX=omp NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local LIBNAMESUFFIX=omp NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas_omp.a<br />
</blockquote><br />
<br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
./configure CC=gcc CXX=g++x F77=gfortran FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-openmp --disable-shared --enable-static --enable-threads<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br />
FFTW threaded transforms passed basic tests!<br />
</blockquote><br />
sudo make install<br />
<br />
The serial version is created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3_omp.a<br><br />
/usr/local/lib/libfftw3_threads.a<br />
</blockquote><br />
<br />
==== Elpa ====<br />
ELPA replaces the ScaLapack SYEVD to improve the performance of Eigen-vector/value problems.<br />
wget http://elpa.mpcdf.mpg.de/html/Releases/2019.11.001/elpa-2019.11.001.tar.gz<br />
tar -zxvf elpa-2019.11.001.tar.gz<br />
cd elpa-2019.11.001<br />
./configure FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes --enable-openmp=yes --disable-avx512<br />
''hack'': change ''LIBS'' in Makefile: ''LIBS = /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas_omp.a''<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
some skipped, all others passed<br />
</blockquote> <br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa_constants.mod<br><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa_api.mod<br><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa.mod<br><br />
/usr/local/lib/libelpa_openmp.a<br />
</blockquote><br />
<br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
module load mpi/openmpi4-x86_64-gcc8<br />
export CC=/usr/lib64/openmpi4-gcc8/bin/mpicc<br />
export CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx<br />
export F77=/usr/lib64/openmpi4-gcc8/bin/mpif77<br />
export FC=/usr/lib64/openmpi4-gcc8/bin/mpifort<br />
<br />
Allow ''infiniband'' and ''vader'' to run<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Note that the used MPI installation must match the used Fortran compiler. If not, then MPI needs to be recompiled using the same compiler.<br />
</blockquote><br />
<br />
<br />
==== Blas and Lapack ====<br />
Lapack is needed for SIRIUS<br />
wget https://github.com/Reference-LAPACK/lapack/archive/v3.9.0.tar.gz<br />
mv v3.9.0.tar.gz lapack-3.9.0.tar.gz<br />
tar -zxvf lapack-3.9.0.tar.gz<br />
cd lapack-3.9.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_COMPILER=gfortran -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Result: 100% tests passed, 0 tests failed out of 103<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib64/libblas.a<br><br />
/usr/local/lib64/liblapack.a<br><br />
/usr/local/lib64/libtmglib.a<br />
</blockquote><br />
<br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=0 USE_OPENMP=0 NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
==== Scalapack ====<br />
wget https://www.cp2k.org/static/downloads/scalapack-2.1.0.tgz<br />
tar -zxvf scalapack-2.1.0.tgz<br />
scalapack-2.1.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_C_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_BUILD_TYPE=Release -DMPI_BASE_DIR=/usr/lib64/openmpi4-gcc9/lib -DMPI_INCLUDE_PATH=/usr/include/openmpi4-x86_64-gcc8 -DMPIEXEC=/usr/lib64/openmpi4-gcc8/bin/mpiexec -DBLAS_LIBRARIES=/usr/local/lib/libopenblas.a -DLAPACK_LIBRARIES=/usr/local/lib/libopenblas.a -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
100% tests passed, 0 tests failed out of 96<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/linscalapack.a<br />
</blockquote><br />
<br />
==== COSMA ====<br />
Distributed Communication-Optimal Matrix-Matrix Multiplication Algorithm. COSMA is a replacement of the ''pdgemm'' routine included in scalapack.<br />
git clone --recursive https://github.com/eth-cscs/COSMA cosma <br />
cd cosma<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_INCLUDEDIR=/usr/local/include -DCMAKE_BUILD_TYPE=Release -DCOSMA_BLAS=OPENBLAS -DCOSMA_SCALAPACK=CUSTOM -DBUILD_SHARED_LIBS=OFF -DSCALAPACK_LIBRARIES="/usr/local/lib/libscalapack.a;/usr/local/lib/libopenblas.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libquadmath.a" -DOPENBLAS_LIBRARIES="/usr/local/lib/libopenblas.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a"<br />
make test<br />
<br />
<blockquote style="background-color: red; border: solid thin grey;"><br />
20% tests passed, 4 tests failed out of 5<br><br />
<br><br />
Total Test time (real) = 7.99 sec<br><br />
<br><br />
The following tests FAILED:<br><br />
2 - test.multiply_using_layout (Failed)<br><br />
3 - test.multiply (Failed)<br><br />
4 - test.scalar_matmul (Failed)<br><br />
5 - test.pdgemm (Failed)<br><br />
Errors while running CTest<br><br />
</blockquote><br />
<br />
Place the library in front of the scalapack library during linking time.<br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
module load mpi/openmpi4-x86_64-gcc8<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
./configure CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx F77=/usr/lib64/openmpi4-gcc8/bin/mpifort FC=/usr/lib64/openmpi4-gcc8/bin/mpifort FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-openmp --enable-mpi --disable-shared --enable-static --enable-threads<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br><br />
FFTW threaded transforms passed basic tests!<br><br />
MPI FFTW transforms passed 10 tests, 1 CPU<br><br />
MPI FFTW transforms passed 10 tests, 2 CPUs<br><br />
MPI FFTW transforms passed 10 tests, 3 CPUs<br><br />
MPI FFTW transforms passed 10 tests, 4 CPUs<br><br />
MPI FFTW threaded transforms passed 10 tests!<br />
</blockquote><br />
sudo make install<br />
<br />
The serial, mpi, threaded, and openmp versions are created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3.a<br><br />
/usr/local/lib/libftw3_mpi.a<br> <br />
/usr/local/lib/libfftw3_omp.a<br><br />
/usr/local/lib/libfftw3_threads.a <br />
</blockquote><br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1"<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="'''-O1''' -march=native -mno-avx512f" CFLAGS="'''-O1''' -march=native -mno-avx512f" CXXFLAGS="'''-O1''' -march=native -mno-avx512f" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
============================================================================<br><br />
Testsuite summary for gsl 2.6<br><br />
============================================================================<br><br />
all checks passed<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libgslcblas.a<br><br />
/usr/local/lib/libgsl.a<br />
</blockquote><br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="'''-O2''' -march=native -mno-avx512f" CFLAGS="'''-O2''' -march=native -mno-avx512f" CXXFLAGS="'''-O2''' -march=native -mno-avx512f" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -march=native -mno-avx512f"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
make PREFIX=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== libvdwxc ====<br />
Libvdwxc is a general library for evaluating energy and potential for exchange-correlation (XC) functionals from the vdW-DF.<br />
wget https://www.cp2k.org/static/downloads/libvdwxc-0.4.0.tar.gz<br />
tar -zxvf libvdwxc-0.4.0.tar.gz<br />
./configure CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort FCFLAGS="-O3 -march=native -mno-avx512f" FFTW3_INCLUDES="-I/usr/local/include/" FFTW3_LIBS="/usr/local/lib/libfftw3_mpi.a /usr/local/lib/libfftw3.a" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes<br />
make -j 24<br />
make check<br />
sudo make install<br />
<br />
<br />
==== METIS ====<br />
tar -zxvf parmetis-4.0.3.tar.gz<br />
cd parmetis-4.0.3<br />
cd metis<br />
make config prefix=/share/apps/METIS CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 24<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/share/apps/METIS/lib/libmetis.a<br />
</blockquote><br />
<br />
==== ParMETIS ====<br />
tar -zxvf parmetis-4.0.3.tar.gz<br />
cd parmetis-4.0.3<br />
make config prefix=/share/apps/ParMETIS CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 24<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/share/apps/ParMETIS/lib/libparmetis.a<br />
</blockquote><br />
<br />
==== Superlu-6.1.1 ====<br />
wget https://github.com/xiaoyeli/superlu_dist/archive/v6.1.1.tar.gz<br />
mv v6.1.1.tar.gz superlu_dist_6.1.1.tar.gz<br />
tar -zxvf superlu_dist_6.1.1.tar.gz<br />
mkdir build1<br />
cd build1<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DTPL_PARMETIS_LIBRARIES="-L/share/apps/METIS/lib -L/share/apps/ParMETIS/lib /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a -pthread -Wl,-rpath -Wl,/usr/lib64/openmpi4-gcc8/lib -Wl,--enable-new-dtags -L/usr/lib64/openmpi4-gcc8/lib -lmpi_mpifh -lmpi_cxx -lmpi" -DTPL_PARMETIS_INCLUDE_DIRS=/share/apps/ParMETIS/include -DBUILD_STATIC_LIBS=OFF -DCMAKE_C_FLAGS="-std=c99 -O3 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DTPL_LAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DTPL_BLAS_LIBRARIES=/usr/local/lib/libopenblas.a<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 24 tests passed<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsuperlu_dist.a<br />
</blockquote><br />
<br />
==== Superlu-5.1.2 ====<br />
wget http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_dist_5.1.2.tar.gz<br />
tar -zxvf superlu_dist_5.1.2.tar.gz<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DTPL_PARMETIS_LIBRARIES="-L/share/apps/METIS/lib -L/share/apps/ParMETIS/lib /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a -pthread -Wl,-rpath -Wl,/usr/lib64/openmpi4-gcc8/lib -Wl,--enable-new-dtags -L/usr/lib64/openmpi4-gcc8/lib -lmpi_mpifh -lmpi_cxx -lmpi" -DTPL_PARMETIS_INCLUDE_DIRS=/share/apps/ParMETIS/include -DCMAKE_C_FLAGS="-std=c99 -O3 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DTPL_BLAS_LIBRARIES=/usr/local/lib/libopenblas_omp.a<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Running tests...<br><br />
Test project /usr/local/src/SuperLU_DIST_5.1.2/build<br><br />
Start 1: pddrive<br><br />
1/2 Test #1: pddrive .......................... Passed 79.70 sec<br><br />
Start 2: pddrive1<br><br />
2/2 Test #2: pddrive1 ......................... Passed 78.40 sec<br><br />
<br><br />
100% tests passed, 0 tests failed out of 2<br><br />
<br><br />
Total Test time (real) = 158.10 sec<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsuperlu_dist.a<br />
</blockquote><br />
<br />
<br />
==== Elpa ====<br />
ELPA replaces the ScaLapack SYEVD to improve the performance of Eigen-vector/value problems.<br />
wget http://elpa.mpcdf.mpg.de/html/Releases/2019.11.001/elpa-2019.11.001.tar.gz<br />
tar -zxvf elpa-2019.11.001.tar.gz<br />
cd elpa-2019.11.001<br />
./configure FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes --enable-openmp=no --disable-avx512<br />
''hack'': change ''LIBS'' in Makefile: ''LIBS = /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a''<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
some skipped, all others passed<br />
</blockquote> <br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/include/elpa-2019.11.001/modules/elpa_constants.mod<br><br />
/usr/local/include/elpa-2019.11.001/modules/elpa_api.mod<br><br />
/usr/local/include/elpa-2019.11.001/modules/elpa.mod<br><br />
/usr/local/lib/libelpa.a<br />
</blockquote><br />
<br />
==== Pexsi 1.2 ====<br />
The source code must be edited for use with openmpi-4.<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
MPI_Address &#8594; MPI_Get_address<br><br />
MPI_Type_hindexed &#8594; MPI_Type_create_hindexed<br><br />
MPI_Type_struct &#8594; MPI_Type_create_struct<br><br />
MPI_Errhandler_set&#8594; remove lines<br />
</blockquote><br />
The Pole EXpansion and Selected Inversion (PEXSI) method requires the PEXSI library and two dependencies (ParMETIS and SuperLU_DIST).<br />
wget https://www.cp2k.org/static/downloads/pexsi_v1.2.0.tar.gz<br />
tar -zxvf pexsi_v1.2.0.tar.gz<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DMETIS_LIBRARIES=/share/apps/METIS/lib/libmetis.a -DPARMETIS_LIBRARIES=/share/apps/ParMETIS/lib/libparmetis.a -Dlinalg_BLAS_LIBRARIES=/usr/local/lib/libopenblas.a -Dlinalg_LAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DCMAKE_CXX_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_C_FLAGS="-std=c99 -O2 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
<br />
edit ''cmake/modules/FindLinAlg.cmake'' uncomment line 373 and 375.<br />
<br />
make -j 24<br />
sudo make install<br />
sudo make finstall<br />
<br />
==== Pexsi 0.10.2 ====<br />
cp config/make.inc.linux.gnu ./make.inc<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PAR_ND_LIBRARY = parmetis<br><br />
SEQ_ND_LIBRARY = metis<br><br />
<br><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
CXX = /usr/lib64/openmpi4-gcc8/bin/mpicxx<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LOADER = /usr/lib64/openmpi4-gcc8/bin/mpicxx<br><br />
<br><br />
DSUPERLU_DIR = /usr/local<br><br />
METIS_DIR = /share/apps/METIS<br><br />
PARMETIS_DIR = /share/apps/ParMETIS<br><br />
<br><br />
DSUPERLU_INCLUDE = -I/usr/local/include<br><br />
<br><br />
GFORTRAN_LIB = /opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a<br><br />
LAPACK_LIB = /usr/local/lib/libscalapack.a<br><br />
BLAS_LIB = /usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
The source code must be edited for use with openmpi-4.<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
MPI_Address &#8594; MPI_Get_address<br><br />
MPI_Type_hindexed &#8594; MPI_Type_create_hindexed<br><br />
MPI_Type_struct &#8594; MPI_Type_create_struct<br><br />
</blockquote><br />
<br />
make<br />
make install<br />
sudo cp /usr/local/src/pexsi_v0.10.2/build/lib/libpexsi_linux_v0.10.2.a /usr/local/lib<br />
sudo cp /usr/local/src/pexsi_v0.10.2/build/include/* /usr/local/include/<br />
<br />
==== SpFFT ====<br />
Needed in SIRIUS.<br />
wget https://github.com/eth-cscs/SpFFT/archive/v0.9.9.tar.gz<br />
mv v0.9.9.tar.gz SpFFT-0.9.9.tar.gz<br />
tar -zxvf SpFFT-0.9.9.tar.gz<br />
cd SpFFT-0.9.9<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE -DSPFFT_OMP=ON -DSPFFT_MPI=ON -DSPFFT_INSTALL=ON -DSPFFT_STATIC=ON<br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libspfft.a<br />
</blockquote><br />
<br />
==== SIRIUS 6.5.3 ====<br />
SIRIUS is a domain specific library for electronic structure calculations.<br />
wget https://github.com/electronic-structure/SIRIUS/archive/v6.5.3.tar.gz<br />
mv v6.5.3.tar.gz SIRIUS-v6.5.3.tar.gz<br />
tar -zxvf SIRIUS-v6.5.3.tar.gz<br />
cd SIRIUS-6.5.3<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/share/apps/SIRIUS -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DGSL_CBLAS_LIBRARY=/usr/local/lib/libgsl.a -DGSL_CBLAS_LIBRARY_DEBUG=/usr/local/lib/libgslcblas.a -DGSL_LIBRARY=/usr/local/lib/libgsl.a -DGSL_LIBRARY_DEBUG=/usr/local/lib/libgsl.a -DUSE_ELPA=ON -DELPA_INCLUDE_DIR=/usr/local/include/elpa-2019.11.001/elpa -DELPA_LIBRARIES="/usr/local/lib/libelpa.a;/usr/local/lib/libscalapack.a;/usr/local/lib/libopenblas.a" -DUSE_VDWXC=ON -DLIBVDWXC_LIBRARIES="/usr/local/lib/libvdwxc.a;/usr/local/lib/libfftw3.a"<br />
make -j 24<br />
make install<br />
<br />
==== SIRIUS 6.3.2 ====<br />
wget https://www.cp2k.org/static/downloads/SIRIUS-6.3.2.tar.gz<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/share/apps/SIRIUS -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DUSE_SCALAPACK=ON -DSCALAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DBLAS_openblas_LIBRARY=/usr/local/lib/libopenblas.a -DLAPACK_openblas_LIBRARY=/usr/local/lib/libopenblas.a -DGSL_CBLAS_LIBRARY=/usr/local/lib/libgsl.a -DGSL_CBLAS_LIBRARY_DEBUG=/usr/local/lib/libgslcblas.a -DGSL_LIBRARY=/usr/local/lib/libgsl.a -DGSL_LIBRARY_DEBUG=/usr/local/lib/libgsl.a<br />
make -j 24<br />
make install -j 24<br />
cp src/mod_files/sirius.mod /share/apps/SIRIUS/include/<br />
<br />
==== Plumed ====<br />
Library that enables various enhanced sampling methods.<br />
tar -zxvf plumed-2.6.0.tgz<br />
./configure --prefix=/share/apps/plumed/plumed-2.6.0 --enable-shared=no<br />
<br />
change in Makefile.conf<br />
DYNAMIC_LIBS= -lstdc++ -lfftw3 -lgsl -lgslcblas -lz -ldl -llapack -lblas -fopenmp<br />
to<br />
DYNAMIC_LIBS= -lstdc++ /usr/local/lib/libfftw3.a /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a -lz -ldl /usr/local/lib/libopenblas_omp.a -fopenmp -lgfortran<br />
<br />
make -j 24<br />
make install<br />
<br />
==== QUIP ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Do not build using parallel-make<br />
</blockquote><br />
QUantum mechanics and Interatomic Potentials allows for a wider range of interaction potentials.<br />
<br />
wget https://www.cp2k.org/static/downloads/QUIP-cc83ceea5776c40fcb5ab224a25ab04d62175449.zip<br />
export QUIP_ARCH=linux_x86_64_gfortran_openmpi<br />
<br />
make config<br />
<br />
Please enter the linking options for LAPACK and BLAS libraries:<br />
fill in /usr/local/lib/libopenblas.a<br />
Do you want to compile with CP2K support? y<br><br />
Do you want to compile with VASP support? y<br><br />
Do you want to compile with Tight Binding (TB) support? y<br><br />
Please enter directories where METIS libraries are kept:<br />
fill in /share/apps/METIS/lib/<br />
<br />
make libquip<br />
mkdir -p /share/apps/QUIP/QUIP-2015<br />
make PREFIX=/share/apps/QUIP/QUIP-2015 QUIP_INSTALLDIR=/share/apps/QUIP/QUIP-2015 install<br />
mkdir /share/apps/QUIP/QUIP-2015/include/<br />
cp build/linux_x86_64_gfortran_openmpi/quip_unified_wrapper_module.mod /share/apps/QUIP/QUIP-2015/include/<br />
mkdir /share/apps/QUIP/QUIP-2015/lib/<br />
cp build/linux_x86_64_gfortran_openmpi/*.a /share/apps/QUIP/QUIP-2015/lib<br />
cp src/FoX-4.0.3/objs.linux_x86_64_gfortran_openmpi/lib/libFoX_*.a /share/apps/QUIP/QUIP-2015/lib<br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O2 -g -march=native -mno-avx512f -I/usr/local/include/ -L/usr/local/include/<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include -I/share/apps/QUIP/QUIP-2015/include/ -I/share/apps/METIS/include/ -I/share/apps/ParMETIS/include -I/share/apps/plumed/plumed-2.6.0/include/ -I/share/apps/SIRIUS/include/<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++ -lgomp -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightgreen; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3261<br><br />
Number of NEW tests 8<br><br />
Total number of tests 3269<br><br />
GREPME 0 0 3261 8 3269 X<br><br />
<br><br />
Summary: correct: 3261 / 3269; new: 8; 38min<br><br />
Status: OK<br />
</blockquote><br />
<br />
<br />
To solve SIRIUS warnings in the top of the output, use the latest version of SIRIUS and modify the following cp2k source files:<br />
cd cp2k-7.1<br />
cd src<br />
wget https://raw.githubusercontent.com/cp2k/cp2k/b1fc8cddc7ca9b30bf6de29e87ac9e3f14c60136/src/sirius_interface.F<br />
wget https://raw.githubusercontent.com/cp2k/cp2k/b1fc8cddc7ca9b30bf6de29e87ac9e3f14c60136/src/input_cp2k_pwdft.F<br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
# Tested with: GFortran 8.3.1, OPENMPICH 4.0.3, OpenBLAS 0.3.0, ScaLAPACK 2.1.0, FFTW 3.3.8, Libint 2.6.0, Libxc 4.3.4, libxsmm 1.15,<br><br />
# ELPA 2019.11.001, PLUMED 2.6.0, SPGLIB 1.12.2, QUIP-2015, ParMETIS-4.0.3, Pexsi-1.2.0, SIRIUS 6.5.3, SpFFT 0.9.9, libvdw 0.4.0<br><br />
# Author: David Dubbeldam (d.dubbeldam@uva.nl, University of Amsterdam, May 2020)<br><br />
<br><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O2 -g -march =native -mno-avx512f -I/usr/local/include/ -L/usr/local/include/<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
DFLAGS += -D__SIRIUS -D__PLUMED2 -D__QUIP -D__LIBPEXSI -D__ELPA<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include -I/share/apps/QUIP/QUIP-2015/include/ -I/share/apps/METIS/include/ -I/share/apps/ParMETIS/include<br><br />
FCFLAGS += -I/share/apps/plumed/plumed-2.6.0/include/ -I/share/apps/SIRIUS/include/sirius<br><br />
FCFLAGS += -I/usr/local/include/elpa-2019.11.001/elpa -I/usr/local/include/elpa-2019.11.001/modules<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = $(PLUMED_DEPENDENCIES) /share/apps/plumed/plumed-2.6.0/lib/libplumed.a<br><br />
LIBS += /usr/local/lib/libelpa.a<br><br />
LIBS += /usr/local/lib64/libpexsi.a<br><br />
LIBS += /share/apps/SIRIUS/lib64/libsirius.a<br><br />
LIBS += /usr/local/lib/libspfft.a<br><br />
LIBS += /usr/local/lib/libvdwxc.a<br><br />
LIBS += /usr/local/lib64/libsuperlu_dist.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libquip_core.a /share/apps/QUIP/QUIP-2015/lib/libatoms.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_sax.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_common.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_utils.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_fsys.a<br><br />
LIBS += /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a<br><br />
LIBS += /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a<br><br />
LIBS += -lnetcdf -lhdf5_hl -lhdf5 -lz -lsymspg -ldl -lpthread -lstdc++ -lgomp -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
All tests are fine, but the regression-test hangs on one job, after killing it the test results are<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Number of FAILED tests 1<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3285<br><br />
Number of NEW tests 0<br><br />
Total number of tests 3286<br><br />
GREPME 1 0 3285 0 3286 X<br><br />
<br><br />
Summary: correct: 3285 / 3286; failed: 1; 95min<br><br />
Status: FAILED<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1252
CP2K compiling with Intel
2020-05-26T13:15:17Z
<p>David Dubbeldam: /* Libint2 */</p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
<br />
edit ''Makefile'' in directory ''fortran''<br />
line 12 should read (''-lstdc++'' added)<br />
COMPUTE_LIB = -L../lib -lint2 -lstdc++<br />
line 37 change CXX to FC<br />
$(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^<br />
<br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2.a<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
sudo make PREFIX=/usr/local FC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/ifort CC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icc CXX=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 4<br><br />
Number of CORRECT tests 3197<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 4 3197 3 3204 X<br><br />
<br><br />
Summary: correct: 3197 / 3204; new: 3; wrong: 4; 50min<br><br />
Status: FAILED<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1251
CP2K compiling with Intel
2020-05-26T13:14:24Z
<p>David Dubbeldam: /* Libxc */</p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
<br />
edit ''Makefile'' in directory ''fortran''<br />
line 12 should read (''-lstdc++'' added)<br />
COMPUTE_LIB = -L../lib -lint2 -lstdc++<br />
line 37 change CXX to FC<br />
$(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^<br />
<br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2<br />
</blockquote><br />
<br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
sudo make PREFIX=/usr/local FC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/ifort CC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icc CXX=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 4<br><br />
Number of CORRECT tests 3197<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 4 3197 3 3204 X<br><br />
<br><br />
Summary: correct: 3197 / 3204; new: 3; wrong: 4; 50min<br><br />
Status: FAILED<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1250
CP2K compiling with Intel
2020-05-26T11:56:21Z
<p>David Dubbeldam: </p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
<br />
edit ''Makefile'' in directory ''fortran''<br />
line 12 should read (''-lstdc++'' added)<br />
COMPUTE_LIB = -L../lib -lint2 -lstdc++<br />
line 37 change CXX to FC<br />
$(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^<br />
<br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2<br />
</blockquote><br />
<br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
sudo make PREFIX=/usr/local FC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/ifort CC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icc CXX=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="-O3 -xcore-avx2" CFLAGS="-O3 -xcore-avx2" CXXFLAGS="-O3 -xcore-avx2" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 4<br><br />
Number of CORRECT tests 3197<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 4 3197 3 3204 X<br><br />
<br><br />
Summary: correct: 3197 / 3204; new: 3; wrong: 4; 50min<br><br />
Status: FAILED<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1249
CP2K compiling with Intel
2020-05-26T11:08:08Z
<p>David Dubbeldam: /* Libxsmm */</p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
<br />
edit ''Makefile'' in directory ''fortran''<br />
line 12 should read (''-lstdc++'' added)<br />
COMPUTE_LIB = -L../lib -lint2 -lstdc++<br />
line 37 change CXX to FC<br />
$(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^<br />
<br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2<br />
</blockquote><br />
<br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
sudo make PREFIX=/usr/local FC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/ifort CC=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icc CXX=/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/icpc FCFLAGS="-O2 -xcore-avx2" CFLAGS="-O2 -xcore-avx2" CXXFLAGS="-O2 -xcore-avx2" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="-O3 -xcore-avx2" CFLAGS="-O3 -xcore-avx2" CXXFLAGS="-O3 -xcore-avx2" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1248
CP2K compiling with Intel
2020-05-26T08:38:51Z
<p>David Dubbeldam: </p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
<br />
edit ''Makefile'' in directory ''fortran''<br />
line 12 should read (''-lstdc++'' added)<br />
COMPUTE_LIB = -L../lib -lint2 -lstdc++<br />
line 37 change CXX to FC<br />
$(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^<br />
<br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2<br />
</blockquote><br />
<br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
make PREFIX=/usr/local FC=ifort CC=icc CXX=icpc FCFLAGS="-O3 -xcore-avx2" CFLAGS="-O3 -xcore-avx2" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="-O3 -xcore-avx2" CFLAGS="-O3 -xcore-avx2" CXXFLAGS="-O3 -xcore-avx2" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1247
CP2K compiling with Intel
2020-05-26T08:18:00Z
<p>David Dubbeldam: </p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
<br />
edit ''Makefile'' in directory ''fortran''<br />
line 12 should read (''-lstdc++'' added)<br />
COMPUTE_LIB = -L../lib -lint2 -lstdc++<br />
line 37 change CXX to FC<br />
$(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^<br />
<br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2<br />
</blockquote><br />
<br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
make PREFIX=/usr/local FC=ifort CC=icc CXX=icpc FCFLAGS="-O3 -xcore-avx2" CFLAGS="-O3 -xcore-avx2" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1246
CP2K compiling with Intel
2020-05-26T08:12:13Z
<p>David Dubbeldam: </p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
<br />
edit ''Makefile'' in directory ''fortran''<br />
line 12 should read (''-lstdc++'' added)<br />
COMPUTE_LIB = -L../lib -lint2 -lstdc++<br />
line 37 change CXX to FC<br />
$(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^<br />
<br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1245
CP2K compiling with Intel
2020-05-26T08:11:04Z
<p>David Dubbeldam: </p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
edit ''Makefile'' in directory ''fortran''<br />
line 12 should read (''-lstdc++'' added)<br />
COMPUTE_LIB = -L../lib -lint2 -lstdc++<br />
line 37 change CXX to FC<br />
$(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^<br />
<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1244
CP2K compiling with Intel
2020-05-26T07:59:52Z
<p>David Dubbeldam: /* preparation */</p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export AR="xiar"<br />
export FC="ifort"<br />
export CC="icc"<br />
export CXX="icpc"<br />
export F77=${FC}<br />
export F90=${FC}<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1243
CP2K compiling with Intel
2020-05-25T18:28:37Z
<p>David Dubbeldam: /* preparation */</p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export CC=icc<br />
export CXX=icpc<br />
export F77=ifort<br />
export FC=ifort<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1242
CP2K compiling with Intel
2020-05-25T18:10:23Z
<p>David Dubbeldam: /* Libint2 */</p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export CC=icc<br />
export CXX=icpc<br />
export F77=ifort<br />
export FC=ifort<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1241
CP2K compiling with Intel
2020-05-25T18:09:02Z
<p>David Dubbeldam: /* Libint2 */</p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export CC=icc<br />
export CXX=icpc<br />
export F77=ifort<br />
export FC=ifort<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=icc FC=gfortran CXX=icpc FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1240
CP2K compiling with Intel
2020-05-25T18:08:36Z
<p>David Dubbeldam: </p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export CC=icc<br />
export CXX=icpc<br />
export F77=ifort<br />
export FC=ifort<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="'''-O2''' -xcore-avx2" CFLAGS="'''-O2''' -xcore-avx2" CXXFLAGS="'''-O2''' -xcore-avx2" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -xcore-avx2"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1239
CP2K compiling with Intel
2020-05-25T18:02:46Z
<p>David Dubbeldam: /* Compiling subpackages */</p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export CC=icc<br />
export CXX=icpc<br />
export F77=ifort<br />
export FC=ifort<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O1''' -xcore-avx2" CFLAGS="'''-O1''' -xcore-avx2" CXXFLAGS="'''-O1''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check</div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1238
CP2K compiling with Intel
2020-05-25T18:02:22Z
<p>David Dubbeldam: </p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export CC=icc<br />
export CXX=icpc<br />
export F77=ifort<br />
export FC=ifort<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O3''' -xcore-avx2" CFLAGS="'''-O3''' -xcore-avx2" CXXFLAGS="'''-O3''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check</div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_Intel&diff=1237
CP2K compiling with Intel
2020-05-25T17:30:28Z
<p>David Dubbeldam: Created page with "Compiling == Compiling subpackages == === Serial === ==== preparation ==== source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64 source /opt/..."</p>
<hr />
<div>Compiling <br />
<br />
== Compiling subpackages ==<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64<br />
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64<br />
export CC=icc<br />
export CXX=icpc<br />
export F77=ifort<br />
export FC=ifort<br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1"<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=icc FC=ifort CXX=icpc FCFLAGS="'''-O3''' -xcore-avx2" CFLAGS="'''-O3''' -xcore-avx2" CXXFLAGS="'''-O3''' -xcore-avx2" --enable-shared=no<br />
make -j 16<br />
make check</div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=Rpm_commands&diff=1236
Rpm commands
2020-05-25T15:28:10Z
<p>David Dubbeldam: Created page with " Remove all rpms that contain the string "intel" rpm -qa | grep intel | while read -r line; do yum remove -y $line; done"</p>
<hr />
<div><br />
Remove all rpms that contain the string "intel"<br />
rpm -qa | grep intel | while read -r line; do yum remove -y $line; done</div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_GFortran&diff=1235
CP2K compiling with GFortran
2020-05-25T08:50:30Z
<p>David Dubbeldam: /* CP2K */</p>
<hr />
<div>Compiling <br />
<br />
== Caveats ==<br />
<br />
# the gcc version 4.8.5 mostly works, but fails for the plumed-part in CP2K (plumed itself compiles fine)<br />
# gcc version 9.1.1 fails (compiles but lots of CP2K unit tests fail, even with ''-O2 -g -mtune=generic'')<br />
# gcc version 8.3.1 works, but sometimes optimization needs to be reduced (e.g. gsl).<br />
<br />
== Compiling subpackages ==<br />
<br />
The following assumes that CP2K will be build from static libraries installed in /usr/local using the ''devtoolset-8'' on ''rocks'' (centos 7.4).<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
export CC=/opt/rh/devtoolset-8/root/usr/bin/gcc<br />
export CXX=/opt/rh/devtoolset-8/root/usr/bin/g++<br />
export F77=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
export FC=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
<br />
==== Blas and Lapack ====<br />
wget https://github.com/Reference-LAPACK/lapack/archive/v3.9.0.tar.gz<br />
mv v3.9.0.tar.gz lapack-3.9.0.tar.gz<br />
tar -zxvf lapack-3.9.0.tar.gz<br />
cd lapack-3.9.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_COMPILER=gfortran -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Result: 100% tests passed, 0 tests failed out of 103<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib64/libblas.a<br><br />
/usr/local/lib64/liblapack.a<br><br />
/usr/local/lib64/libtmglib.a<br />
</blockquote><br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=0 USE_OPENMP=0 NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
./configure CC=gcc CXX=g++x F77=gfortran FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --disable-shared --enable-static<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br><br />
</blockquote><br />
sudo make install<br />
<br />
The serial version is created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3.a<br><br />
</blockquote><br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1"<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="'''-O1''' -march=native -mno-avx512f" CFLAGS="'''-O1''' -march=native -mno-avx512f" CXXFLAGS="'''-O1''' -march=native -mno-avx512f" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
============================================================================<br><br />
Testsuite summary for gsl 2.6<br><br />
============================================================================<br><br />
all checks passed<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libgslcblas.a<br><br />
/usr/local/lib/libgsl.a<br />
</blockquote><br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="'''-O2''' -march=native -mno-avx512f" CFLAGS="'''-O2''' -march=native -mno-avx512f" CXXFLAGS="'''-O2''' -march=native -mno-avx512f" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -march=native -mno-avx512f"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
make PREFIX=/usr/local FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== libvdwxc ====<br />
Libvdwxc is a general library for evaluating energy and potential for exchange-correlation (XC) functionals from the vdW-DF.<br />
wget https://www.cp2k.org/static/downloads/libvdwxc-0.4.0.tar.gz<br />
tar -zxvf libvdwxc-0.4.0.tar.gz<br />
./configure CC=gcc FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" FFTW3_INCLUDES="-I/usr/local/include/" FFTW3_LIBS="/usr/local/lib/libfftw3.a" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes<br />
make -j 24<br />
make check<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libvdwxcfort.a<br><br />
/usr/local/lib/libvdwxc.a<br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== Spglib ====<br />
A library for finding and handling crystal symmetries<br />
wget https://github.com/spglib/spglib/archive/v1.11.2.1.tar.gz<br />
mv v1.11.2.1.tar.gz spglib-v1.11.2.1.tar.gz<br />
tar -zxvf spglib-v1.11.2.1.tar.gz<br />
cd spglib-1.11.2.1<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsymspg.a<br />
</blockquote><br />
<br />
Rocks/Centos/RH 7 provides precompiled packages<br />
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/s/spglib-1.11.1-2.el7.x86_64.rpm<br />
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/s/spglib-devel-1.11.1-2.el7.x86_64.rpm<br />
sudo rpm -ivh spglib-1.11.1-2.el7.x86_64.rpm spglib-devel-1.11.1-2.el7.x86_64.rpm<br />
<br />
<br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
CC = gcc<br><br />
FC = gfortran<br><br />
LD = gfortran<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O2 -march=native -mno-avx512f -I/usr/local/include -L/usr/local/include<br><br />
<br><br />
DFLAGS = -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libopenblas.a<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
make ARCH=local VERSION=sopt test<br />
<blockquote style="background-color: lightgreen; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3201<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 0 3201 3 3204 X<br><br />
<br><br />
Summary: correct: 3201 / 3204; new: 3; 27min<br><br />
Status: OK<br />
</blockquote><br />
<br />
=== OpenMP ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
export CC=/opt/rh/devtoolset-8/root/usr/bin/gcc<br />
export CXX=/opt/rh/devtoolset-8/root/usr/bin/g++<br />
export F77=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
export FC=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=1 USE_OPENMP=1 NUM_THREADS=64 LIBNAMESUFFIX=omp NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local LIBNAMESUFFIX=omp NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas_omp.a<br />
</blockquote><br />
<br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
./configure CC=gcc CXX=g++x F77=gfortran FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-openmp --disable-shared --enable-static --enable-threads<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br />
FFTW threaded transforms passed basic tests!<br />
</blockquote><br />
sudo make install<br />
<br />
The serial version is created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3_omp.a<br><br />
/usr/local/lib/libfftw3_threads.a<br />
</blockquote><br />
<br />
==== Elpa ====<br />
ELPA replaces the ScaLapack SYEVD to improve the performance of Eigen-vector/value problems.<br />
wget http://elpa.mpcdf.mpg.de/html/Releases/2019.11.001/elpa-2019.11.001.tar.gz<br />
tar -zxvf elpa-2019.11.001.tar.gz<br />
cd elpa-2019.11.001<br />
./configure FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes --enable-openmp=yes --disable-avx512<br />
''hack'': change ''LIBS'' in Makefile: ''LIBS = /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas_omp.a''<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
some skipped, all others passed<br />
</blockquote> <br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa_constants.mod<br><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa_api.mod<br><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa.mod<br><br />
/usr/local/lib/libelpa_openmp.a<br />
</blockquote><br />
<br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
module load mpi/openmpi4-x86_64-gcc8<br />
export CC=/usr/lib64/openmpi4-gcc8/bin/mpicc<br />
export CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx<br />
export F77=/usr/lib64/openmpi4-gcc8/bin/mpif77<br />
export FC=/usr/lib64/openmpi4-gcc8/bin/mpifort<br />
<br />
Allow ''infiniband'' and ''vader'' to run<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Note that the used MPI installation must match the used Fortran compiler. If not, then MPI needs to be recompiled using the same compiler.<br />
</blockquote><br />
<br />
<br />
==== Blas and Lapack ====<br />
Lapack is needed for SIRIUS<br />
wget https://github.com/Reference-LAPACK/lapack/archive/v3.9.0.tar.gz<br />
mv v3.9.0.tar.gz lapack-3.9.0.tar.gz<br />
tar -zxvf lapack-3.9.0.tar.gz<br />
cd lapack-3.9.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_COMPILER=gfortran -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Result: 100% tests passed, 0 tests failed out of 103<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib64/libblas.a<br><br />
/usr/local/lib64/liblapack.a<br><br />
/usr/local/lib64/libtmglib.a<br />
</blockquote><br />
<br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=0 USE_OPENMP=0 NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
==== Scalapack ====<br />
wget https://www.cp2k.org/static/downloads/scalapack-2.1.0.tgz<br />
tar -zxvf scalapack-2.1.0.tgz<br />
scalapack-2.1.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_C_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_BUILD_TYPE=Release -DMPI_BASE_DIR=/usr/lib64/openmpi4-gcc9/lib -DMPI_INCLUDE_PATH=/usr/include/openmpi4-x86_64-gcc8 -DMPIEXEC=/usr/lib64/openmpi4-gcc8/bin/mpiexec -DBLAS_LIBRARIES=/usr/local/lib/libopenblas.a -DLAPACK_LIBRARIES=/usr/local/lib/libopenblas.a -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
100% tests passed, 0 tests failed out of 96<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/linscalapack.a<br />
</blockquote><br />
<br />
==== COSMA ====<br />
Distributed Communication-Optimal Matrix-Matrix Multiplication Algorithm. COSMA is a replacement of the ''pdgemm'' routine included in scalapack.<br />
git clone --recursive https://github.com/eth-cscs/COSMA cosma <br />
cd cosma<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_INCLUDEDIR=/usr/local/include -DCMAKE_BUILD_TYPE=Release -DCOSMA_BLAS=OPENBLAS -DCOSMA_SCALAPACK=CUSTOM -DBUILD_SHARED_LIBS=OFF -DSCALAPACK_LIBRARIES="/usr/local/lib/libscalapack.a;/usr/local/lib/libopenblas.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libquadmath.a" -DOPENBLAS_LIBRARIES="/usr/local/lib/libopenblas.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a"<br />
make test<br />
<br />
<blockquote style="background-color: red; border: solid thin grey;"><br />
20% tests passed, 4 tests failed out of 5<br><br />
<br><br />
Total Test time (real) = 7.99 sec<br><br />
<br><br />
The following tests FAILED:<br><br />
2 - test.multiply_using_layout (Failed)<br><br />
3 - test.multiply (Failed)<br><br />
4 - test.scalar_matmul (Failed)<br><br />
5 - test.pdgemm (Failed)<br><br />
Errors while running CTest<br><br />
</blockquote><br />
<br />
Place the library in front of the scalapack library during linking time.<br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
module load mpi/openmpi4-x86_64-gcc8<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
./configure CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx F77=/usr/lib64/openmpi4-gcc8/bin/mpifort FC=/usr/lib64/openmpi4-gcc8/bin/mpifort FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-openmp --enable-mpi --disable-shared --enable-static --enable-threads<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br><br />
FFTW threaded transforms passed basic tests!<br><br />
MPI FFTW transforms passed 10 tests, 1 CPU<br><br />
MPI FFTW transforms passed 10 tests, 2 CPUs<br><br />
MPI FFTW transforms passed 10 tests, 3 CPUs<br><br />
MPI FFTW transforms passed 10 tests, 4 CPUs<br><br />
MPI FFTW threaded transforms passed 10 tests!<br />
</blockquote><br />
sudo make install<br />
<br />
The serial, mpi, threaded, and openmp versions are created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3.a<br><br />
/usr/local/lib/libftw3_mpi.a<br> <br />
/usr/local/lib/libfftw3_omp.a<br><br />
/usr/local/lib/libfftw3_threads.a <br />
</blockquote><br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1"<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="'''-O1''' -march=native -mno-avx512f" CFLAGS="'''-O1''' -march=native -mno-avx512f" CXXFLAGS="'''-O1''' -march=native -mno-avx512f" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
============================================================================<br><br />
Testsuite summary for gsl 2.6<br><br />
============================================================================<br><br />
all checks passed<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libgslcblas.a<br><br />
/usr/local/lib/libgsl.a<br />
</blockquote><br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="'''-O2''' -march=native -mno-avx512f" CFLAGS="'''-O2''' -march=native -mno-avx512f" CXXFLAGS="'''-O2''' -march=native -mno-avx512f" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -march=native -mno-avx512f"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
make PREFIX=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== libvdwxc ====<br />
Libvdwxc is a general library for evaluating energy and potential for exchange-correlation (XC) functionals from the vdW-DF.<br />
wget https://www.cp2k.org/static/downloads/libvdwxc-0.4.0.tar.gz<br />
tar -zxvf libvdwxc-0.4.0.tar.gz<br />
./configure CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort FCFLAGS="-O3 -march=native -mno-avx512f" FFTW3_INCLUDES="-I/usr/local/include/" FFTW3_LIBS="/usr/local/lib/libfftw3_mpi.a /usr/local/lib/libfftw3.a" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes<br />
make -j 24<br />
make check<br />
sudo make install<br />
<br />
<br />
==== METIS ====<br />
tar -zxvf parmetis-4.0.3.tar.gz<br />
cd parmetis-4.0.3<br />
cd metis<br />
make config prefix=/share/apps/METIS CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 24<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/share/apps/METIS/lib/libmetis.a<br />
</blockquote><br />
<br />
==== ParMETIS ====<br />
tar -zxvf parmetis-4.0.3.tar.gz<br />
cd parmetis-4.0.3<br />
make config prefix=/share/apps/ParMETIS CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 24<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/share/apps/ParMETIS/lib/libparmetis.a<br />
</blockquote><br />
<br />
==== Superlu-6.1.1 ====<br />
wget https://github.com/xiaoyeli/superlu_dist/archive/v6.1.1.tar.gz<br />
mv v6.1.1.tar.gz superlu_dist_6.1.1.tar.gz<br />
tar -zxvf superlu_dist_6.1.1.tar.gz<br />
mkdir build1<br />
cd build1<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DTPL_PARMETIS_LIBRARIES="-L/share/apps/METIS/lib -L/share/apps/ParMETIS/lib /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a -pthread -Wl,-rpath -Wl,/usr/lib64/openmpi4-gcc8/lib -Wl,--enable-new-dtags -L/usr/lib64/openmpi4-gcc8/lib -lmpi_mpifh -lmpi_cxx -lmpi" -DTPL_PARMETIS_INCLUDE_DIRS=/share/apps/ParMETIS/include -DBUILD_STATIC_LIBS=OFF -DCMAKE_C_FLAGS="-std=c99 -O3 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DTPL_LAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DTPL_BLAS_LIBRARIES=/usr/local/lib/libopenblas.a<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 24 tests passed<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsuperlu_dist.a<br />
</blockquote><br />
<br />
==== Superlu-5.1.2 ====<br />
wget http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_dist_5.1.2.tar.gz<br />
tar -zxvf superlu_dist_5.1.2.tar.gz<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DTPL_PARMETIS_LIBRARIES="-L/share/apps/METIS/lib -L/share/apps/ParMETIS/lib /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a -pthread -Wl,-rpath -Wl,/usr/lib64/openmpi4-gcc8/lib -Wl,--enable-new-dtags -L/usr/lib64/openmpi4-gcc8/lib -lmpi_mpifh -lmpi_cxx -lmpi" -DTPL_PARMETIS_INCLUDE_DIRS=/share/apps/ParMETIS/include -DCMAKE_C_FLAGS="-std=c99 -O3 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DTPL_BLAS_LIBRARIES=/usr/local/lib/libopenblas_omp.a<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Running tests...<br><br />
Test project /usr/local/src/SuperLU_DIST_5.1.2/build<br><br />
Start 1: pddrive<br><br />
1/2 Test #1: pddrive .......................... Passed 79.70 sec<br><br />
Start 2: pddrive1<br><br />
2/2 Test #2: pddrive1 ......................... Passed 78.40 sec<br><br />
<br><br />
100% tests passed, 0 tests failed out of 2<br><br />
<br><br />
Total Test time (real) = 158.10 sec<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsuperlu_dist.a<br />
</blockquote><br />
<br />
<br />
==== Elpa ====<br />
ELPA replaces the ScaLapack SYEVD to improve the performance of Eigen-vector/value problems.<br />
wget http://elpa.mpcdf.mpg.de/html/Releases/2019.11.001/elpa-2019.11.001.tar.gz<br />
tar -zxvf elpa-2019.11.001.tar.gz<br />
cd elpa-2019.11.001<br />
./configure FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes --enable-openmp=no --disable-avx512<br />
''hack'': change ''LIBS'' in Makefile: ''LIBS = /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a''<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
some skipped, all others passed<br />
</blockquote> <br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/include/elpa-2019.11.001/modules/elpa_constants.mod<br><br />
/usr/local/include/elpa-2019.11.001/modules/elpa_api.mod<br><br />
/usr/local/include/elpa-2019.11.001/modules/elpa.mod<br><br />
/usr/local/lib/libelpa.a<br />
</blockquote><br />
<br />
==== Pexsi 1.2 ====<br />
The source code must be edited for use with openmpi-4.<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
MPI_Address &#8594; MPI_Get_address<br><br />
MPI_Type_hindexed &#8594; MPI_Type_create_hindexed<br><br />
MPI_Type_struct &#8594; MPI_Type_create_struct<br><br />
MPI_Errhandler_set&#8594; remove lines<br />
</blockquote><br />
The Pole EXpansion and Selected Inversion (PEXSI) method requires the PEXSI library and two dependencies (ParMETIS and SuperLU_DIST).<br />
wget https://www.cp2k.org/static/downloads/pexsi_v1.2.0.tar.gz<br />
tar -zxvf pexsi_v1.2.0.tar.gz<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DMETIS_LIBRARIES=/share/apps/METIS/lib/libmetis.a -DPARMETIS_LIBRARIES=/share/apps/ParMETIS/lib/libparmetis.a -Dlinalg_BLAS_LIBRARIES=/usr/local/lib/libopenblas.a -Dlinalg_LAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DCMAKE_CXX_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_C_FLAGS="-std=c99 -O2 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
<br />
edit ''cmake/modules/FindLinAlg.cmake'' uncomment line 373 and 375.<br />
<br />
make -j 24<br />
sudo make install<br />
sudo make finstall<br />
<br />
==== Pexsi 0.10.2 ====<br />
cp config/make.inc.linux.gnu ./make.inc<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PAR_ND_LIBRARY = parmetis<br><br />
SEQ_ND_LIBRARY = metis<br><br />
<br><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
CXX = /usr/lib64/openmpi4-gcc8/bin/mpicxx<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LOADER = /usr/lib64/openmpi4-gcc8/bin/mpicxx<br><br />
<br><br />
DSUPERLU_DIR = /usr/local<br><br />
METIS_DIR = /share/apps/METIS<br><br />
PARMETIS_DIR = /share/apps/ParMETIS<br><br />
<br><br />
DSUPERLU_INCLUDE = -I/usr/local/include<br><br />
<br><br />
GFORTRAN_LIB = /opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a<br><br />
LAPACK_LIB = /usr/local/lib/libscalapack.a<br><br />
BLAS_LIB = /usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
The source code must be edited for use with openmpi-4.<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
MPI_Address &#8594; MPI_Get_address<br><br />
MPI_Type_hindexed &#8594; MPI_Type_create_hindexed<br><br />
MPI_Type_struct &#8594; MPI_Type_create_struct<br><br />
</blockquote><br />
<br />
make<br />
make install<br />
sudo cp /usr/local/src/pexsi_v0.10.2/build/lib/libpexsi_linux_v0.10.2.a /usr/local/lib<br />
sudo cp /usr/local/src/pexsi_v0.10.2/build/include/* /usr/local/include/<br />
<br />
==== SpFFT ====<br />
Needed in SIRIUS.<br />
wget https://github.com/eth-cscs/SpFFT/archive/v0.9.9.tar.gz<br />
mv v0.9.9.tar.gz SpFFT-0.9.9.tar.gz<br />
tar -zxvf SpFFT-0.9.9.tar.gz<br />
cd SpFFT-0.9.9<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE -DSPFFT_OMP=ON -DSPFFT_MPI=ON -DSPFFT_INSTALL=ON -DSPFFT_STATIC=ON<br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libspfft.a<br />
</blockquote><br />
<br />
==== SIRIUS 6.5.3 ====<br />
SIRIUS is a domain specific library for electronic structure calculations.<br />
wget https://github.com/electronic-structure/SIRIUS/archive/v6.5.3.tar.gz<br />
mv v6.5.3.tar.gz SIRIUS-v6.5.3.tar.gz<br />
tar -zxvf SIRIUS-v6.5.3.tar.gz<br />
cd SIRIUS-6.5.3<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/share/apps/SIRIUS -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DGSL_CBLAS_LIBRARY=/usr/local/lib/libgsl.a -DGSL_CBLAS_LIBRARY_DEBUG=/usr/local/lib/libgslcblas.a -DGSL_LIBRARY=/usr/local/lib/libgsl.a -DGSL_LIBRARY_DEBUG=/usr/local/lib/libgsl.a -DUSE_ELPA=ON -DELPA_INCLUDE_DIR=/usr/local/include/elpa-2019.11.001/elpa -DELPA_LIBRARIES="/usr/local/lib/libelpa.a;/usr/local/lib/libscalapack.a;/usr/local/lib/libopenblas.a" -DUSE_VDWXC=ON -DLIBVDWXC_LIBRARIES="/usr/local/lib/libvdwxc.a;/usr/local/lib/libfftw3.a"<br />
make -j 24<br />
make install<br />
<br />
==== SIRIUS 6.3.2 ====<br />
wget https://www.cp2k.org/static/downloads/SIRIUS-6.3.2.tar.gz<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/share/apps/SIRIUS -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DUSE_SCALAPACK=ON -DSCALAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DBLAS_openblas_LIBRARY=/usr/local/lib/libopenblas.a -DLAPACK_openblas_LIBRARY=/usr/local/lib/libopenblas.a -DGSL_CBLAS_LIBRARY=/usr/local/lib/libgsl.a -DGSL_CBLAS_LIBRARY_DEBUG=/usr/local/lib/libgslcblas.a -DGSL_LIBRARY=/usr/local/lib/libgsl.a -DGSL_LIBRARY_DEBUG=/usr/local/lib/libgsl.a<br />
make -j 24<br />
make install -j 24<br />
cp src/mod_files/sirius.mod /share/apps/SIRIUS/include/<br />
<br />
==== Plumed ====<br />
Library that enables various enhanced sampling methods.<br />
tar -zxvf plumed-2.6.0.tgz<br />
./configure --prefix=/share/apps/plumed/plumed-2.6.0 --enable-shared=no<br />
<br />
change in Makefile.conf<br />
DYNAMIC_LIBS= -lstdc++ -lfftw3 -lgsl -lgslcblas -lz -ldl -llapack -lblas -fopenmp<br />
to<br />
DYNAMIC_LIBS= -lstdc++ /usr/local/lib/libfftw3.a /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a -lz -ldl /usr/local/lib/libopenblas_omp.a -fopenmp -lgfortran<br />
<br />
make -j 24<br />
make install<br />
<br />
==== QUIP ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Do not build using parallel-make<br />
</blockquote><br />
QUantum mechanics and Interatomic Potentials allows for a wider range of interaction potentials.<br />
<br />
wget https://www.cp2k.org/static/downloads/QUIP-cc83ceea5776c40fcb5ab224a25ab04d62175449.zip<br />
export QUIP_ARCH=linux_x86_64_gfortran_openmpi<br />
<br />
make config<br />
<br />
Please enter the linking options for LAPACK and BLAS libraries:<br />
fill in /usr/local/lib/libopenblas.a<br />
Do you want to compile with CP2K support? y<br><br />
Do you want to compile with VASP support? y<br><br />
Do you want to compile with Tight Binding (TB) support? y<br><br />
Please enter directories where METIS libraries are kept:<br />
fill in /share/apps/METIS/lib/<br />
<br />
make libquip<br />
mkdir -p /share/apps/QUIP/QUIP-2015<br />
make PREFIX=/share/apps/QUIP/QUIP-2015 QUIP_INSTALLDIR=/share/apps/QUIP/QUIP-2015 install<br />
mkdir /share/apps/QUIP/QUIP-2015/include/<br />
cp build/linux_x86_64_gfortran_openmpi/quip_unified_wrapper_module.mod /share/apps/QUIP/QUIP-2015/include/<br />
mkdir /share/apps/QUIP/QUIP-2015/lib/<br />
cp build/linux_x86_64_gfortran_openmpi/*.a /share/apps/QUIP/QUIP-2015/lib<br />
cp src/FoX-4.0.3/objs.linux_x86_64_gfortran_openmpi/lib/libFoX_*.a /share/apps/QUIP/QUIP-2015/lib<br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O2 -g -march=native -mno-avx512f -I/usr/local/include/ -L/usr/local/include/<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include -I/share/apps/QUIP/QUIP-2015/include/ -I/share/apps/METIS/include/ -I/share/apps/ParMETIS/include -I/share/apps/plumed/plumed-2.6.0/include/ -I/share/apps/SIRIUS/include/<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++ -lgomp -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightgreen; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3261<br><br />
Number of NEW tests 8<br><br />
Total number of tests 3269<br><br />
GREPME 0 0 3261 8 3269 X<br><br />
<br><br />
Summary: correct: 3261 / 3269; new: 8; 38min<br><br />
Status: OK<br />
</blockquote><br />
<br />
<br />
To solve SIRIUS warnings in the top of the output, use the latest version of SIRIUS and modify the following cp2k source files:<br />
cd cp2k-7.1<br />
cd src<br />
wget https://raw.githubusercontent.com/cp2k/cp2k/b1fc8cddc7ca9b30bf6de29e87ac9e3f14c60136/src/sirius_interface.F<br />
wget https://raw.githubusercontent.com/cp2k/cp2k/b1fc8cddc7ca9b30bf6de29e87ac9e3f14c60136/src/input_cp2k_pwdft.F<br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
# Tested with: GFortran 8.3.1, OPENMPICH 4.0.3, OpenBLAS 0.3.0, ScaLAPACK 2.1.0, FFTW 3.3.8, Libint 2.6.0, Libxc 4.3.4, libxsmm 1.15,<br><br />
# ELPA 2019.11.001, PLUMED 2.6.0, SPGLIB 1.12.2, QUIP-2015, ParMETIS-4.0.3, Pexsi-1.2.0, SIRIUS 6.5.3, SpFFT 0.9.9, libvdw 0.4.0<br><br />
# Author: David Dubbeldam (d.dubbeldam@uva.nl, University of Amsterdam, May 2020)<br><br />
<br><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O2 -g -march =native -mno-avx512f -I/usr/local/include/ -L/usr/local/include/<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
DFLAGS += -D__SIRIUS -D__PLUMED2 -D__QUIP -D__LIBPEXSI -D__ELPA<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include -I/share/apps/QUIP/QUIP-2015/include/ -I/share/apps/METIS/include/ -I/share/apps/ParMETIS/include<br><br />
FCFLAGS += -I/share/apps/plumed/plumed-2.6.0/include/ -I/share/apps/SIRIUS/include/sirius<br><br />
FCFLAGS += -I/usr/local/include/elpa-2019.11.001/elpa -I/usr/local/include/elpa-2019.11.001/modules<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = $(PLUMED_DEPENDENCIES) /share/apps/plumed/plumed-2.6.0/lib/libplumed.a<br><br />
LIBS += /usr/local/lib/libelpa.a<br><br />
LIBS += /usr/local/lib64/libpexsi.a<br><br />
LIBS += /share/apps/SIRIUS/lib64/libsirius.a<br><br />
LIBS += /usr/local/lib/libspfft.a<br><br />
LIBS += /usr/local/lib/libvdwxc.a<br><br />
LIBS += /usr/local/lib64/libsuperlu_dist.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libquip_core.a /share/apps/QUIP/QUIP-2015/lib/libatoms.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_sax.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_common.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_utils.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_fsys.a<br><br />
LIBS += /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a<br><br />
LIBS += /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a<br><br />
LIBS += -lnetcdf -lhdf5_hl -lhdf5 -lz -lsymspg -ldl -lpthread -lstdc++ -lgomp -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
All tests are fine, but the regression-test hangs on one job, after killing it the test results are<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Number of FAILED tests 1<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3285<br><br />
Number of NEW tests 0<br><br />
Total number of tests 3286<br><br />
GREPME 1 0 3285 0 3286 X<br><br />
<br><br />
Summary: correct: 3285 / 3286; failed: 1; 95min<br><br />
Status: FAILED<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_GFortran&diff=1234
CP2K compiling with GFortran
2020-05-25T08:46:48Z
<p>David Dubbeldam: /* CP2K */</p>
<hr />
<div>Compiling <br />
<br />
== Caveats ==<br />
<br />
# the gcc version 4.8.5 mostly works, but fails for the plumed-part in CP2K (plumed itself compiles fine)<br />
# gcc version 9.1.1 fails (compiles but lots of CP2K unit tests fail, even with ''-O2 -g -mtune=generic'')<br />
# gcc version 8.3.1 works, but sometimes optimization needs to be reduced (e.g. gsl).<br />
<br />
== Compiling subpackages ==<br />
<br />
The following assumes that CP2K will be build from static libraries installed in /usr/local using the ''devtoolset-8'' on ''rocks'' (centos 7.4).<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
export CC=/opt/rh/devtoolset-8/root/usr/bin/gcc<br />
export CXX=/opt/rh/devtoolset-8/root/usr/bin/g++<br />
export F77=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
export FC=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
<br />
==== Blas and Lapack ====<br />
wget https://github.com/Reference-LAPACK/lapack/archive/v3.9.0.tar.gz<br />
mv v3.9.0.tar.gz lapack-3.9.0.tar.gz<br />
tar -zxvf lapack-3.9.0.tar.gz<br />
cd lapack-3.9.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_COMPILER=gfortran -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Result: 100% tests passed, 0 tests failed out of 103<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib64/libblas.a<br><br />
/usr/local/lib64/liblapack.a<br><br />
/usr/local/lib64/libtmglib.a<br />
</blockquote><br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=0 USE_OPENMP=0 NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
./configure CC=gcc CXX=g++x F77=gfortran FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --disable-shared --enable-static<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br><br />
</blockquote><br />
sudo make install<br />
<br />
The serial version is created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3.a<br><br />
</blockquote><br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1"<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="'''-O1''' -march=native -mno-avx512f" CFLAGS="'''-O1''' -march=native -mno-avx512f" CXXFLAGS="'''-O1''' -march=native -mno-avx512f" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
============================================================================<br><br />
Testsuite summary for gsl 2.6<br><br />
============================================================================<br><br />
all checks passed<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libgslcblas.a<br><br />
/usr/local/lib/libgsl.a<br />
</blockquote><br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="'''-O2''' -march=native -mno-avx512f" CFLAGS="'''-O2''' -march=native -mno-avx512f" CXXFLAGS="'''-O2''' -march=native -mno-avx512f" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -march=native -mno-avx512f"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
make PREFIX=/usr/local FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== libvdwxc ====<br />
Libvdwxc is a general library for evaluating energy and potential for exchange-correlation (XC) functionals from the vdW-DF.<br />
wget https://www.cp2k.org/static/downloads/libvdwxc-0.4.0.tar.gz<br />
tar -zxvf libvdwxc-0.4.0.tar.gz<br />
./configure CC=gcc FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" FFTW3_INCLUDES="-I/usr/local/include/" FFTW3_LIBS="/usr/local/lib/libfftw3.a" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes<br />
make -j 24<br />
make check<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libvdwxcfort.a<br><br />
/usr/local/lib/libvdwxc.a<br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== Spglib ====<br />
A library for finding and handling crystal symmetries<br />
wget https://github.com/spglib/spglib/archive/v1.11.2.1.tar.gz<br />
mv v1.11.2.1.tar.gz spglib-v1.11.2.1.tar.gz<br />
tar -zxvf spglib-v1.11.2.1.tar.gz<br />
cd spglib-1.11.2.1<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsymspg.a<br />
</blockquote><br />
<br />
Rocks/Centos/RH 7 provides precompiled packages<br />
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/s/spglib-1.11.1-2.el7.x86_64.rpm<br />
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/s/spglib-devel-1.11.1-2.el7.x86_64.rpm<br />
sudo rpm -ivh spglib-1.11.1-2.el7.x86_64.rpm spglib-devel-1.11.1-2.el7.x86_64.rpm<br />
<br />
<br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
CC = gcc<br><br />
FC = gfortran<br><br />
LD = gfortran<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O2 -march=native -mno-avx512f -I/usr/local/include -L/usr/local/include<br><br />
<br><br />
DFLAGS = -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libopenblas.a<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
make ARCH=local VERSION=sopt test<br />
<blockquote style="background-color: lightgreen; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3201<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 0 3201 3 3204 X<br><br />
<br><br />
Summary: correct: 3201 / 3204; new: 3; 27min<br><br />
Status: OK<br />
</blockquote><br />
<br />
=== OpenMP ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
export CC=/opt/rh/devtoolset-8/root/usr/bin/gcc<br />
export CXX=/opt/rh/devtoolset-8/root/usr/bin/g++<br />
export F77=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
export FC=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=1 USE_OPENMP=1 NUM_THREADS=64 LIBNAMESUFFIX=omp NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local LIBNAMESUFFIX=omp NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas_omp.a<br />
</blockquote><br />
<br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
./configure CC=gcc CXX=g++x F77=gfortran FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-openmp --disable-shared --enable-static --enable-threads<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br />
FFTW threaded transforms passed basic tests!<br />
</blockquote><br />
sudo make install<br />
<br />
The serial version is created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3_omp.a<br><br />
/usr/local/lib/libfftw3_threads.a<br />
</blockquote><br />
<br />
==== Elpa ====<br />
ELPA replaces the ScaLapack SYEVD to improve the performance of Eigen-vector/value problems.<br />
wget http://elpa.mpcdf.mpg.de/html/Releases/2019.11.001/elpa-2019.11.001.tar.gz<br />
tar -zxvf elpa-2019.11.001.tar.gz<br />
cd elpa-2019.11.001<br />
./configure FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes --enable-openmp=yes --disable-avx512<br />
''hack'': change ''LIBS'' in Makefile: ''LIBS = /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas_omp.a''<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
some skipped, all others passed<br />
</blockquote> <br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa_constants.mod<br><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa_api.mod<br><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa.mod<br><br />
/usr/local/lib/libelpa_openmp.a<br />
</blockquote><br />
<br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
module load mpi/openmpi4-x86_64-gcc8<br />
export CC=/usr/lib64/openmpi4-gcc8/bin/mpicc<br />
export CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx<br />
export F77=/usr/lib64/openmpi4-gcc8/bin/mpif77<br />
export FC=/usr/lib64/openmpi4-gcc8/bin/mpifort<br />
<br />
Allow ''infiniband'' and ''vader'' to run<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Note that the used MPI installation must match the used Fortran compiler. If not, then MPI needs to be recompiled using the same compiler.<br />
</blockquote><br />
<br />
<br />
==== Blas and Lapack ====<br />
Lapack is needed for SIRIUS<br />
wget https://github.com/Reference-LAPACK/lapack/archive/v3.9.0.tar.gz<br />
mv v3.9.0.tar.gz lapack-3.9.0.tar.gz<br />
tar -zxvf lapack-3.9.0.tar.gz<br />
cd lapack-3.9.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_COMPILER=gfortran -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Result: 100% tests passed, 0 tests failed out of 103<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib64/libblas.a<br><br />
/usr/local/lib64/liblapack.a<br><br />
/usr/local/lib64/libtmglib.a<br />
</blockquote><br />
<br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=0 USE_OPENMP=0 NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
==== Scalapack ====<br />
wget https://www.cp2k.org/static/downloads/scalapack-2.1.0.tgz<br />
tar -zxvf scalapack-2.1.0.tgz<br />
scalapack-2.1.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_C_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_BUILD_TYPE=Release -DMPI_BASE_DIR=/usr/lib64/openmpi4-gcc9/lib -DMPI_INCLUDE_PATH=/usr/include/openmpi4-x86_64-gcc8 -DMPIEXEC=/usr/lib64/openmpi4-gcc8/bin/mpiexec -DBLAS_LIBRARIES=/usr/local/lib/libopenblas.a -DLAPACK_LIBRARIES=/usr/local/lib/libopenblas.a -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
100% tests passed, 0 tests failed out of 96<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/linscalapack.a<br />
</blockquote><br />
<br />
==== COSMA ====<br />
Distributed Communication-Optimal Matrix-Matrix Multiplication Algorithm. COSMA is a replacement of the ''pdgemm'' routine included in scalapack.<br />
git clone --recursive https://github.com/eth-cscs/COSMA cosma <br />
cd cosma<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_INCLUDEDIR=/usr/local/include -DCMAKE_BUILD_TYPE=Release -DCOSMA_BLAS=OPENBLAS -DCOSMA_SCALAPACK=CUSTOM -DBUILD_SHARED_LIBS=OFF -DSCALAPACK_LIBRARIES="/usr/local/lib/libscalapack.a;/usr/local/lib/libopenblas.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libquadmath.a" -DOPENBLAS_LIBRARIES="/usr/local/lib/libopenblas.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a"<br />
make test<br />
<br />
<blockquote style="background-color: red; border: solid thin grey;"><br />
20% tests passed, 4 tests failed out of 5<br><br />
<br><br />
Total Test time (real) = 7.99 sec<br><br />
<br><br />
The following tests FAILED:<br><br />
2 - test.multiply_using_layout (Failed)<br><br />
3 - test.multiply (Failed)<br><br />
4 - test.scalar_matmul (Failed)<br><br />
5 - test.pdgemm (Failed)<br><br />
Errors while running CTest<br><br />
</blockquote><br />
<br />
Place the library in front of the scalapack library during linking time.<br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
module load mpi/openmpi4-x86_64-gcc8<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
./configure CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx F77=/usr/lib64/openmpi4-gcc8/bin/mpifort FC=/usr/lib64/openmpi4-gcc8/bin/mpifort FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-openmp --enable-mpi --disable-shared --enable-static --enable-threads<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br><br />
FFTW threaded transforms passed basic tests!<br><br />
MPI FFTW transforms passed 10 tests, 1 CPU<br><br />
MPI FFTW transforms passed 10 tests, 2 CPUs<br><br />
MPI FFTW transforms passed 10 tests, 3 CPUs<br><br />
MPI FFTW transforms passed 10 tests, 4 CPUs<br><br />
MPI FFTW threaded transforms passed 10 tests!<br />
</blockquote><br />
sudo make install<br />
<br />
The serial, mpi, threaded, and openmp versions are created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3.a<br><br />
/usr/local/lib/libftw3_mpi.a<br> <br />
/usr/local/lib/libfftw3_omp.a<br><br />
/usr/local/lib/libfftw3_threads.a <br />
</blockquote><br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1"<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="'''-O1''' -march=native -mno-avx512f" CFLAGS="'''-O1''' -march=native -mno-avx512f" CXXFLAGS="'''-O1''' -march=native -mno-avx512f" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
============================================================================<br><br />
Testsuite summary for gsl 2.6<br><br />
============================================================================<br><br />
all checks passed<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libgslcblas.a<br><br />
/usr/local/lib/libgsl.a<br />
</blockquote><br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="'''-O2''' -march=native -mno-avx512f" CFLAGS="'''-O2''' -march=native -mno-avx512f" CXXFLAGS="'''-O2''' -march=native -mno-avx512f" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -march=native -mno-avx512f"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
make PREFIX=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== libvdwxc ====<br />
Libvdwxc is a general library for evaluating energy and potential for exchange-correlation (XC) functionals from the vdW-DF.<br />
wget https://www.cp2k.org/static/downloads/libvdwxc-0.4.0.tar.gz<br />
tar -zxvf libvdwxc-0.4.0.tar.gz<br />
./configure CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort FCFLAGS="-O3 -march=native -mno-avx512f" FFTW3_INCLUDES="-I/usr/local/include/" FFTW3_LIBS="/usr/local/lib/libfftw3_mpi.a /usr/local/lib/libfftw3.a" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes<br />
make -j 24<br />
make check<br />
sudo make install<br />
<br />
<br />
==== METIS ====<br />
tar -zxvf parmetis-4.0.3.tar.gz<br />
cd parmetis-4.0.3<br />
cd metis<br />
make config prefix=/share/apps/METIS CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 24<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/share/apps/METIS/lib/libmetis.a<br />
</blockquote><br />
<br />
==== ParMETIS ====<br />
tar -zxvf parmetis-4.0.3.tar.gz<br />
cd parmetis-4.0.3<br />
make config prefix=/share/apps/ParMETIS CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 24<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/share/apps/ParMETIS/lib/libparmetis.a<br />
</blockquote><br />
<br />
==== Superlu-6.1.1 ====<br />
wget https://github.com/xiaoyeli/superlu_dist/archive/v6.1.1.tar.gz<br />
mv v6.1.1.tar.gz superlu_dist_6.1.1.tar.gz<br />
tar -zxvf superlu_dist_6.1.1.tar.gz<br />
mkdir build1<br />
cd build1<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DTPL_PARMETIS_LIBRARIES="-L/share/apps/METIS/lib -L/share/apps/ParMETIS/lib /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a -pthread -Wl,-rpath -Wl,/usr/lib64/openmpi4-gcc8/lib -Wl,--enable-new-dtags -L/usr/lib64/openmpi4-gcc8/lib -lmpi_mpifh -lmpi_cxx -lmpi" -DTPL_PARMETIS_INCLUDE_DIRS=/share/apps/ParMETIS/include -DBUILD_STATIC_LIBS=OFF -DCMAKE_C_FLAGS="-std=c99 -O3 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DTPL_LAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DTPL_BLAS_LIBRARIES=/usr/local/lib/libopenblas.a<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 24 tests passed<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsuperlu_dist.a<br />
</blockquote><br />
<br />
==== Superlu-5.1.2 ====<br />
wget http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_dist_5.1.2.tar.gz<br />
tar -zxvf superlu_dist_5.1.2.tar.gz<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DTPL_PARMETIS_LIBRARIES="-L/share/apps/METIS/lib -L/share/apps/ParMETIS/lib /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a -pthread -Wl,-rpath -Wl,/usr/lib64/openmpi4-gcc8/lib -Wl,--enable-new-dtags -L/usr/lib64/openmpi4-gcc8/lib -lmpi_mpifh -lmpi_cxx -lmpi" -DTPL_PARMETIS_INCLUDE_DIRS=/share/apps/ParMETIS/include -DCMAKE_C_FLAGS="-std=c99 -O3 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DTPL_BLAS_LIBRARIES=/usr/local/lib/libopenblas_omp.a<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Running tests...<br><br />
Test project /usr/local/src/SuperLU_DIST_5.1.2/build<br><br />
Start 1: pddrive<br><br />
1/2 Test #1: pddrive .......................... Passed 79.70 sec<br><br />
Start 2: pddrive1<br><br />
2/2 Test #2: pddrive1 ......................... Passed 78.40 sec<br><br />
<br><br />
100% tests passed, 0 tests failed out of 2<br><br />
<br><br />
Total Test time (real) = 158.10 sec<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsuperlu_dist.a<br />
</blockquote><br />
<br />
<br />
==== Elpa ====<br />
ELPA replaces the ScaLapack SYEVD to improve the performance of Eigen-vector/value problems.<br />
wget http://elpa.mpcdf.mpg.de/html/Releases/2019.11.001/elpa-2019.11.001.tar.gz<br />
tar -zxvf elpa-2019.11.001.tar.gz<br />
cd elpa-2019.11.001<br />
./configure FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes --enable-openmp=no --disable-avx512<br />
''hack'': change ''LIBS'' in Makefile: ''LIBS = /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a''<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
some skipped, all others passed<br />
</blockquote> <br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/include/elpa-2019.11.001/modules/elpa_constants.mod<br><br />
/usr/local/include/elpa-2019.11.001/modules/elpa_api.mod<br><br />
/usr/local/include/elpa-2019.11.001/modules/elpa.mod<br><br />
/usr/local/lib/libelpa.a<br />
</blockquote><br />
<br />
==== Pexsi 1.2 ====<br />
The source code must be edited for use with openmpi-4.<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
MPI_Address &#8594; MPI_Get_address<br><br />
MPI_Type_hindexed &#8594; MPI_Type_create_hindexed<br><br />
MPI_Type_struct &#8594; MPI_Type_create_struct<br><br />
MPI_Errhandler_set&#8594; remove lines<br />
</blockquote><br />
The Pole EXpansion and Selected Inversion (PEXSI) method requires the PEXSI library and two dependencies (ParMETIS and SuperLU_DIST).<br />
wget https://www.cp2k.org/static/downloads/pexsi_v1.2.0.tar.gz<br />
tar -zxvf pexsi_v1.2.0.tar.gz<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DMETIS_LIBRARIES=/share/apps/METIS/lib/libmetis.a -DPARMETIS_LIBRARIES=/share/apps/ParMETIS/lib/libparmetis.a -Dlinalg_BLAS_LIBRARIES=/usr/local/lib/libopenblas.a -Dlinalg_LAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DCMAKE_CXX_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_C_FLAGS="-std=c99 -O2 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
<br />
edit ''cmake/modules/FindLinAlg.cmake'' uncomment line 373 and 375.<br />
<br />
make -j 24<br />
sudo make install<br />
sudo make finstall<br />
<br />
==== Pexsi 0.10.2 ====<br />
cp config/make.inc.linux.gnu ./make.inc<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PAR_ND_LIBRARY = parmetis<br><br />
SEQ_ND_LIBRARY = metis<br><br />
<br><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
CXX = /usr/lib64/openmpi4-gcc8/bin/mpicxx<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LOADER = /usr/lib64/openmpi4-gcc8/bin/mpicxx<br><br />
<br><br />
DSUPERLU_DIR = /usr/local<br><br />
METIS_DIR = /share/apps/METIS<br><br />
PARMETIS_DIR = /share/apps/ParMETIS<br><br />
<br><br />
DSUPERLU_INCLUDE = -I/usr/local/include<br><br />
<br><br />
GFORTRAN_LIB = /opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a<br><br />
LAPACK_LIB = /usr/local/lib/libscalapack.a<br><br />
BLAS_LIB = /usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
The source code must be edited for use with openmpi-4.<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
MPI_Address &#8594; MPI_Get_address<br><br />
MPI_Type_hindexed &#8594; MPI_Type_create_hindexed<br><br />
MPI_Type_struct &#8594; MPI_Type_create_struct<br><br />
</blockquote><br />
<br />
make<br />
make install<br />
sudo cp /usr/local/src/pexsi_v0.10.2/build/lib/libpexsi_linux_v0.10.2.a /usr/local/lib<br />
sudo cp /usr/local/src/pexsi_v0.10.2/build/include/* /usr/local/include/<br />
<br />
==== SpFFT ====<br />
Needed in SIRIUS.<br />
wget https://github.com/eth-cscs/SpFFT/archive/v0.9.9.tar.gz<br />
mv v0.9.9.tar.gz SpFFT-0.9.9.tar.gz<br />
tar -zxvf SpFFT-0.9.9.tar.gz<br />
cd SpFFT-0.9.9<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE -DSPFFT_OMP=ON -DSPFFT_MPI=ON -DSPFFT_INSTALL=ON -DSPFFT_STATIC=ON<br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libspfft.a<br />
</blockquote><br />
<br />
==== SIRIUS 6.5.3 ====<br />
SIRIUS is a domain specific library for electronic structure calculations.<br />
wget https://github.com/electronic-structure/SIRIUS/archive/v6.5.3.tar.gz<br />
mv v6.5.3.tar.gz SIRIUS-v6.5.3.tar.gz<br />
tar -zxvf SIRIUS-v6.5.3.tar.gz<br />
cd SIRIUS-6.5.3<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/share/apps/SIRIUS -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DGSL_CBLAS_LIBRARY=/usr/local/lib/libgsl.a -DGSL_CBLAS_LIBRARY_DEBUG=/usr/local/lib/libgslcblas.a -DGSL_LIBRARY=/usr/local/lib/libgsl.a -DGSL_LIBRARY_DEBUG=/usr/local/lib/libgsl.a -DUSE_ELPA=ON -DELPA_INCLUDE_DIR=/usr/local/include/elpa-2019.11.001/elpa -DELPA_LIBRARIES="/usr/local/lib/libelpa.a;/usr/local/lib/libscalapack.a;/usr/local/lib/libopenblas.a" -DUSE_VDWXC=ON -DLIBVDWXC_LIBRARIES="/usr/local/lib/libvdwxc.a;/usr/local/lib/libfftw3.a"<br />
make -j 24<br />
make install<br />
<br />
==== SIRIUS 6.3.2 ====<br />
wget https://www.cp2k.org/static/downloads/SIRIUS-6.3.2.tar.gz<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/share/apps/SIRIUS -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DUSE_SCALAPACK=ON -DSCALAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DBLAS_openblas_LIBRARY=/usr/local/lib/libopenblas.a -DLAPACK_openblas_LIBRARY=/usr/local/lib/libopenblas.a -DGSL_CBLAS_LIBRARY=/usr/local/lib/libgsl.a -DGSL_CBLAS_LIBRARY_DEBUG=/usr/local/lib/libgslcblas.a -DGSL_LIBRARY=/usr/local/lib/libgsl.a -DGSL_LIBRARY_DEBUG=/usr/local/lib/libgsl.a<br />
make -j 24<br />
make install -j 24<br />
cp src/mod_files/sirius.mod /share/apps/SIRIUS/include/<br />
<br />
==== Plumed ====<br />
Library that enables various enhanced sampling methods.<br />
tar -zxvf plumed-2.6.0.tgz<br />
./configure --prefix=/share/apps/plumed/plumed-2.6.0 --enable-shared=no<br />
<br />
change in Makefile.conf<br />
DYNAMIC_LIBS= -lstdc++ -lfftw3 -lgsl -lgslcblas -lz -ldl -llapack -lblas -fopenmp<br />
to<br />
DYNAMIC_LIBS= -lstdc++ /usr/local/lib/libfftw3.a /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a -lz -ldl /usr/local/lib/libopenblas_omp.a -fopenmp -lgfortran<br />
<br />
make -j 24<br />
make install<br />
<br />
==== QUIP ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Do not build using parallel-make<br />
</blockquote><br />
QUantum mechanics and Interatomic Potentials allows for a wider range of interaction potentials.<br />
<br />
wget https://www.cp2k.org/static/downloads/QUIP-cc83ceea5776c40fcb5ab224a25ab04d62175449.zip<br />
export QUIP_ARCH=linux_x86_64_gfortran_openmpi<br />
<br />
make config<br />
<br />
Please enter the linking options for LAPACK and BLAS libraries:<br />
fill in /usr/local/lib/libopenblas.a<br />
Do you want to compile with CP2K support? y<br><br />
Do you want to compile with VASP support? y<br><br />
Do you want to compile with Tight Binding (TB) support? y<br><br />
Please enter directories where METIS libraries are kept:<br />
fill in /share/apps/METIS/lib/<br />
<br />
make libquip<br />
mkdir -p /share/apps/QUIP/QUIP-2015<br />
make PREFIX=/share/apps/QUIP/QUIP-2015 QUIP_INSTALLDIR=/share/apps/QUIP/QUIP-2015 install<br />
mkdir /share/apps/QUIP/QUIP-2015/include/<br />
cp build/linux_x86_64_gfortran_openmpi/quip_unified_wrapper_module.mod /share/apps/QUIP/QUIP-2015/include/<br />
mkdir /share/apps/QUIP/QUIP-2015/lib/<br />
cp build/linux_x86_64_gfortran_openmpi/*.a /share/apps/QUIP/QUIP-2015/lib<br />
cp src/FoX-4.0.3/objs.linux_x86_64_gfortran_openmpi/lib/libFoX_*.a /share/apps/QUIP/QUIP-2015/lib<br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O2 -g -march=native -mno-avx512f -I/usr/local/include/ -L/usr/local/include/<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include -I/share/apps/QUIP/QUIP-2015/include/ -I/share/apps/METIS/include/ -I/share/apps/ParMETIS/include -I/share/apps/plumed/plumed-2.6.0/include/ -I/share/apps/SIRIUS/include/<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++ -lgomp -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightgreen; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3261<br><br />
Number of NEW tests 8<br><br />
Total number of tests 3269<br><br />
GREPME 0 0 3261 8 3269 X<br><br />
<br><br />
Summary: correct: 3261 / 3269; new: 8; 38min<br><br />
Status: OK<br />
</blockquote><br />
<br />
<br />
To solve SIRIUS warnings in the top of the output, use the latest version of SIRIUS and modify the following cp2k source files:<br />
cd cp2k-7.1<br />
cd src<br />
wget https://raw.githubusercontent.com/cp2k/cp2k/b1fc8cddc7ca9b30bf6de29e87ac9e3f14c60136/src/sirius_interface.F<br />
wget https://raw.githubusercontent.com/cp2k/cp2k/b1fc8cddc7ca9b30bf6de29e87ac9e3f14c60136/src/input_cp2k_pwdft.F<br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
# Tested with: GFortran 8.3.1, OPENMPICH 4.0.3, OpenBLAS 0.3.0, ScaLAPACK 2.1.0, FFTW 3.3.8, Libint 2.6.0, Libxc 4.3.4, libxsmm 1.15,<br><br />
# ELPA 2019.11.001, PLUMED 2.6.0, SPGLIB 1.12.2, QUIP-2015, ParMETIS-4.0.3, Pexsi-1.2.0, SIRIUS 6.5.3, SpFFT 0.9.9, libvdw 0.4.0<br><br />
# Author: David Dubbeldam (d.dubbeldam@uva.nl, University of Amsterdam, May 2020)<br><br />
<br><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O3 -g -mtune=native -mno-avx512f -I/usr/local/include/ -L/usr/local/include/<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
DFLAGS += -D__SIRIUS -D__PLUMED2 -D__QUIP -D__LIBPEXSI -D__ELPA<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include -I/share/apps/QUIP/QUIP-2015/include/ -I/share/apps/METIS/include/ -I/share/apps/ParMETIS/include<br><br />
FCFLAGS += -I/share/apps/plumed/plumed-2.6.0/include/ -I/share/apps/SIRIUS/include/sirius<br><br />
FCFLAGS += -I/usr/local/include/elpa-2019.11.001/elpa -I/usr/local/include/elpa-2019.11.001/modules<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = $(PLUMED_DEPENDENCIES) /share/apps/plumed/plumed-2.6.0/lib/libplumed.a<br><br />
LIBS += /usr/local/lib/libelpa.a<br><br />
LIBS += /usr/local/lib64/libpexsi.a<br><br />
LIBS += /share/apps/SIRIUS/lib64/libsirius.a<br><br />
LIBS += /usr/local/lib/libspfft.a<br><br />
LIBS += /usr/local/lib/libvdwxc.a<br><br />
LIBS += /usr/local/lib64/libsuperlu_dist.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libquip_core.a /share/apps/QUIP/QUIP-2015/lib/libatoms.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_sax.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_common.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_utils.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_fsys.a<br><br />
LIBS += /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a<br><br />
LIBS += /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a<br><br />
LIBS += -lnetcdf -lhdf5_hl -lhdf5 -lz -lsymspg -ldl -lpthread -lstdc++ -lgomp -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
All tests are fine, but the regression-test hangs on one job, after killing it the test results are<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Number of FAILED tests 1<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3285<br><br />
Number of NEW tests 0<br><br />
Total number of tests 3286<br><br />
GREPME 1 0 3285 0 3286 X<br><br />
<br><br />
Summary: correct: 3285 / 3286; failed: 1; 95min<br><br />
Status: FAILED<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_GFortran&diff=1233
CP2K compiling with GFortran
2020-05-25T08:46:25Z
<p>David Dubbeldam: /* CP2K */</p>
<hr />
<div>Compiling <br />
<br />
== Caveats ==<br />
<br />
# the gcc version 4.8.5 mostly works, but fails for the plumed-part in CP2K (plumed itself compiles fine)<br />
# gcc version 9.1.1 fails (compiles but lots of CP2K unit tests fail, even with ''-O2 -g -mtune=generic'')<br />
# gcc version 8.3.1 works, but sometimes optimization needs to be reduced (e.g. gsl).<br />
<br />
== Compiling subpackages ==<br />
<br />
The following assumes that CP2K will be build from static libraries installed in /usr/local using the ''devtoolset-8'' on ''rocks'' (centos 7.4).<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
export CC=/opt/rh/devtoolset-8/root/usr/bin/gcc<br />
export CXX=/opt/rh/devtoolset-8/root/usr/bin/g++<br />
export F77=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
export FC=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
<br />
==== Blas and Lapack ====<br />
wget https://github.com/Reference-LAPACK/lapack/archive/v3.9.0.tar.gz<br />
mv v3.9.0.tar.gz lapack-3.9.0.tar.gz<br />
tar -zxvf lapack-3.9.0.tar.gz<br />
cd lapack-3.9.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_COMPILER=gfortran -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Result: 100% tests passed, 0 tests failed out of 103<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib64/libblas.a<br><br />
/usr/local/lib64/liblapack.a<br><br />
/usr/local/lib64/libtmglib.a<br />
</blockquote><br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=0 USE_OPENMP=0 NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
./configure CC=gcc CXX=g++x F77=gfortran FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --disable-shared --enable-static<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br><br />
</blockquote><br />
sudo make install<br />
<br />
The serial version is created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3.a<br><br />
</blockquote><br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1"<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="'''-O1''' -march=native -mno-avx512f" CFLAGS="'''-O1''' -march=native -mno-avx512f" CXXFLAGS="'''-O1''' -march=native -mno-avx512f" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
============================================================================<br><br />
Testsuite summary for gsl 2.6<br><br />
============================================================================<br><br />
all checks passed<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libgslcblas.a<br><br />
/usr/local/lib/libgsl.a<br />
</blockquote><br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="'''-O2''' -march=native -mno-avx512f" CFLAGS="'''-O2''' -march=native -mno-avx512f" CXXFLAGS="'''-O2''' -march=native -mno-avx512f" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -march=native -mno-avx512f"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
make PREFIX=/usr/local FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== libvdwxc ====<br />
Libvdwxc is a general library for evaluating energy and potential for exchange-correlation (XC) functionals from the vdW-DF.<br />
wget https://www.cp2k.org/static/downloads/libvdwxc-0.4.0.tar.gz<br />
tar -zxvf libvdwxc-0.4.0.tar.gz<br />
./configure CC=gcc FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" FFTW3_INCLUDES="-I/usr/local/include/" FFTW3_LIBS="/usr/local/lib/libfftw3.a" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes<br />
make -j 24<br />
make check<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libvdwxcfort.a<br><br />
/usr/local/lib/libvdwxc.a<br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== Spglib ====<br />
A library for finding and handling crystal symmetries<br />
wget https://github.com/spglib/spglib/archive/v1.11.2.1.tar.gz<br />
mv v1.11.2.1.tar.gz spglib-v1.11.2.1.tar.gz<br />
tar -zxvf spglib-v1.11.2.1.tar.gz<br />
cd spglib-1.11.2.1<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsymspg.a<br />
</blockquote><br />
<br />
Rocks/Centos/RH 7 provides precompiled packages<br />
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/s/spglib-1.11.1-2.el7.x86_64.rpm<br />
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/s/spglib-devel-1.11.1-2.el7.x86_64.rpm<br />
sudo rpm -ivh spglib-1.11.1-2.el7.x86_64.rpm spglib-devel-1.11.1-2.el7.x86_64.rpm<br />
<br />
<br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
CC = gcc<br><br />
FC = gfortran<br><br />
LD = gfortran<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O3 -mtune=native -mno-avx512f -I/usr/local/include -L/usr/local/include<br><br />
<br><br />
DFLAGS = -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libopenblas.a<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
make ARCH=local VERSION=sopt test<br />
<blockquote style="background-color: lightgreen; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3201<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 0 3201 3 3204 X<br><br />
<br><br />
Summary: correct: 3201 / 3204; new: 3; 27min<br><br />
Status: OK<br />
</blockquote><br />
<br />
<br />
=== OpenMP ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
export CC=/opt/rh/devtoolset-8/root/usr/bin/gcc<br />
export CXX=/opt/rh/devtoolset-8/root/usr/bin/g++<br />
export F77=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
export FC=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=1 USE_OPENMP=1 NUM_THREADS=64 LIBNAMESUFFIX=omp NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local LIBNAMESUFFIX=omp NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas_omp.a<br />
</blockquote><br />
<br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
./configure CC=gcc CXX=g++x F77=gfortran FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-openmp --disable-shared --enable-static --enable-threads<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br />
FFTW threaded transforms passed basic tests!<br />
</blockquote><br />
sudo make install<br />
<br />
The serial version is created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3_omp.a<br><br />
/usr/local/lib/libfftw3_threads.a<br />
</blockquote><br />
<br />
==== Elpa ====<br />
ELPA replaces the ScaLapack SYEVD to improve the performance of Eigen-vector/value problems.<br />
wget http://elpa.mpcdf.mpg.de/html/Releases/2019.11.001/elpa-2019.11.001.tar.gz<br />
tar -zxvf elpa-2019.11.001.tar.gz<br />
cd elpa-2019.11.001<br />
./configure FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes --enable-openmp=yes --disable-avx512<br />
''hack'': change ''LIBS'' in Makefile: ''LIBS = /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas_omp.a''<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
some skipped, all others passed<br />
</blockquote> <br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa_constants.mod<br><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa_api.mod<br><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa.mod<br><br />
/usr/local/lib/libelpa_openmp.a<br />
</blockquote><br />
<br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
module load mpi/openmpi4-x86_64-gcc8<br />
export CC=/usr/lib64/openmpi4-gcc8/bin/mpicc<br />
export CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx<br />
export F77=/usr/lib64/openmpi4-gcc8/bin/mpif77<br />
export FC=/usr/lib64/openmpi4-gcc8/bin/mpifort<br />
<br />
Allow ''infiniband'' and ''vader'' to run<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Note that the used MPI installation must match the used Fortran compiler. If not, then MPI needs to be recompiled using the same compiler.<br />
</blockquote><br />
<br />
<br />
==== Blas and Lapack ====<br />
Lapack is needed for SIRIUS<br />
wget https://github.com/Reference-LAPACK/lapack/archive/v3.9.0.tar.gz<br />
mv v3.9.0.tar.gz lapack-3.9.0.tar.gz<br />
tar -zxvf lapack-3.9.0.tar.gz<br />
cd lapack-3.9.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_COMPILER=gfortran -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Result: 100% tests passed, 0 tests failed out of 103<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib64/libblas.a<br><br />
/usr/local/lib64/liblapack.a<br><br />
/usr/local/lib64/libtmglib.a<br />
</blockquote><br />
<br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=0 USE_OPENMP=0 NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
==== Scalapack ====<br />
wget https://www.cp2k.org/static/downloads/scalapack-2.1.0.tgz<br />
tar -zxvf scalapack-2.1.0.tgz<br />
scalapack-2.1.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_C_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_BUILD_TYPE=Release -DMPI_BASE_DIR=/usr/lib64/openmpi4-gcc9/lib -DMPI_INCLUDE_PATH=/usr/include/openmpi4-x86_64-gcc8 -DMPIEXEC=/usr/lib64/openmpi4-gcc8/bin/mpiexec -DBLAS_LIBRARIES=/usr/local/lib/libopenblas.a -DLAPACK_LIBRARIES=/usr/local/lib/libopenblas.a -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
100% tests passed, 0 tests failed out of 96<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/linscalapack.a<br />
</blockquote><br />
<br />
==== COSMA ====<br />
Distributed Communication-Optimal Matrix-Matrix Multiplication Algorithm. COSMA is a replacement of the ''pdgemm'' routine included in scalapack.<br />
git clone --recursive https://github.com/eth-cscs/COSMA cosma <br />
cd cosma<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_INCLUDEDIR=/usr/local/include -DCMAKE_BUILD_TYPE=Release -DCOSMA_BLAS=OPENBLAS -DCOSMA_SCALAPACK=CUSTOM -DBUILD_SHARED_LIBS=OFF -DSCALAPACK_LIBRARIES="/usr/local/lib/libscalapack.a;/usr/local/lib/libopenblas.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libquadmath.a" -DOPENBLAS_LIBRARIES="/usr/local/lib/libopenblas.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a"<br />
make test<br />
<br />
<blockquote style="background-color: red; border: solid thin grey;"><br />
20% tests passed, 4 tests failed out of 5<br><br />
<br><br />
Total Test time (real) = 7.99 sec<br><br />
<br><br />
The following tests FAILED:<br><br />
2 - test.multiply_using_layout (Failed)<br><br />
3 - test.multiply (Failed)<br><br />
4 - test.scalar_matmul (Failed)<br><br />
5 - test.pdgemm (Failed)<br><br />
Errors while running CTest<br><br />
</blockquote><br />
<br />
Place the library in front of the scalapack library during linking time.<br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
module load mpi/openmpi4-x86_64-gcc8<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
./configure CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx F77=/usr/lib64/openmpi4-gcc8/bin/mpifort FC=/usr/lib64/openmpi4-gcc8/bin/mpifort FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-openmp --enable-mpi --disable-shared --enable-static --enable-threads<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br><br />
FFTW threaded transforms passed basic tests!<br><br />
MPI FFTW transforms passed 10 tests, 1 CPU<br><br />
MPI FFTW transforms passed 10 tests, 2 CPUs<br><br />
MPI FFTW transforms passed 10 tests, 3 CPUs<br><br />
MPI FFTW transforms passed 10 tests, 4 CPUs<br><br />
MPI FFTW threaded transforms passed 10 tests!<br />
</blockquote><br />
sudo make install<br />
<br />
The serial, mpi, threaded, and openmp versions are created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3.a<br><br />
/usr/local/lib/libftw3_mpi.a<br> <br />
/usr/local/lib/libfftw3_omp.a<br><br />
/usr/local/lib/libfftw3_threads.a <br />
</blockquote><br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1"<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="'''-O1''' -march=native -mno-avx512f" CFLAGS="'''-O1''' -march=native -mno-avx512f" CXXFLAGS="'''-O1''' -march=native -mno-avx512f" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
============================================================================<br><br />
Testsuite summary for gsl 2.6<br><br />
============================================================================<br><br />
all checks passed<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libgslcblas.a<br><br />
/usr/local/lib/libgsl.a<br />
</blockquote><br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="'''-O2''' -march=native -mno-avx512f" CFLAGS="'''-O2''' -march=native -mno-avx512f" CXXFLAGS="'''-O2''' -march=native -mno-avx512f" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -march=native -mno-avx512f"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
make PREFIX=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== libvdwxc ====<br />
Libvdwxc is a general library for evaluating energy and potential for exchange-correlation (XC) functionals from the vdW-DF.<br />
wget https://www.cp2k.org/static/downloads/libvdwxc-0.4.0.tar.gz<br />
tar -zxvf libvdwxc-0.4.0.tar.gz<br />
./configure CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort FCFLAGS="-O3 -march=native -mno-avx512f" FFTW3_INCLUDES="-I/usr/local/include/" FFTW3_LIBS="/usr/local/lib/libfftw3_mpi.a /usr/local/lib/libfftw3.a" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes<br />
make -j 24<br />
make check<br />
sudo make install<br />
<br />
<br />
==== METIS ====<br />
tar -zxvf parmetis-4.0.3.tar.gz<br />
cd parmetis-4.0.3<br />
cd metis<br />
make config prefix=/share/apps/METIS CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 24<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/share/apps/METIS/lib/libmetis.a<br />
</blockquote><br />
<br />
==== ParMETIS ====<br />
tar -zxvf parmetis-4.0.3.tar.gz<br />
cd parmetis-4.0.3<br />
make config prefix=/share/apps/ParMETIS CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 24<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/share/apps/ParMETIS/lib/libparmetis.a<br />
</blockquote><br />
<br />
==== Superlu-6.1.1 ====<br />
wget https://github.com/xiaoyeli/superlu_dist/archive/v6.1.1.tar.gz<br />
mv v6.1.1.tar.gz superlu_dist_6.1.1.tar.gz<br />
tar -zxvf superlu_dist_6.1.1.tar.gz<br />
mkdir build1<br />
cd build1<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DTPL_PARMETIS_LIBRARIES="-L/share/apps/METIS/lib -L/share/apps/ParMETIS/lib /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a -pthread -Wl,-rpath -Wl,/usr/lib64/openmpi4-gcc8/lib -Wl,--enable-new-dtags -L/usr/lib64/openmpi4-gcc8/lib -lmpi_mpifh -lmpi_cxx -lmpi" -DTPL_PARMETIS_INCLUDE_DIRS=/share/apps/ParMETIS/include -DBUILD_STATIC_LIBS=OFF -DCMAKE_C_FLAGS="-std=c99 -O3 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DTPL_LAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DTPL_BLAS_LIBRARIES=/usr/local/lib/libopenblas.a<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 24 tests passed<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsuperlu_dist.a<br />
</blockquote><br />
<br />
==== Superlu-5.1.2 ====<br />
wget http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_dist_5.1.2.tar.gz<br />
tar -zxvf superlu_dist_5.1.2.tar.gz<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DTPL_PARMETIS_LIBRARIES="-L/share/apps/METIS/lib -L/share/apps/ParMETIS/lib /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a -pthread -Wl,-rpath -Wl,/usr/lib64/openmpi4-gcc8/lib -Wl,--enable-new-dtags -L/usr/lib64/openmpi4-gcc8/lib -lmpi_mpifh -lmpi_cxx -lmpi" -DTPL_PARMETIS_INCLUDE_DIRS=/share/apps/ParMETIS/include -DCMAKE_C_FLAGS="-std=c99 -O3 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DTPL_BLAS_LIBRARIES=/usr/local/lib/libopenblas_omp.a<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Running tests...<br><br />
Test project /usr/local/src/SuperLU_DIST_5.1.2/build<br><br />
Start 1: pddrive<br><br />
1/2 Test #1: pddrive .......................... Passed 79.70 sec<br><br />
Start 2: pddrive1<br><br />
2/2 Test #2: pddrive1 ......................... Passed 78.40 sec<br><br />
<br><br />
100% tests passed, 0 tests failed out of 2<br><br />
<br><br />
Total Test time (real) = 158.10 sec<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsuperlu_dist.a<br />
</blockquote><br />
<br />
<br />
==== Elpa ====<br />
ELPA replaces the ScaLapack SYEVD to improve the performance of Eigen-vector/value problems.<br />
wget http://elpa.mpcdf.mpg.de/html/Releases/2019.11.001/elpa-2019.11.001.tar.gz<br />
tar -zxvf elpa-2019.11.001.tar.gz<br />
cd elpa-2019.11.001<br />
./configure FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes --enable-openmp=no --disable-avx512<br />
''hack'': change ''LIBS'' in Makefile: ''LIBS = /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a''<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
some skipped, all others passed<br />
</blockquote> <br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/include/elpa-2019.11.001/modules/elpa_constants.mod<br><br />
/usr/local/include/elpa-2019.11.001/modules/elpa_api.mod<br><br />
/usr/local/include/elpa-2019.11.001/modules/elpa.mod<br><br />
/usr/local/lib/libelpa.a<br />
</blockquote><br />
<br />
==== Pexsi 1.2 ====<br />
The source code must be edited for use with openmpi-4.<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
MPI_Address &#8594; MPI_Get_address<br><br />
MPI_Type_hindexed &#8594; MPI_Type_create_hindexed<br><br />
MPI_Type_struct &#8594; MPI_Type_create_struct<br><br />
MPI_Errhandler_set&#8594; remove lines<br />
</blockquote><br />
The Pole EXpansion and Selected Inversion (PEXSI) method requires the PEXSI library and two dependencies (ParMETIS and SuperLU_DIST).<br />
wget https://www.cp2k.org/static/downloads/pexsi_v1.2.0.tar.gz<br />
tar -zxvf pexsi_v1.2.0.tar.gz<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DMETIS_LIBRARIES=/share/apps/METIS/lib/libmetis.a -DPARMETIS_LIBRARIES=/share/apps/ParMETIS/lib/libparmetis.a -Dlinalg_BLAS_LIBRARIES=/usr/local/lib/libopenblas.a -Dlinalg_LAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DCMAKE_CXX_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_C_FLAGS="-std=c99 -O2 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
<br />
edit ''cmake/modules/FindLinAlg.cmake'' uncomment line 373 and 375.<br />
<br />
make -j 24<br />
sudo make install<br />
sudo make finstall<br />
<br />
==== Pexsi 0.10.2 ====<br />
cp config/make.inc.linux.gnu ./make.inc<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PAR_ND_LIBRARY = parmetis<br><br />
SEQ_ND_LIBRARY = metis<br><br />
<br><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
CXX = /usr/lib64/openmpi4-gcc8/bin/mpicxx<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LOADER = /usr/lib64/openmpi4-gcc8/bin/mpicxx<br><br />
<br><br />
DSUPERLU_DIR = /usr/local<br><br />
METIS_DIR = /share/apps/METIS<br><br />
PARMETIS_DIR = /share/apps/ParMETIS<br><br />
<br><br />
DSUPERLU_INCLUDE = -I/usr/local/include<br><br />
<br><br />
GFORTRAN_LIB = /opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a<br><br />
LAPACK_LIB = /usr/local/lib/libscalapack.a<br><br />
BLAS_LIB = /usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
The source code must be edited for use with openmpi-4.<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
MPI_Address &#8594; MPI_Get_address<br><br />
MPI_Type_hindexed &#8594; MPI_Type_create_hindexed<br><br />
MPI_Type_struct &#8594; MPI_Type_create_struct<br><br />
</blockquote><br />
<br />
make<br />
make install<br />
sudo cp /usr/local/src/pexsi_v0.10.2/build/lib/libpexsi_linux_v0.10.2.a /usr/local/lib<br />
sudo cp /usr/local/src/pexsi_v0.10.2/build/include/* /usr/local/include/<br />
<br />
==== SpFFT ====<br />
Needed in SIRIUS.<br />
wget https://github.com/eth-cscs/SpFFT/archive/v0.9.9.tar.gz<br />
mv v0.9.9.tar.gz SpFFT-0.9.9.tar.gz<br />
tar -zxvf SpFFT-0.9.9.tar.gz<br />
cd SpFFT-0.9.9<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE -DSPFFT_OMP=ON -DSPFFT_MPI=ON -DSPFFT_INSTALL=ON -DSPFFT_STATIC=ON<br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libspfft.a<br />
</blockquote><br />
<br />
==== SIRIUS 6.5.3 ====<br />
SIRIUS is a domain specific library for electronic structure calculations.<br />
wget https://github.com/electronic-structure/SIRIUS/archive/v6.5.3.tar.gz<br />
mv v6.5.3.tar.gz SIRIUS-v6.5.3.tar.gz<br />
tar -zxvf SIRIUS-v6.5.3.tar.gz<br />
cd SIRIUS-6.5.3<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/share/apps/SIRIUS -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DGSL_CBLAS_LIBRARY=/usr/local/lib/libgsl.a -DGSL_CBLAS_LIBRARY_DEBUG=/usr/local/lib/libgslcblas.a -DGSL_LIBRARY=/usr/local/lib/libgsl.a -DGSL_LIBRARY_DEBUG=/usr/local/lib/libgsl.a -DUSE_ELPA=ON -DELPA_INCLUDE_DIR=/usr/local/include/elpa-2019.11.001/elpa -DELPA_LIBRARIES="/usr/local/lib/libelpa.a;/usr/local/lib/libscalapack.a;/usr/local/lib/libopenblas.a" -DUSE_VDWXC=ON -DLIBVDWXC_LIBRARIES="/usr/local/lib/libvdwxc.a;/usr/local/lib/libfftw3.a"<br />
make -j 24<br />
make install<br />
<br />
==== SIRIUS 6.3.2 ====<br />
wget https://www.cp2k.org/static/downloads/SIRIUS-6.3.2.tar.gz<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/share/apps/SIRIUS -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DUSE_SCALAPACK=ON -DSCALAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DBLAS_openblas_LIBRARY=/usr/local/lib/libopenblas.a -DLAPACK_openblas_LIBRARY=/usr/local/lib/libopenblas.a -DGSL_CBLAS_LIBRARY=/usr/local/lib/libgsl.a -DGSL_CBLAS_LIBRARY_DEBUG=/usr/local/lib/libgslcblas.a -DGSL_LIBRARY=/usr/local/lib/libgsl.a -DGSL_LIBRARY_DEBUG=/usr/local/lib/libgsl.a<br />
make -j 24<br />
make install -j 24<br />
cp src/mod_files/sirius.mod /share/apps/SIRIUS/include/<br />
<br />
==== Plumed ====<br />
Library that enables various enhanced sampling methods.<br />
tar -zxvf plumed-2.6.0.tgz<br />
./configure --prefix=/share/apps/plumed/plumed-2.6.0 --enable-shared=no<br />
<br />
change in Makefile.conf<br />
DYNAMIC_LIBS= -lstdc++ -lfftw3 -lgsl -lgslcblas -lz -ldl -llapack -lblas -fopenmp<br />
to<br />
DYNAMIC_LIBS= -lstdc++ /usr/local/lib/libfftw3.a /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a -lz -ldl /usr/local/lib/libopenblas_omp.a -fopenmp -lgfortran<br />
<br />
make -j 24<br />
make install<br />
<br />
==== QUIP ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Do not build using parallel-make<br />
</blockquote><br />
QUantum mechanics and Interatomic Potentials allows for a wider range of interaction potentials.<br />
<br />
wget https://www.cp2k.org/static/downloads/QUIP-cc83ceea5776c40fcb5ab224a25ab04d62175449.zip<br />
export QUIP_ARCH=linux_x86_64_gfortran_openmpi<br />
<br />
make config<br />
<br />
Please enter the linking options for LAPACK and BLAS libraries:<br />
fill in /usr/local/lib/libopenblas.a<br />
Do you want to compile with CP2K support? y<br><br />
Do you want to compile with VASP support? y<br><br />
Do you want to compile with Tight Binding (TB) support? y<br><br />
Please enter directories where METIS libraries are kept:<br />
fill in /share/apps/METIS/lib/<br />
<br />
make libquip<br />
mkdir -p /share/apps/QUIP/QUIP-2015<br />
make PREFIX=/share/apps/QUIP/QUIP-2015 QUIP_INSTALLDIR=/share/apps/QUIP/QUIP-2015 install<br />
mkdir /share/apps/QUIP/QUIP-2015/include/<br />
cp build/linux_x86_64_gfortran_openmpi/quip_unified_wrapper_module.mod /share/apps/QUIP/QUIP-2015/include/<br />
mkdir /share/apps/QUIP/QUIP-2015/lib/<br />
cp build/linux_x86_64_gfortran_openmpi/*.a /share/apps/QUIP/QUIP-2015/lib<br />
cp src/FoX-4.0.3/objs.linux_x86_64_gfortran_openmpi/lib/libFoX_*.a /share/apps/QUIP/QUIP-2015/lib<br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O2 -g -march=native -mno-avx512f -I/usr/local/include/ -L/usr/local/include/<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include -I/share/apps/QUIP/QUIP-2015/include/ -I/share/apps/METIS/include/ -I/share/apps/ParMETIS/include -I/share/apps/plumed/plumed-2.6.0/include/ -I/share/apps/SIRIUS/include/<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++ -lgomp -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightgreen; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3261<br><br />
Number of NEW tests 8<br><br />
Total number of tests 3269<br><br />
GREPME 0 0 3261 8 3269 X<br><br />
<br><br />
Summary: correct: 3261 / 3269; new: 8; 38min<br><br />
Status: OK<br />
</blockquote><br />
<br />
<br />
To solve SIRIUS warnings in the top of the output, use the latest version of SIRIUS and modify the following cp2k source files:<br />
cd cp2k-7.1<br />
cd src<br />
wget https://raw.githubusercontent.com/cp2k/cp2k/b1fc8cddc7ca9b30bf6de29e87ac9e3f14c60136/src/sirius_interface.F<br />
wget https://raw.githubusercontent.com/cp2k/cp2k/b1fc8cddc7ca9b30bf6de29e87ac9e3f14c60136/src/input_cp2k_pwdft.F<br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
# Tested with: GFortran 8.3.1, OPENMPICH 4.0.3, OpenBLAS 0.3.0, ScaLAPACK 2.1.0, FFTW 3.3.8, Libint 2.6.0, Libxc 4.3.4, libxsmm 1.15,<br><br />
# ELPA 2019.11.001, PLUMED 2.6.0, SPGLIB 1.12.2, QUIP-2015, ParMETIS-4.0.3, Pexsi-1.2.0, SIRIUS 6.5.3, SpFFT 0.9.9, libvdw 0.4.0<br><br />
# Author: David Dubbeldam (d.dubbeldam@uva.nl, University of Amsterdam, May 2020)<br><br />
<br><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O3 -g -mtune=native -mno-avx512f -I/usr/local/include/ -L/usr/local/include/<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
DFLAGS += -D__SIRIUS -D__PLUMED2 -D__QUIP -D__LIBPEXSI -D__ELPA<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include -I/share/apps/QUIP/QUIP-2015/include/ -I/share/apps/METIS/include/ -I/share/apps/ParMETIS/include<br><br />
FCFLAGS += -I/share/apps/plumed/plumed-2.6.0/include/ -I/share/apps/SIRIUS/include/sirius<br><br />
FCFLAGS += -I/usr/local/include/elpa-2019.11.001/elpa -I/usr/local/include/elpa-2019.11.001/modules<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = $(PLUMED_DEPENDENCIES) /share/apps/plumed/plumed-2.6.0/lib/libplumed.a<br><br />
LIBS += /usr/local/lib/libelpa.a<br><br />
LIBS += /usr/local/lib64/libpexsi.a<br><br />
LIBS += /share/apps/SIRIUS/lib64/libsirius.a<br><br />
LIBS += /usr/local/lib/libspfft.a<br><br />
LIBS += /usr/local/lib/libvdwxc.a<br><br />
LIBS += /usr/local/lib64/libsuperlu_dist.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libquip_core.a /share/apps/QUIP/QUIP-2015/lib/libatoms.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_sax.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_common.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_utils.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_fsys.a<br><br />
LIBS += /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a<br><br />
LIBS += /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a<br><br />
LIBS += -lnetcdf -lhdf5_hl -lhdf5 -lz -lsymspg -ldl -lpthread -lstdc++ -lgomp -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
All tests are fine, but the regression-test hangs on one job, after killing it the test results are<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Number of FAILED tests 1<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3285<br><br />
Number of NEW tests 0<br><br />
Total number of tests 3286<br><br />
GREPME 1 0 3285 0 3286 X<br><br />
<br><br />
Summary: correct: 3285 / 3286; failed: 1; 95min<br><br />
Status: FAILED<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_GFortran&diff=1232
CP2K compiling with GFortran
2020-05-25T08:45:20Z
<p>David Dubbeldam: </p>
<hr />
<div>Compiling <br />
<br />
== Caveats ==<br />
<br />
# the gcc version 4.8.5 mostly works, but fails for the plumed-part in CP2K (plumed itself compiles fine)<br />
# gcc version 9.1.1 fails (compiles but lots of CP2K unit tests fail, even with ''-O2 -g -mtune=generic'')<br />
# gcc version 8.3.1 works, but sometimes optimization needs to be reduced (e.g. gsl).<br />
<br />
== Compiling subpackages ==<br />
<br />
The following assumes that CP2K will be build from static libraries installed in /usr/local using the ''devtoolset-8'' on ''rocks'' (centos 7.4).<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
export CC=/opt/rh/devtoolset-8/root/usr/bin/gcc<br />
export CXX=/opt/rh/devtoolset-8/root/usr/bin/g++<br />
export F77=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
export FC=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
<br />
==== Blas and Lapack ====<br />
wget https://github.com/Reference-LAPACK/lapack/archive/v3.9.0.tar.gz<br />
mv v3.9.0.tar.gz lapack-3.9.0.tar.gz<br />
tar -zxvf lapack-3.9.0.tar.gz<br />
cd lapack-3.9.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_COMPILER=gfortran -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Result: 100% tests passed, 0 tests failed out of 103<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib64/libblas.a<br><br />
/usr/local/lib64/liblapack.a<br><br />
/usr/local/lib64/libtmglib.a<br />
</blockquote><br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=0 USE_OPENMP=0 NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
./configure CC=gcc CXX=g++x F77=gfortran FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --disable-shared --enable-static<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br><br />
</blockquote><br />
sudo make install<br />
<br />
The serial version is created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3.a<br><br />
</blockquote><br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1"<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="'''-O1''' -march=native -mno-avx512f" CFLAGS="'''-O1''' -march=native -mno-avx512f" CXXFLAGS="'''-O1''' -march=native -mno-avx512f" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
============================================================================<br><br />
Testsuite summary for gsl 2.6<br><br />
============================================================================<br><br />
all checks passed<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libgslcblas.a<br><br />
/usr/local/lib/libgsl.a<br />
</blockquote><br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="'''-O2''' -march=native -mno-avx512f" CFLAGS="'''-O2''' -march=native -mno-avx512f" CXXFLAGS="'''-O2''' -march=native -mno-avx512f" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -march=native -mno-avx512f"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
make PREFIX=/usr/local FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== libvdwxc ====<br />
Libvdwxc is a general library for evaluating energy and potential for exchange-correlation (XC) functionals from the vdW-DF.<br />
wget https://www.cp2k.org/static/downloads/libvdwxc-0.4.0.tar.gz<br />
tar -zxvf libvdwxc-0.4.0.tar.gz<br />
./configure CC=gcc FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" FFTW3_INCLUDES="-I/usr/local/include/" FFTW3_LIBS="/usr/local/lib/libfftw3.a" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes<br />
make -j 24<br />
make check<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libvdwxcfort.a<br><br />
/usr/local/lib/libvdwxc.a<br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== Spglib ====<br />
A library for finding and handling crystal symmetries<br />
wget https://github.com/spglib/spglib/archive/v1.11.2.1.tar.gz<br />
mv v1.11.2.1.tar.gz spglib-v1.11.2.1.tar.gz<br />
tar -zxvf spglib-v1.11.2.1.tar.gz<br />
cd spglib-1.11.2.1<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsymspg.a<br />
</blockquote><br />
<br />
Rocks/Centos/RH 7 provides precompiled packages<br />
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/s/spglib-1.11.1-2.el7.x86_64.rpm<br />
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/s/spglib-devel-1.11.1-2.el7.x86_64.rpm<br />
sudo rpm -ivh spglib-1.11.1-2.el7.x86_64.rpm spglib-devel-1.11.1-2.el7.x86_64.rpm<br />
<br />
<br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
CC = gcc<br><br />
FC = gfortran<br><br />
LD = gfortran<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O3 -mtune=native -mno-avx512f -I/usr/local/include -L/usr/local/include<br><br />
<br><br />
DFLAGS = -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libopenblas.a<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
make ARCH=local VERSION=sopt test<br />
<blockquote style="background-color: lightgreen; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3201<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 0 3201 3 3204 X<br><br />
<br><br />
Summary: correct: 3201 / 3204; new: 3; 27min<br><br />
Status: OK<br />
</blockquote><br />
<br />
<br />
=== OpenMP ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
export CC=/opt/rh/devtoolset-8/root/usr/bin/gcc<br />
export CXX=/opt/rh/devtoolset-8/root/usr/bin/g++<br />
export F77=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
export FC=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=1 USE_OPENMP=1 NUM_THREADS=64 LIBNAMESUFFIX=omp NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local LIBNAMESUFFIX=omp NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas_omp.a<br />
</blockquote><br />
<br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
./configure CC=gcc CXX=g++x F77=gfortran FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-openmp --disable-shared --enable-static --enable-threads<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br />
FFTW threaded transforms passed basic tests!<br />
</blockquote><br />
sudo make install<br />
<br />
The serial version is created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3_omp.a<br><br />
/usr/local/lib/libfftw3_threads.a<br />
</blockquote><br />
<br />
==== Elpa ====<br />
ELPA replaces the ScaLapack SYEVD to improve the performance of Eigen-vector/value problems.<br />
wget http://elpa.mpcdf.mpg.de/html/Releases/2019.11.001/elpa-2019.11.001.tar.gz<br />
tar -zxvf elpa-2019.11.001.tar.gz<br />
cd elpa-2019.11.001<br />
./configure FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes --enable-openmp=yes --disable-avx512<br />
''hack'': change ''LIBS'' in Makefile: ''LIBS = /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas_omp.a''<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
some skipped, all others passed<br />
</blockquote> <br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa_constants.mod<br><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa_api.mod<br><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa.mod<br><br />
/usr/local/lib/libelpa_openmp.a<br />
</blockquote><br />
<br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
module load mpi/openmpi4-x86_64-gcc8<br />
export CC=/usr/lib64/openmpi4-gcc8/bin/mpicc<br />
export CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx<br />
export F77=/usr/lib64/openmpi4-gcc8/bin/mpif77<br />
export FC=/usr/lib64/openmpi4-gcc8/bin/mpifort<br />
<br />
Allow ''infiniband'' and ''vader'' to run<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Note that the used MPI installation must match the used Fortran compiler. If not, then MPI needs to be recompiled using the same compiler.<br />
</blockquote><br />
<br />
<br />
==== Blas and Lapack ====<br />
Lapack is needed for SIRIUS<br />
wget https://github.com/Reference-LAPACK/lapack/archive/v3.9.0.tar.gz<br />
mv v3.9.0.tar.gz lapack-3.9.0.tar.gz<br />
tar -zxvf lapack-3.9.0.tar.gz<br />
cd lapack-3.9.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_COMPILER=gfortran -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Result: 100% tests passed, 0 tests failed out of 103<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib64/libblas.a<br><br />
/usr/local/lib64/liblapack.a<br><br />
/usr/local/lib64/libtmglib.a<br />
</blockquote><br />
<br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=0 USE_OPENMP=0 NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
==== Scalapack ====<br />
wget https://www.cp2k.org/static/downloads/scalapack-2.1.0.tgz<br />
tar -zxvf scalapack-2.1.0.tgz<br />
scalapack-2.1.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_C_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_BUILD_TYPE=Release -DMPI_BASE_DIR=/usr/lib64/openmpi4-gcc9/lib -DMPI_INCLUDE_PATH=/usr/include/openmpi4-x86_64-gcc8 -DMPIEXEC=/usr/lib64/openmpi4-gcc8/bin/mpiexec -DBLAS_LIBRARIES=/usr/local/lib/libopenblas.a -DLAPACK_LIBRARIES=/usr/local/lib/libopenblas.a -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
100% tests passed, 0 tests failed out of 96<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/linscalapack.a<br />
</blockquote><br />
<br />
==== COSMA ====<br />
Distributed Communication-Optimal Matrix-Matrix Multiplication Algorithm. COSMA is a replacement of the ''pdgemm'' routine included in scalapack.<br />
git clone --recursive https://github.com/eth-cscs/COSMA cosma <br />
cd cosma<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_INCLUDEDIR=/usr/local/include -DCMAKE_BUILD_TYPE=Release -DCOSMA_BLAS=OPENBLAS -DCOSMA_SCALAPACK=CUSTOM -DBUILD_SHARED_LIBS=OFF -DSCALAPACK_LIBRARIES="/usr/local/lib/libscalapack.a;/usr/local/lib/libopenblas.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libquadmath.a" -DOPENBLAS_LIBRARIES="/usr/local/lib/libopenblas.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a"<br />
make test<br />
<br />
<blockquote style="background-color: red; border: solid thin grey;"><br />
20% tests passed, 4 tests failed out of 5<br><br />
<br><br />
Total Test time (real) = 7.99 sec<br><br />
<br><br />
The following tests FAILED:<br><br />
2 - test.multiply_using_layout (Failed)<br><br />
3 - test.multiply (Failed)<br><br />
4 - test.scalar_matmul (Failed)<br><br />
5 - test.pdgemm (Failed)<br><br />
Errors while running CTest<br><br />
</blockquote><br />
<br />
Place the library in front of the scalapack library during linking time.<br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
module load mpi/openmpi4-x86_64-gcc8<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
./configure CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx F77=/usr/lib64/openmpi4-gcc8/bin/mpifort FC=/usr/lib64/openmpi4-gcc8/bin/mpifort FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-openmp --enable-mpi --disable-shared --enable-static --enable-threads<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br><br />
FFTW threaded transforms passed basic tests!<br><br />
MPI FFTW transforms passed 10 tests, 1 CPU<br><br />
MPI FFTW transforms passed 10 tests, 2 CPUs<br><br />
MPI FFTW transforms passed 10 tests, 3 CPUs<br><br />
MPI FFTW transforms passed 10 tests, 4 CPUs<br><br />
MPI FFTW threaded transforms passed 10 tests!<br />
</blockquote><br />
sudo make install<br />
<br />
The serial, mpi, threaded, and openmp versions are created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3.a<br><br />
/usr/local/lib/libftw3_mpi.a<br> <br />
/usr/local/lib/libfftw3_omp.a<br><br />
/usr/local/lib/libfftw3_threads.a <br />
</blockquote><br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1"<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="'''-O1''' -march=native -mno-avx512f" CFLAGS="'''-O1''' -march=native -mno-avx512f" CXXFLAGS="'''-O1''' -march=native -mno-avx512f" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
============================================================================<br><br />
Testsuite summary for gsl 2.6<br><br />
============================================================================<br><br />
all checks passed<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libgslcblas.a<br><br />
/usr/local/lib/libgsl.a<br />
</blockquote><br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="'''-O2''' -march=native -mno-avx512f" CFLAGS="'''-O2''' -march=native -mno-avx512f" CXXFLAGS="'''-O2''' -march=native -mno-avx512f" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -march=native -mno-avx512f"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
make PREFIX=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== libvdwxc ====<br />
Libvdwxc is a general library for evaluating energy and potential for exchange-correlation (XC) functionals from the vdW-DF.<br />
wget https://www.cp2k.org/static/downloads/libvdwxc-0.4.0.tar.gz<br />
tar -zxvf libvdwxc-0.4.0.tar.gz<br />
./configure CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort FCFLAGS="-O3 -march=native -mno-avx512f" FFTW3_INCLUDES="-I/usr/local/include/" FFTW3_LIBS="/usr/local/lib/libfftw3_mpi.a /usr/local/lib/libfftw3.a" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes<br />
make -j 24<br />
make check<br />
sudo make install<br />
<br />
<br />
==== METIS ====<br />
tar -zxvf parmetis-4.0.3.tar.gz<br />
cd parmetis-4.0.3<br />
cd metis<br />
make config prefix=/share/apps/METIS CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 24<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/share/apps/METIS/lib/libmetis.a<br />
</blockquote><br />
<br />
==== ParMETIS ====<br />
tar -zxvf parmetis-4.0.3.tar.gz<br />
cd parmetis-4.0.3<br />
make config prefix=/share/apps/ParMETIS CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 24<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/share/apps/ParMETIS/lib/libparmetis.a<br />
</blockquote><br />
<br />
==== Superlu-6.1.1 ====<br />
wget https://github.com/xiaoyeli/superlu_dist/archive/v6.1.1.tar.gz<br />
mv v6.1.1.tar.gz superlu_dist_6.1.1.tar.gz<br />
tar -zxvf superlu_dist_6.1.1.tar.gz<br />
mkdir build1<br />
cd build1<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DTPL_PARMETIS_LIBRARIES="-L/share/apps/METIS/lib -L/share/apps/ParMETIS/lib /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a -pthread -Wl,-rpath -Wl,/usr/lib64/openmpi4-gcc8/lib -Wl,--enable-new-dtags -L/usr/lib64/openmpi4-gcc8/lib -lmpi_mpifh -lmpi_cxx -lmpi" -DTPL_PARMETIS_INCLUDE_DIRS=/share/apps/ParMETIS/include -DBUILD_STATIC_LIBS=OFF -DCMAKE_C_FLAGS="-std=c99 -O3 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DTPL_LAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DTPL_BLAS_LIBRARIES=/usr/local/lib/libopenblas.a<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 24 tests passed<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsuperlu_dist.a<br />
</blockquote><br />
<br />
==== Superlu-5.1.2 ====<br />
wget http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_dist_5.1.2.tar.gz<br />
tar -zxvf superlu_dist_5.1.2.tar.gz<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DTPL_PARMETIS_LIBRARIES="-L/share/apps/METIS/lib -L/share/apps/ParMETIS/lib /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a -pthread -Wl,-rpath -Wl,/usr/lib64/openmpi4-gcc8/lib -Wl,--enable-new-dtags -L/usr/lib64/openmpi4-gcc8/lib -lmpi_mpifh -lmpi_cxx -lmpi" -DTPL_PARMETIS_INCLUDE_DIRS=/share/apps/ParMETIS/include -DCMAKE_C_FLAGS="-std=c99 -O3 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DTPL_BLAS_LIBRARIES=/usr/local/lib/libopenblas_omp.a<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Running tests...<br><br />
Test project /usr/local/src/SuperLU_DIST_5.1.2/build<br><br />
Start 1: pddrive<br><br />
1/2 Test #1: pddrive .......................... Passed 79.70 sec<br><br />
Start 2: pddrive1<br><br />
2/2 Test #2: pddrive1 ......................... Passed 78.40 sec<br><br />
<br><br />
100% tests passed, 0 tests failed out of 2<br><br />
<br><br />
Total Test time (real) = 158.10 sec<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsuperlu_dist.a<br />
</blockquote><br />
<br />
<br />
==== Elpa ====<br />
ELPA replaces the ScaLapack SYEVD to improve the performance of Eigen-vector/value problems.<br />
wget http://elpa.mpcdf.mpg.de/html/Releases/2019.11.001/elpa-2019.11.001.tar.gz<br />
tar -zxvf elpa-2019.11.001.tar.gz<br />
cd elpa-2019.11.001<br />
./configure FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes --enable-openmp=no --disable-avx512<br />
''hack'': change ''LIBS'' in Makefile: ''LIBS = /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a''<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
some skipped, all others passed<br />
</blockquote> <br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/include/elpa-2019.11.001/modules/elpa_constants.mod<br><br />
/usr/local/include/elpa-2019.11.001/modules/elpa_api.mod<br><br />
/usr/local/include/elpa-2019.11.001/modules/elpa.mod<br><br />
/usr/local/lib/libelpa.a<br />
</blockquote><br />
<br />
==== Pexsi 1.2 ====<br />
The source code must be edited for use with openmpi-4.<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
MPI_Address &#8594; MPI_Get_address<br><br />
MPI_Type_hindexed &#8594; MPI_Type_create_hindexed<br><br />
MPI_Type_struct &#8594; MPI_Type_create_struct<br><br />
MPI_Errhandler_set&#8594; remove lines<br />
</blockquote><br />
The Pole EXpansion and Selected Inversion (PEXSI) method requires the PEXSI library and two dependencies (ParMETIS and SuperLU_DIST).<br />
wget https://www.cp2k.org/static/downloads/pexsi_v1.2.0.tar.gz<br />
tar -zxvf pexsi_v1.2.0.tar.gz<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DMETIS_LIBRARIES=/share/apps/METIS/lib/libmetis.a -DPARMETIS_LIBRARIES=/share/apps/ParMETIS/lib/libparmetis.a -Dlinalg_BLAS_LIBRARIES=/usr/local/lib/libopenblas.a -Dlinalg_LAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DCMAKE_CXX_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_C_FLAGS="-std=c99 -O2 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
<br />
edit ''cmake/modules/FindLinAlg.cmake'' uncomment line 373 and 375.<br />
<br />
make -j 24<br />
sudo make install<br />
sudo make finstall<br />
<br />
==== Pexsi 0.10.2 ====<br />
cp config/make.inc.linux.gnu ./make.inc<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PAR_ND_LIBRARY = parmetis<br><br />
SEQ_ND_LIBRARY = metis<br><br />
<br><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
CXX = /usr/lib64/openmpi4-gcc8/bin/mpicxx<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LOADER = /usr/lib64/openmpi4-gcc8/bin/mpicxx<br><br />
<br><br />
DSUPERLU_DIR = /usr/local<br><br />
METIS_DIR = /share/apps/METIS<br><br />
PARMETIS_DIR = /share/apps/ParMETIS<br><br />
<br><br />
DSUPERLU_INCLUDE = -I/usr/local/include<br><br />
<br><br />
GFORTRAN_LIB = /opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a<br><br />
LAPACK_LIB = /usr/local/lib/libscalapack.a<br><br />
BLAS_LIB = /usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
The source code must be edited for use with openmpi-4.<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
MPI_Address &#8594; MPI_Get_address<br><br />
MPI_Type_hindexed &#8594; MPI_Type_create_hindexed<br><br />
MPI_Type_struct &#8594; MPI_Type_create_struct<br><br />
</blockquote><br />
<br />
make<br />
make install<br />
sudo cp /usr/local/src/pexsi_v0.10.2/build/lib/libpexsi_linux_v0.10.2.a /usr/local/lib<br />
sudo cp /usr/local/src/pexsi_v0.10.2/build/include/* /usr/local/include/<br />
<br />
==== SpFFT ====<br />
Needed in SIRIUS.<br />
wget https://github.com/eth-cscs/SpFFT/archive/v0.9.9.tar.gz<br />
mv v0.9.9.tar.gz SpFFT-0.9.9.tar.gz<br />
tar -zxvf SpFFT-0.9.9.tar.gz<br />
cd SpFFT-0.9.9<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE -DSPFFT_OMP=ON -DSPFFT_MPI=ON -DSPFFT_INSTALL=ON -DSPFFT_STATIC=ON<br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libspfft.a<br />
</blockquote><br />
<br />
==== SIRIUS 6.5.3 ====<br />
SIRIUS is a domain specific library for electronic structure calculations.<br />
wget https://github.com/electronic-structure/SIRIUS/archive/v6.5.3.tar.gz<br />
mv v6.5.3.tar.gz SIRIUS-v6.5.3.tar.gz<br />
tar -zxvf SIRIUS-v6.5.3.tar.gz<br />
cd SIRIUS-6.5.3<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/share/apps/SIRIUS -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DGSL_CBLAS_LIBRARY=/usr/local/lib/libgsl.a -DGSL_CBLAS_LIBRARY_DEBUG=/usr/local/lib/libgslcblas.a -DGSL_LIBRARY=/usr/local/lib/libgsl.a -DGSL_LIBRARY_DEBUG=/usr/local/lib/libgsl.a -DUSE_ELPA=ON -DELPA_INCLUDE_DIR=/usr/local/include/elpa-2019.11.001/elpa -DELPA_LIBRARIES="/usr/local/lib/libelpa.a;/usr/local/lib/libscalapack.a;/usr/local/lib/libopenblas.a" -DUSE_VDWXC=ON -DLIBVDWXC_LIBRARIES="/usr/local/lib/libvdwxc.a;/usr/local/lib/libfftw3.a"<br />
make -j 24<br />
make install<br />
<br />
==== SIRIUS 6.3.2 ====<br />
wget https://www.cp2k.org/static/downloads/SIRIUS-6.3.2.tar.gz<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/share/apps/SIRIUS -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DUSE_SCALAPACK=ON -DSCALAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DBLAS_openblas_LIBRARY=/usr/local/lib/libopenblas.a -DLAPACK_openblas_LIBRARY=/usr/local/lib/libopenblas.a -DGSL_CBLAS_LIBRARY=/usr/local/lib/libgsl.a -DGSL_CBLAS_LIBRARY_DEBUG=/usr/local/lib/libgslcblas.a -DGSL_LIBRARY=/usr/local/lib/libgsl.a -DGSL_LIBRARY_DEBUG=/usr/local/lib/libgsl.a<br />
make -j 24<br />
make install -j 24<br />
cp src/mod_files/sirius.mod /share/apps/SIRIUS/include/<br />
<br />
==== Plumed ====<br />
Library that enables various enhanced sampling methods.<br />
tar -zxvf plumed-2.6.0.tgz<br />
./configure --prefix=/share/apps/plumed/plumed-2.6.0 --enable-shared=no<br />
<br />
change in Makefile.conf<br />
DYNAMIC_LIBS= -lstdc++ -lfftw3 -lgsl -lgslcblas -lz -ldl -llapack -lblas -fopenmp<br />
to<br />
DYNAMIC_LIBS= -lstdc++ /usr/local/lib/libfftw3.a /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a -lz -ldl /usr/local/lib/libopenblas_omp.a -fopenmp -lgfortran<br />
<br />
make -j 24<br />
make install<br />
<br />
==== QUIP ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Do not build using parallel-make<br />
</blockquote><br />
QUantum mechanics and Interatomic Potentials allows for a wider range of interaction potentials.<br />
<br />
wget https://www.cp2k.org/static/downloads/QUIP-cc83ceea5776c40fcb5ab224a25ab04d62175449.zip<br />
export QUIP_ARCH=linux_x86_64_gfortran_openmpi<br />
<br />
make config<br />
<br />
Please enter the linking options for LAPACK and BLAS libraries:<br />
fill in /usr/local/lib/libopenblas.a<br />
Do you want to compile with CP2K support? y<br><br />
Do you want to compile with VASP support? y<br><br />
Do you want to compile with Tight Binding (TB) support? y<br><br />
Please enter directories where METIS libraries are kept:<br />
fill in /share/apps/METIS/lib/<br />
<br />
make libquip<br />
mkdir -p /share/apps/QUIP/QUIP-2015<br />
make PREFIX=/share/apps/QUIP/QUIP-2015 QUIP_INSTALLDIR=/share/apps/QUIP/QUIP-2015 install<br />
mkdir /share/apps/QUIP/QUIP-2015/include/<br />
cp build/linux_x86_64_gfortran_openmpi/quip_unified_wrapper_module.mod /share/apps/QUIP/QUIP-2015/include/<br />
mkdir /share/apps/QUIP/QUIP-2015/lib/<br />
cp build/linux_x86_64_gfortran_openmpi/*.a /share/apps/QUIP/QUIP-2015/lib<br />
cp src/FoX-4.0.3/objs.linux_x86_64_gfortran_openmpi/lib/libFoX_*.a /share/apps/QUIP/QUIP-2015/lib<br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O2 -g -mtune=native -mno-avx512f -I/usr/local/include/ -L/usr/local/include/<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include -I/share/apps/QUIP/QUIP-2015/include/ -I/share/apps/METIS/include/ -I/share/apps/ParMETIS/include -I/share/apps/plumed/plumed-2.6.0/include/ -I/share/apps/SIRIUS/include/<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++ -lgomp -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightgreen; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3261<br><br />
Number of NEW tests 8<br><br />
Total number of tests 3269<br><br />
GREPME 0 0 3261 8 3269 X<br><br />
<br><br />
Summary: correct: 3261 / 3269; new: 8; 38min<br><br />
Status: OK<br />
</blockquote><br />
<br />
<br />
To solve SIRIUS warnings in the top of the output, use the latest version of SIRIUS and modify the following cp2k source files:<br />
cd cp2k-7.1<br />
cd src<br />
wget https://raw.githubusercontent.com/cp2k/cp2k/b1fc8cddc7ca9b30bf6de29e87ac9e3f14c60136/src/sirius_interface.F<br />
wget https://raw.githubusercontent.com/cp2k/cp2k/b1fc8cddc7ca9b30bf6de29e87ac9e3f14c60136/src/input_cp2k_pwdft.F<br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
# Tested with: GFortran 8.3.1, OPENMPICH 4.0.3, OpenBLAS 0.3.0, ScaLAPACK 2.1.0, FFTW 3.3.8, Libint 2.6.0, Libxc 4.3.4, libxsmm 1.15,<br><br />
# ELPA 2019.11.001, PLUMED 2.6.0, SPGLIB 1.12.2, QUIP-2015, ParMETIS-4.0.3, Pexsi-1.2.0, SIRIUS 6.5.3, SpFFT 0.9.9, libvdw 0.4.0<br><br />
# Author: David Dubbeldam (d.dubbeldam@uva.nl, University of Amsterdam, May 2020)<br><br />
<br><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O3 -g -mtune=native -mno-avx512f -I/usr/local/include/ -L/usr/local/include/<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
DFLAGS += -D__SIRIUS -D__PLUMED2 -D__QUIP -D__LIBPEXSI -D__ELPA<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include -I/share/apps/QUIP/QUIP-2015/include/ -I/share/apps/METIS/include/ -I/share/apps/ParMETIS/include<br><br />
FCFLAGS += -I/share/apps/plumed/plumed-2.6.0/include/ -I/share/apps/SIRIUS/include/sirius<br><br />
FCFLAGS += -I/usr/local/include/elpa-2019.11.001/elpa -I/usr/local/include/elpa-2019.11.001/modules<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = $(PLUMED_DEPENDENCIES) /share/apps/plumed/plumed-2.6.0/lib/libplumed.a<br><br />
LIBS += /usr/local/lib/libelpa.a<br><br />
LIBS += /usr/local/lib64/libpexsi.a<br><br />
LIBS += /share/apps/SIRIUS/lib64/libsirius.a<br><br />
LIBS += /usr/local/lib/libspfft.a<br><br />
LIBS += /usr/local/lib/libvdwxc.a<br><br />
LIBS += /usr/local/lib64/libsuperlu_dist.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libquip_core.a /share/apps/QUIP/QUIP-2015/lib/libatoms.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_sax.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_common.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_utils.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_fsys.a<br><br />
LIBS += /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a<br><br />
LIBS += /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a<br><br />
LIBS += -lnetcdf -lhdf5_hl -lhdf5 -lz -lsymspg -ldl -lpthread -lstdc++ -lgomp -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
All tests are fine, but the regression-test hangs on one job, after killing it the test results are<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Number of FAILED tests 1<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3285<br><br />
Number of NEW tests 0<br><br />
Total number of tests 3286<br><br />
GREPME 1 0 3285 0 3286 X<br><br />
<br><br />
Summary: correct: 3285 / 3286; failed: 1; 95min<br><br />
Status: FAILED<br />
</blockquote></div>
David Dubbeldam
https://wiki.iraspa.org/index.php?title=CP2K_compiling_with_GFortran&diff=1231
CP2K compiling with GFortran
2020-05-24T19:04:11Z
<p>David Dubbeldam: /* CP2K */</p>
<hr />
<div>Compiling <br />
<br />
== Caveats ==<br />
<br />
# the gcc version 4.8.5 mostly works, but fails for the plumed-part in CP2K (plumed itself compiles fine)<br />
# gcc version 9.1.1 fails (compiles but lots of CP2K unit tests fail, even with ''-O2 -g -mtune=generic'')<br />
# gcc version 8.3.1 works, but sometimes optimization needs to be reduced (e.g. gsl).<br />
<br />
== Compiling subpackages ==<br />
<br />
The following assumes that CP2K will be build from static libraries installed in /usr/local using the ''devtoolset-8'' on ''rocks'' (centos 7.4).<br />
<br />
=== Serial ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
export CC=/opt/rh/devtoolset-8/root/usr/bin/gcc<br />
export CXX=/opt/rh/devtoolset-8/root/usr/bin/g++<br />
export F77=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
export FC=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
<br />
==== Blas and Lapack ====<br />
wget https://github.com/Reference-LAPACK/lapack/archive/v3.9.0.tar.gz<br />
mv v3.9.0.tar.gz lapack-3.9.0.tar.gz<br />
tar -zxvf lapack-3.9.0.tar.gz<br />
cd lapack-3.9.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_COMPILER=gfortran -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Result: 100% tests passed, 0 tests failed out of 103<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib64/libblas.a<br><br />
/usr/local/lib64/liblapack.a<br><br />
/usr/local/lib64/libtmglib.a<br />
</blockquote><br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=0 USE_OPENMP=0 NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
./configure CC=gcc CXX=g++x F77=gfortran FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --disable-shared --enable-static<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br><br />
</blockquote><br />
sudo make install<br />
<br />
The serial version is created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3.a<br><br />
</blockquote><br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1"<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="'''-O1''' -march=native -mno-avx512f" CFLAGS="'''-O1''' -march=native -mno-avx512f" CXXFLAGS="'''-O1''' -march=native -mno-avx512f" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
============================================================================<br><br />
Testsuite summary for gsl 2.6<br><br />
============================================================================<br><br />
all checks passed<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libgslcblas.a<br><br />
/usr/local/lib/libgsl.a<br />
</blockquote><br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="'''-O2''' -march=native -mno-avx512f" CFLAGS="'''-O2''' -march=native -mno-avx512f" CXXFLAGS="'''-O2''' -march=native -mno-avx512f" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -march=native -mno-avx512f"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
make PREFIX=/usr/local FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== libvdwxc ====<br />
Libvdwxc is a general library for evaluating energy and potential for exchange-correlation (XC) functionals from the vdW-DF.<br />
wget https://www.cp2k.org/static/downloads/libvdwxc-0.4.0.tar.gz<br />
tar -zxvf libvdwxc-0.4.0.tar.gz<br />
./configure CC=gcc FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" FFTW3_INCLUDES="-I/usr/local/include/" FFTW3_LIBS="/usr/local/lib/libfftw3.a" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes<br />
make -j 24<br />
make check<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libvdwxcfort.a<br><br />
/usr/local/lib/libvdwxc.a<br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== Spglib ====<br />
A library for finding and handling crystal symmetries<br />
wget https://github.com/spglib/spglib/archive/v1.11.2.1.tar.gz<br />
mv v1.11.2.1.tar.gz spglib-v1.11.2.1.tar.gz<br />
tar -zxvf spglib-v1.11.2.1.tar.gz<br />
cd spglib-1.11.2.1<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsymspg.a<br />
</blockquote><br />
<br />
Rocks/Centos/RH 7 provides precompiled packages<br />
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/s/spglib-1.11.1-2.el7.x86_64.rpm<br />
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/s/spglib-devel-1.11.1-2.el7.x86_64.rpm<br />
sudo rpm -ivh spglib-1.11.1-2.el7.x86_64.rpm spglib-devel-1.11.1-2.el7.x86_64.rpm<br />
<br />
<br />
<br />
==== CP2K ====<br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
CC = gcc<br><br />
FC = gfortran<br><br />
LD = gfortran<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O3 -mtune=native -mno-avx512f -I/usr/local/include -L/usr/local/include<br><br />
<br><br />
DFLAGS = -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libopenblas.a<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
make ARCH=local VERSION=sopt test<br />
<blockquote style="background-color: lightgreen; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3201<br><br />
Number of NEW tests 3<br><br />
Total number of tests 3204<br><br />
GREPME 0 0 3201 3 3204 X<br><br />
<br><br />
Summary: correct: 3201 / 3204; new: 3; 27min<br><br />
Status: OK<br />
</blockquote><br />
<br />
<br />
=== OpenMP ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
export CC=/opt/rh/devtoolset-8/root/usr/bin/gcc<br />
export CXX=/opt/rh/devtoolset-8/root/usr/bin/g++<br />
export F77=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
export FC=/opt/rh/devtoolset-8/root/usr/bin/gfortran<br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=1 USE_OPENMP=1 NUM_THREADS=64 LIBNAMESUFFIX=omp NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local LIBNAMESUFFIX=omp NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas_omp.a<br />
</blockquote><br />
<br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
./configure CC=gcc CXX=g++x F77=gfortran FC=gfortran FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-openmp --disable-shared --enable-static --enable-threads<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br />
FFTW threaded transforms passed basic tests!<br />
</blockquote><br />
sudo make install<br />
<br />
The serial version is created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3_omp.a<br><br />
/usr/local/lib/libfftw3_threads.a<br />
</blockquote><br />
<br />
==== Elpa ====<br />
ELPA replaces the ScaLapack SYEVD to improve the performance of Eigen-vector/value problems.<br />
wget http://elpa.mpcdf.mpg.de/html/Releases/2019.11.001/elpa-2019.11.001.tar.gz<br />
tar -zxvf elpa-2019.11.001.tar.gz<br />
cd elpa-2019.11.001<br />
./configure FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes --enable-openmp=yes --disable-avx512<br />
''hack'': change ''LIBS'' in Makefile: ''LIBS = /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas_omp.a''<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
some skipped, all others passed<br />
</blockquote> <br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa_constants.mod<br><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa_api.mod<br><br />
/usr/local/include/elpa_openmp-2019.11.001/modules/elpa.mod<br><br />
/usr/local/lib/libelpa_openmp.a<br />
</blockquote><br />
<br />
<br />
=== MPI ===<br />
<br />
==== preparation ====<br />
<br />
scl enable devtoolset-8 bash<br />
module load mpi/openmpi4-x86_64-gcc8<br />
export CC=/usr/lib64/openmpi4-gcc8/bin/mpicc<br />
export CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx<br />
export F77=/usr/lib64/openmpi4-gcc8/bin/mpif77<br />
export FC=/usr/lib64/openmpi4-gcc8/bin/mpifort<br />
<br />
Allow ''infiniband'' and ''vader'' to run<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Note that the used MPI installation must match the used Fortran compiler. If not, then MPI needs to be recompiled using the same compiler.<br />
</blockquote><br />
<br />
<br />
==== Blas and Lapack ====<br />
Lapack is needed for SIRIUS<br />
wget https://github.com/Reference-LAPACK/lapack/archive/v3.9.0.tar.gz<br />
mv v3.9.0.tar.gz lapack-3.9.0.tar.gz<br />
tar -zxvf lapack-3.9.0.tar.gz<br />
cd lapack-3.9.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_COMPILER=gfortran -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Result: 100% tests passed, 0 tests failed out of 103<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib64/libblas.a<br><br />
/usr/local/lib64/liblapack.a<br><br />
/usr/local/lib64/libtmglib.a<br />
</blockquote><br />
<br />
<br />
==== OpenBLAS ====<br />
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.<br />
wget http://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz<br />
mv v0.3.9.tar.gz OpenBLAS-0.3.9.tar.gz<br />
tar -zxvf OpenBLAS-0.3.9.tar.gz<br />
cd OpenBLAS-0.3.9<br />
make CC=gcc FC=gfortran CXX=g++ FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" USE_THREAD=0 USE_OPENMP=0 NO_SHARED=1 PREFIX=/usr/local NO_AVX512=1<br />
make tests<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests passed<br />
</blockquote><br />
sudo make PREFIX=/usr/local NO_SHARED=1 install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
==== Scalapack ====<br />
wget https://www.cp2k.org/static/downloads/scalapack-2.1.0.tgz<br />
tar -zxvf scalapack-2.1.0.tgz<br />
scalapack-2.1.0<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_C_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_BUILD_TYPE=Release -DMPI_BASE_DIR=/usr/lib64/openmpi4-gcc9/lib -DMPI_INCLUDE_PATH=/usr/include/openmpi4-x86_64-gcc8 -DMPIEXEC=/usr/lib64/openmpi4-gcc8/bin/mpiexec -DBLAS_LIBRARIES=/usr/local/lib/libopenblas.a -DLAPACK_LIBRARIES=/usr/local/lib/libopenblas.a -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON<br />
make -j 16<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
100% tests passed, 0 tests failed out of 96<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/linscalapack.a<br />
</blockquote><br />
<br />
==== COSMA ====<br />
Distributed Communication-Optimal Matrix-Matrix Multiplication Algorithm. COSMA is a replacement of the ''pdgemm'' routine included in scalapack.<br />
git clone --recursive https://github.com/eth-cscs/COSMA cosma <br />
cd cosma<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_INCLUDEDIR=/usr/local/include -DCMAKE_BUILD_TYPE=Release -DCOSMA_BLAS=OPENBLAS -DCOSMA_SCALAPACK=CUSTOM -DBUILD_SHARED_LIBS=OFF -DSCALAPACK_LIBRARIES="/usr/local/lib/libscalapack.a;/usr/local/lib/libopenblas.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libquadmath.a" -DOPENBLAS_LIBRARIES="/usr/local/lib/libopenblas.a;/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a"<br />
make test<br />
<br />
<blockquote style="background-color: red; border: solid thin grey;"><br />
20% tests passed, 4 tests failed out of 5<br><br />
<br><br />
Total Test time (real) = 7.99 sec<br><br />
<br><br />
The following tests FAILED:<br><br />
2 - test.multiply_using_layout (Failed)<br><br />
3 - test.multiply (Failed)<br><br />
4 - test.scalar_matmul (Failed)<br><br />
5 - test.pdgemm (Failed)<br><br />
Errors while running CTest<br><br />
</blockquote><br />
<br />
Place the library in front of the scalapack library during linking time.<br />
<br />
==== fftw ====<br />
<br />
tar -zxvf fftw-3.3.8.tar.gz<br />
cd fftw-3.3.8<br />
module load mpi/openmpi4-x86_64-gcc8<br />
export OMPI_MCA_btl_openib_allow_ib=1<br />
export OMPI_MCA_btl_vader_single_copy_mechanism=none<br />
./configure CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx F77=/usr/lib64/openmpi4-gcc8/bin/mpifort FC=/usr/lib64/openmpi4-gcc8/bin/mpifort FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-openmp --enable-mpi --disable-shared --enable-static --enable-threads<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
FFTW transforms passed basic tests!<br><br />
FFTW threaded transforms passed basic tests!<br><br />
MPI FFTW transforms passed 10 tests, 1 CPU<br><br />
MPI FFTW transforms passed 10 tests, 2 CPUs<br><br />
MPI FFTW transforms passed 10 tests, 3 CPUs<br><br />
MPI FFTW transforms passed 10 tests, 4 CPUs<br><br />
MPI FFTW threaded transforms passed 10 tests!<br />
</blockquote><br />
sudo make install<br />
<br />
The serial, mpi, threaded, and openmp versions are created<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libfftw3.a<br><br />
/usr/local/lib/libftw3_mpi.a<br> <br />
/usr/local/lib/libfftw3_omp.a<br><br />
/usr/local/lib/libfftw3_threads.a <br />
</blockquote><br />
<br />
==== Gsl ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O1"<br />
</blockquote><br />
wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz<br />
tar -zxvf gsl-2.6.tar.gz<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="'''-O1''' -march=native -mno-avx512f" CFLAGS="'''-O1''' -march=native -mno-avx512f" CXXFLAGS="'''-O1''' -march=native -mno-avx512f" --enable-shared=no<br />
make -j 16<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
============================================================================<br><br />
Testsuite summary for gsl 2.6<br><br />
============================================================================<br><br />
all checks passed<br />
</blockquote><br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libgslcblas.a<br><br />
/usr/local/lib/libgsl.a<br />
</blockquote><br />
<br />
==== Libint2 ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Reduced optimization to "-O2"<br />
</blockquote><br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz<br />
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz<br />
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz<br />
cd libint-v2.6.0-cp2k-lmax-5<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="'''-O2''' -march=native -mno-avx512f" CFLAGS="'''-O2''' -march=native -mno-avx512f" CXXFLAGS="'''-O2''' -march=native -mno-avx512f" --enable-shared=no --enable-fortran --with-cxx-optflags="'''-O2''' -march=native -mno-avx512f"<br />
make -j 24<br />
make -j 24 check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all tests ok<br />
</blockquote><br />
sudo make install<br />
sudo make install_fortran<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libint2<br />
</blockquote><br />
<br />
==== Libxsmm ====<br />
A library for improved performance for matrix multiplication and deep learning primitives<br />
wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz<br />
tar -zxvf libxsmm-1.15.tar.gz<br />
make PREFIX=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" STATIC=1 NO_SHARED=1 MALLOC=0 -j 24<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 16 test okay<br />
</blockquote><br />
make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxsmm.a<br><br />
/usr/local/lib/libxsmmext.a<br><br />
/usr/local/lib/libxsmmf.a<br><br />
/usr/local/lib/libxsmmgen.a<br><br />
/usr/local/lib/libxsmmnoblas.a <br />
</blockquote><br />
<br />
==== Libxc ====<br />
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz<br />
tar -zxvf libxc-4.3.4.tar.gz<br />
cd libxc-4.3.4<br />
./configure --prefix=/usr/local CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f" --enable-shared=no --enable-static=yes --enable-fortran<br />
make -j 24<br />
make check<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PASS: xc-run_testsuite<br><br />
============================================================================<br><br />
Testsuite summary for libxc 4.3.4<br><br />
============================================================================<br><br />
# TOTAL: 1<br><br />
# PASS: 1<br><br />
</blockquote><br />
sudo make install<br />
sudo cp src/*.mod /usr/local/include/<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libxc.a <br><br />
/usr/local/lib/libxcf03.a<br><br />
/usr/local/lib/libxcf90.a<br />
</blockquote><br />
<br />
==== libvdwxc ====<br />
Libvdwxc is a general library for evaluating energy and potential for exchange-correlation (XC) functionals from the vdW-DF.<br />
wget https://www.cp2k.org/static/downloads/libvdwxc-0.4.0.tar.gz<br />
tar -zxvf libvdwxc-0.4.0.tar.gz<br />
./configure CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort FCFLAGS="-O3 -march=native -mno-avx512f" FFTW3_INCLUDES="-I/usr/local/include/" FFTW3_LIBS="/usr/local/lib/libfftw3_mpi.a /usr/local/lib/libfftw3.a" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes<br />
make -j 24<br />
make check<br />
sudo make install<br />
<br />
<br />
==== METIS ====<br />
tar -zxvf parmetis-4.0.3.tar.gz<br />
cd parmetis-4.0.3<br />
cd metis<br />
make config prefix=/share/apps/METIS CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 24<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/share/apps/METIS/lib/libmetis.a<br />
</blockquote><br />
<br />
==== ParMETIS ====<br />
tar -zxvf parmetis-4.0.3.tar.gz<br />
cd parmetis-4.0.3<br />
make config prefix=/share/apps/ParMETIS CC=/usr/lib64/openmpi4-gcc8/bin/mpicc FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" CXXFLAGS="-O3 -march=native -mno-avx512f"<br />
make -j 24<br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/share/apps/ParMETIS/lib/libparmetis.a<br />
</blockquote><br />
<br />
==== Superlu-6.1.1 ====<br />
wget https://github.com/xiaoyeli/superlu_dist/archive/v6.1.1.tar.gz<br />
mv v6.1.1.tar.gz superlu_dist_6.1.1.tar.gz<br />
tar -zxvf superlu_dist_6.1.1.tar.gz<br />
mkdir build1<br />
cd build1<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DTPL_PARMETIS_LIBRARIES="-L/share/apps/METIS/lib -L/share/apps/ParMETIS/lib /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a -pthread -Wl,-rpath -Wl,/usr/lib64/openmpi4-gcc8/lib -Wl,--enable-new-dtags -L/usr/lib64/openmpi4-gcc8/lib -lmpi_mpifh -lmpi_cxx -lmpi" -DTPL_PARMETIS_INCLUDE_DIRS=/share/apps/ParMETIS/include -DBUILD_STATIC_LIBS=OFF -DCMAKE_C_FLAGS="-std=c99 -O3 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DTPL_LAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DTPL_BLAS_LIBRARIES=/usr/local/lib/libopenblas.a<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
all 24 tests passed<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsuperlu_dist.a<br />
</blockquote><br />
<br />
==== Superlu-5.1.2 ====<br />
wget http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_dist_5.1.2.tar.gz<br />
tar -zxvf superlu_dist_5.1.2.tar.gz<br />
mkdir build<br />
cd build<br />
cmake .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DTPL_PARMETIS_LIBRARIES="-L/share/apps/METIS/lib -L/share/apps/ParMETIS/lib /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a -pthread -Wl,-rpath -Wl,/usr/lib64/openmpi4-gcc8/lib -Wl,--enable-new-dtags -L/usr/lib64/openmpi4-gcc8/lib -lmpi_mpifh -lmpi_cxx -lmpi" -DTPL_PARMETIS_INCLUDE_DIRS=/share/apps/ParMETIS/include -DCMAKE_C_FLAGS="-std=c99 -O3 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f" -DTPL_BLAS_LIBRARIES=/usr/local/lib/libopenblas_omp.a<br />
make test<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
Running tests...<br><br />
Test project /usr/local/src/SuperLU_DIST_5.1.2/build<br><br />
Start 1: pddrive<br><br />
1/2 Test #1: pddrive .......................... Passed 79.70 sec<br><br />
Start 2: pddrive1<br><br />
2/2 Test #2: pddrive1 ......................... Passed 78.40 sec<br><br />
<br><br />
100% tests passed, 0 tests failed out of 2<br><br />
<br><br />
Total Test time (real) = 158.10 sec<br />
</blockquote><br />
sudo make install<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libsuperlu_dist.a<br />
</blockquote><br />
<br />
<br />
==== Elpa ====<br />
ELPA replaces the ScaLapack SYEVD to improve the performance of Eigen-vector/value problems.<br />
wget http://elpa.mpcdf.mpg.de/html/Releases/2019.11.001/elpa-2019.11.001.tar.gz<br />
tar -zxvf elpa-2019.11.001.tar.gz<br />
cd elpa-2019.11.001<br />
./configure FC=/usr/lib64/openmpi4-gcc8/bin/mpifort CC=/usr/lib64/openmpi4-gcc8/bin/mpicc CXX=/usr/lib64/openmpi4-gcc8/bin/mpicxx FCFLAGS="-O3 -march=native -mno-avx512f" CFLAGS="-O3 -march=native -mno-avx512f" --prefix=/usr/local --enable-shared=no --enable-static=yes --enable-openmp=no --disable-avx512<br />
''hack'': change ''LIBS'' in Makefile: ''LIBS = /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a''<br />
make check<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
some skipped, all others passed<br />
</blockquote> <br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/include/elpa-2019.11.001/modules/elpa_constants.mod<br><br />
/usr/local/include/elpa-2019.11.001/modules/elpa_api.mod<br><br />
/usr/local/include/elpa-2019.11.001/modules/elpa.mod<br><br />
/usr/local/lib/libelpa.a<br />
</blockquote><br />
<br />
==== Pexsi 1.2 ====<br />
The source code must be edited for use with openmpi-4.<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
MPI_Address &#8594; MPI_Get_address<br><br />
MPI_Type_hindexed &#8594; MPI_Type_create_hindexed<br><br />
MPI_Type_struct &#8594; MPI_Type_create_struct<br><br />
MPI_Errhandler_set&#8594; remove lines<br />
</blockquote><br />
The Pole EXpansion and Selected Inversion (PEXSI) method requires the PEXSI library and two dependencies (ParMETIS and SuperLU_DIST).<br />
wget https://www.cp2k.org/static/downloads/pexsi_v1.2.0.tar.gz<br />
tar -zxvf pexsi_v1.2.0.tar.gz<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_FIND_ROOT_PATH="$ROOTDIR" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DMETIS_LIBRARIES=/share/apps/METIS/lib/libmetis.a -DPARMETIS_LIBRARIES=/share/apps/ParMETIS/lib/libparmetis.a -Dlinalg_BLAS_LIBRARIES=/usr/local/lib/libopenblas.a -Dlinalg_LAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DCMAKE_CXX_FLAGS="-O3 -march=native -mno-avx512f" -DCMAKE_C_FLAGS="-std=c99 -O2 -march=native -mno-avx512f" -DCMAKE_Fortran_FLAGS="-O3 -march=native -mno-avx512f"<br />
<br />
edit ''cmake/modules/FindLinAlg.cmake'' uncomment line 373 and 375.<br />
<br />
make -j 24<br />
sudo make install<br />
sudo make finstall<br />
<br />
==== Pexsi 0.10.2 ====<br />
cp config/make.inc.linux.gnu ./make.inc<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
PAR_ND_LIBRARY = parmetis<br><br />
SEQ_ND_LIBRARY = metis<br><br />
<br><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
CXX = /usr/lib64/openmpi4-gcc8/bin/mpicxx<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LOADER = /usr/lib64/openmpi4-gcc8/bin/mpicxx<br><br />
<br><br />
DSUPERLU_DIR = /usr/local<br><br />
METIS_DIR = /share/apps/METIS<br><br />
PARMETIS_DIR = /share/apps/ParMETIS<br><br />
<br><br />
DSUPERLU_INCLUDE = -I/usr/local/include<br><br />
<br><br />
GFORTRAN_LIB = /opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libgfortran.a<br><br />
LAPACK_LIB = /usr/local/lib/libscalapack.a<br><br />
BLAS_LIB = /usr/local/lib/libopenblas.a<br />
</blockquote><br />
<br />
The source code must be edited for use with openmpi-4.<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
MPI_Address &#8594; MPI_Get_address<br><br />
MPI_Type_hindexed &#8594; MPI_Type_create_hindexed<br><br />
MPI_Type_struct &#8594; MPI_Type_create_struct<br><br />
</blockquote><br />
<br />
make<br />
make install<br />
sudo cp /usr/local/src/pexsi_v0.10.2/build/lib/libpexsi_linux_v0.10.2.a /usr/local/lib<br />
sudo cp /usr/local/src/pexsi_v0.10.2/build/include/* /usr/local/include/<br />
<br />
==== SpFFT ====<br />
Needed in SIRIUS.<br />
wget https://github.com/eth-cscs/SpFFT/archive/v0.9.9.tar.gz<br />
mv v0.9.9.tar.gz SpFFT-0.9.9.tar.gz<br />
tar -zxvf SpFFT-0.9.9.tar.gz<br />
cd SpFFT-0.9.9<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE -DSPFFT_OMP=ON -DSPFFT_MPI=ON -DSPFFT_INSTALL=ON -DSPFFT_STATIC=ON<br />
sudo make install<br />
<br />
<blockquote style="background-color: lightgrey; border: solid thin grey;"><br />
/usr/local/lib/libspfft.a<br />
</blockquote><br />
<br />
==== SIRIUS 6.5.3 ====<br />
SIRIUS is a domain specific library for electronic structure calculations.<br />
wget https://github.com/electronic-structure/SIRIUS/archive/v6.5.3.tar.gz<br />
mv v6.5.3.tar.gz SIRIUS-v6.5.3.tar.gz<br />
tar -zxvf SIRIUS-v6.5.3.tar.gz<br />
cd SIRIUS-6.5.3<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/share/apps/SIRIUS -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DGSL_CBLAS_LIBRARY=/usr/local/lib/libgsl.a -DGSL_CBLAS_LIBRARY_DEBUG=/usr/local/lib/libgslcblas.a -DGSL_LIBRARY=/usr/local/lib/libgsl.a -DGSL_LIBRARY_DEBUG=/usr/local/lib/libgsl.a -DUSE_ELPA=ON -DELPA_INCLUDE_DIR=/usr/local/include/elpa-2019.11.001/elpa -DELPA_LIBRARIES="/usr/local/lib/libelpa.a;/usr/local/lib/libscalapack.a;/usr/local/lib/libopenblas.a" -DUSE_VDWXC=ON -DLIBVDWXC_LIBRARIES="/usr/local/lib/libvdwxc.a;/usr/local/lib/libfftw3.a"<br />
make -j 24<br />
make install<br />
<br />
==== SIRIUS 6.3.2 ====<br />
wget https://www.cp2k.org/static/downloads/SIRIUS-6.3.2.tar.gz<br />
mkdir build<br />
cd build<br />
cmake3 .. -DCMAKE_INSTALL_PREFIX=/share/apps/SIRIUS -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DMPI_C_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicc -DMPI_CXX_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpicxx -DMPI_Fortran_COMPILER=/usr/lib64/openmpi4-gcc8/bin/mpifort -DUSE_SCALAPACK=ON -DSCALAPACK_LIBRARIES=/usr/local/lib/libscalapack.a -DBLAS_openblas_LIBRARY=/usr/local/lib/libopenblas.a -DLAPACK_openblas_LIBRARY=/usr/local/lib/libopenblas.a -DGSL_CBLAS_LIBRARY=/usr/local/lib/libgsl.a -DGSL_CBLAS_LIBRARY_DEBUG=/usr/local/lib/libgslcblas.a -DGSL_LIBRARY=/usr/local/lib/libgsl.a -DGSL_LIBRARY_DEBUG=/usr/local/lib/libgsl.a<br />
make -j 24<br />
make install -j 24<br />
cp src/mod_files/sirius.mod /share/apps/SIRIUS/include/<br />
<br />
==== Plumed ====<br />
Library that enables various enhanced sampling methods.<br />
tar -zxvf plumed-2.6.0.tgz<br />
./configure --prefix=/share/apps/plumed/plumed-2.6.0 --enable-shared=no<br />
<br />
change in Makefile.conf<br />
DYNAMIC_LIBS= -lstdc++ -lfftw3 -lgsl -lgslcblas -lz -ldl -llapack -lblas -fopenmp<br />
to<br />
DYNAMIC_LIBS= -lstdc++ /usr/local/lib/libfftw3.a /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a -lz -ldl /usr/local/lib/libopenblas_omp.a -fopenmp -lgfortran<br />
<br />
make -j 24<br />
make install<br />
<br />
==== QUIP ====<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Do not build using parallel-make<br />
</blockquote><br />
QUantum mechanics and Interatomic Potentials allows for a wider range of interaction potentials.<br />
<br />
wget https://www.cp2k.org/static/downloads/QUIP-cc83ceea5776c40fcb5ab224a25ab04d62175449.zip<br />
export QUIP_ARCH=linux_x86_64_gfortran_openmpi<br />
<br />
make config<br />
<br />
Please enter the linking options for LAPACK and BLAS libraries:<br />
fill in /usr/local/lib/libopenblas.a<br />
Do you want to compile with CP2K support? y<br><br />
Do you want to compile with VASP support? y<br><br />
Do you want to compile with Tight Binding (TB) support? y<br><br />
Please enter directories where METIS libraries are kept:<br />
fill in /share/apps/METIS/lib/<br />
<br />
make libquip<br />
mkdir -p /share/apps/QUIP/QUIP-2015<br />
make PREFIX=/share/apps/QUIP/QUIP-2015 QUIP_INSTALLDIR=/share/apps/QUIP/QUIP-2015 install<br />
mkdir /share/apps/QUIP/QUIP-2015/include/<br />
cp build/linux_x86_64_gfortran_openmpi/quip_unified_wrapper_module.mod /share/apps/QUIP/QUIP-2015/include/<br />
mkdir /share/apps/QUIP/QUIP-2015/lib/<br />
cp build/linux_x86_64_gfortran_openmpi/*.a /share/apps/QUIP/QUIP-2015/lib<br />
cp src/FoX-4.0.3/objs.linux_x86_64_gfortran_openmpi/lib/libFoX_*.a /share/apps/QUIP/QUIP-2015/lib<br />
<br />
==== CP2K ====<br />
<br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O2 -g -mtune=native -mno-avx512f -I/usr/local/include/ -L/usr/local/include/<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include -I/share/apps/QUIP/QUIP-2015/include/ -I/share/apps/METIS/include/ -I/share/apps/ParMETIS/include -I/share/apps/plumed/plumed-2.6.0/include/ -I/share/apps/SIRIUS/include/<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a<br><br />
LIBS += -lz -lsymspg -ldl -lpthread -lstdc++ -lgomp -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
<blockquote style="background-color: lightgreen; border: solid thin grey;"><br />
--------------------------------- Summary --------------------------------<br><br />
Number of FAILED tests 0<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3261<br><br />
Number of NEW tests 8<br><br />
Total number of tests 3269<br><br />
GREPME 0 0 3261 8 3269 X<br><br />
<br><br />
Summary: correct: 3261 / 3269; new: 8; 38min<br><br />
Status: OK<br />
</blockquote><br />
<br />
<br />
To solve SIRIUS warnings in the top of the output, use the latest version of SIRIUS and modify the following cp2k source files:<br />
cd cp2k-7.1<br />
cd src<br />
wget https://raw.githubusercontent.com/cp2k/cp2k/b1fc8cddc7ca9b30bf6de29e87ac9e3f14c60136/src/sirius_interface.F<br />
wget https://raw.githubusercontent.com/cp2k/cp2k/b1fc8cddc7ca9b30bf6de29e87ac9e3f14c60136/src/input_cp2k_pwdft.F<br />
<br />
<blockquote style="background-color: lightblue; border: solid thin grey;"><br />
# Tested with: GFortran 8.3.1, OPENMPICH 4.0.3, OpenBLAS 0.3.0, ScaLAPACK 2.1.0, FFTW 3.3.8, Libint 2.6.0, Libxc 4.3.4, libxsmm 1.15,<br><br />
# ELPA 2019.11.001, PLUMED 2.6.0, SPGLIB 1.12.2, QUIP-2015, ParMETIS-4.0.3, Pexsi-1.2.0, SIRIUS 6.5.3, SpFFT 0.9.9, libvdw 0.4.0<br><br />
# Author: David Dubbeldam (d.dubbeldam@uva.nl, University of Amsterdam, May 2020)<br><br />
<br><br />
CC = /usr/lib64/openmpi4-gcc8/bin/mpicc<br><br />
FC = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
LD = /usr/lib64/openmpi4-gcc8/bin/mpifort<br><br />
AR = ar -r<br><br />
<br><br />
CFLAGS = -O3 -g -mtune=native -mno-avx512f -I/usr/local/include/ -L/usr/local/include/<br><br />
<br><br />
DFLAGS = -D__MPI_VERSION=4 -D__parallel -D__SCALAPACK<br><br />
DFLAGS += -D__FFTW3 -D__LIBXC -D__LIBINT -D__LIBXSMM -D__SPGLIB<br><br />
DFLAGS += -D__SIRIUS -D__PLUMED2 -D__QUIP -D__LIBPEXSI -D__ELPA<br><br />
<br><br />
FCFLAGS = $(CFLAGS) $(DFLAGS)<br><br />
FCFLAGS += -ffree-form -ffree-line-length-none<br><br />
FCFLAGS += -ftree-vectorize -funroll-loops -std=f2008<br><br />
FCFLAGS += -I/usr/local/include -I/share/apps/QUIP/QUIP-2015/include/ -I/share/apps/METIS/include/ -I/share/apps/ParMETIS/include<br><br />
FCFLAGS += -I/share/apps/plumed/plumed-2.6.0/include/ -I/share/apps/SIRIUS/include/sirius<br><br />
FCFLAGS += -I/usr/local/include/elpa-2019.11.001/elpa -I/usr/local/include/elpa-2019.11.001/modules<br><br />
<br><br />
LDFLAGS = $(FCFLAGS)<br><br />
<br><br />
LIBS = $(PLUMED_DEPENDENCIES) /share/apps/plumed/plumed-2.6.0/lib/libplumed.a<br><br />
LIBS += /usr/local/lib/libelpa.a<br><br />
LIBS += /usr/local/lib64/libpexsi.a<br><br />
LIBS += /share/apps/SIRIUS/lib64/libsirius.a<br><br />
LIBS += /usr/local/lib/libspfft.a<br><br />
LIBS += /usr/local/lib/libvdwxc.a<br><br />
LIBS += /usr/local/lib64/libsuperlu_dist.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libquip_core.a /share/apps/QUIP/QUIP-2015/lib/libatoms.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_sax.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_common.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_utils.a<br><br />
LIBS += /share/apps/QUIP/QUIP-2015/lib/libFoX_fsys.a<br><br />
LIBS += /share/apps/ParMETIS/lib/libparmetis.a /share/apps/METIS/lib/libmetis.a<br><br />
LIBS += /usr/local/lib/libgsl.a /usr/local/lib/libgslcblas.a<br><br />
LIBS += /usr/local/lib/libxcf03.a /usr/local/lib/libxc.a<br><br />
LIBS += /usr/local/lib/libint2.a<br><br />
LIBS += /usr/local/lib/libfftw3.a<br><br />
LIBS += /usr/local/lib/libxsmmf.a /usr/local/lib/libxsmm.a<br><br />
LIBS += /usr/local/lib/libscalapack.a /usr/local/lib/libopenblas.a<br><br />
LIBS += -lnetcdf -lhdf5_hl -lhdf5 -lz -lsymspg -ldl -lpthread -lstdc++ -lgomp -lmpi_mpifh -lmpi_cxx -lmpi<br><br />
<br><br />
FYPPFLAGS = -n --line-marker-format=gfortran5<br />
</blockquote><br />
<br />
<blockquote style="background-color: orange; border: solid thin grey;"><br />
Number of FAILED tests 2<br><br />
Number of WRONG tests 0<br><br />
Number of CORRECT tests 3284<br><br />
Number of NEW tests 0<br><br />
Total number of tests 3286<br><br />
GREPME 2 0 3284 0 3286 X<br><br />
<br><br />
Summary: correct: 3284 / 3286; failed: 2; 66min<br><br />
Status: FAILED<br />
</blockquote></div>
David Dubbeldam