Difference between revisions of "CP2K compiling with Intel"

From iRASPA
Jump to: navigation, search
Line 73: Line 73:
 
/usr/local/lib/libxsmmgen.a<br>
 
/usr/local/lib/libxsmmgen.a<br>
 
/usr/local/lib/libxsmmnoblas.a  
 
/usr/local/lib/libxsmmnoblas.a  
 +
</blockquote>
 +
 +
 +
==== Libxc ====
 +
wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz
 +
tar -zxvf libxc-4.3.4.tar.gz
 +
cd libxc-4.3.4
 +
./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
 +
make -j 24
 +
make check
 +
<blockquote style="background-color: lightgrey; border: solid thin grey;">
 +
PASS: xc-run_testsuite<br>
 +
============================================================================<br>
 +
Testsuite summary for libxc 4.3.4<br>
 +
============================================================================<br>
 +
# TOTAL: 1<br>
 +
# PASS:  1<br>
 +
</blockquote>
 +
sudo make install
 +
sudo cp src/*.mod /usr/local/include/
 +
<blockquote style="background-color: lightgrey; border: solid thin grey;">
 +
/usr/local/lib/libxc.a <br>
 +
/usr/local/lib/libxcf03.a<br>
 +
/usr/local/lib/libxcf90.a
 
</blockquote>
 
</blockquote>

Revision as of 09:38, 26 May 2020

Compiling

Compiling subpackages

Serial

preparation

source /opt/intel/compilers_and_libraries_2020/linux/bin/compilervars.sh intel64
source /opt/intel/compilers_and_libraries_2020/linux/mkl/bin/mklvars.sh intel64
export AR="xiar"
export FC="ifort"
export CC="icc"
export CXX="icpc"
export F77=${FC}
export F90=${FC}
==== Gsl ====

Reduced optimization to "-O1", but with intel-compiler still fails LinAlg-unit test

wget http://gnu.askapache.com/gsl/gsl-2.6.tar.gz
tar -zxvf gsl-2.6.tar.gz
 ./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
make -j 16
make check

Libint2

Reduced optimization to "-O2"

wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-4.tgz
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-5.tgz
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-6.tgz
wget https://github.com/cp2k/libint-cp2k/releases/download/v2.6.0/libint-v2.6.0-cp2k-lmax-7.tgz
tar -zxvf libint-v2.6.0-cp2k-lmax-5.tgz
cd libint-v2.6.0-cp2k-lmax-5
./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"
make -j 24
make -j 24 check

all tests ok

edit Makefile in directory fortran line 12 should read (-lstdc++ added)

COMPUTE_LIB = -L../lib -lint2 -lstdc++

line 37 change CXX to FC

 $(LTLINK) $(FC) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^

sudo make install
sudo make install_fortran

/usr/local/lib/libint2


Libxsmm

A library for improved performance for matrix multiplication and deep learning primitives

wget https://www.cp2k.org/static/downloads/libxsmm-1.15.tar.gz
tar -zxvf libxsmm-1.15.tar.gz
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

all 16 test okay

make PREFIX=/usr/local STATIC=1 NO_SHARED=1 install

/usr/local/lib/libxsmm.a
/usr/local/lib/libxsmmext.a
/usr/local/lib/libxsmmf.a
/usr/local/lib/libxsmmgen.a
/usr/local/lib/libxsmmnoblas.a


Libxc

wget https://www.cp2k.org/static/downloads/libxc-4.3.4.tar.gz
tar -zxvf libxc-4.3.4.tar.gz
cd libxc-4.3.4
./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
make -j 24
make check

PASS: xc-run_testsuite
============================================================================
Testsuite summary for libxc 4.3.4
============================================================================

  1. TOTAL: 1
  2. PASS: 1
sudo make install
sudo cp src/*.mod /usr/local/include/

/usr/local/lib/libxc.a
/usr/local/lib/libxcf03.a
/usr/local/lib/libxcf90.a