Skip to content

Instantly share code, notes, and snippets.

@link89
Last active November 10, 2023 02:55
Show Gist options
  • Save link89/21bb4bc4af265e006a33572fdc10f559 to your computer and use it in GitHub Desktop.
Save link89/21bb4bc4af265e006a33572fdc10f559 to your computer and use it in GitHub Desktop.
Build libint with OneAPI

Note

  1. Use autoconfig when <= 2.6, and cmake > 2.7
  2. Patch fortran Makefile
  3. Use CP2K's toolchain as reference: https://github.com/cp2k/cp2k/blob/master/tools/toolchain/scripts/stage3/install_libint.sh

Build

# download
wget https://www.cp2k.org/static/downloads/libint-v2.6.0-cp2k-lmax-5.tgz --no-check-certificate
tar -xvf libint-v2.6.0-cp2k-lmax-5.tgz
cd libint-v2.6.0-cp2k-lmax-5

# config
CC=mpiicc CXX=mpiicc FC=mpiifort ./configure \
    --with-cxx="mpiicc -O3 -xCORE-AVX512 -mtune=icelake-server -g1" \
    --with-cxx-optflags="-O3 -xCORE-AVX512 -mtune=icelake-server -g1" \
    --enable-fortran \
    --with-pic 
# fix
sed -i -e "s/\$(CXX) \$(CXXFLAGS)/\$(FC) \$(FCFLAGS)/g" -e "s/\$(FCLIBS) -o/\$(FCLIBS) -lstdc++ -o/" fortran/Makefile

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