Skip to content

Instantly share code, notes, and snippets.

@link89
Last active November 10, 2023 01:28
Show Gist options
  • Save link89/35a62e26b7cfd0b90761800478a8eeb8 to your computer and use it in GitHub Desktop.
Save link89/35a62e26b7cfd0b90761800478a8eeb8 to your computer and use it in GitHub Desktop.
Compile ELPA with intel oneapi

Note

  1. The latest OneAPI that supports CentOS 7 is 2022.3.1
  2. Use lscpu to check the arch of CPU.

Build

# download source code
wget https://elpa.mpcdf.mpg.de/software/tarball-archive/Releases/2022.11.001/elpa-2022.11.001.tar.gz
tar -xvf elpa-2022.11.001.tar.gz

# create and enter build folder
cd elpa-2022.11.001
mkdir -p build
cd build

module load oneapi/2022.3.1

# config build options
# my platform is icelake-server, which supports AVX512
# you may set --prefix to customize installation path
../configure CXX=icx FC=mpiifort CC=mpiicc FCFLAGS="-O3 -xCORE-AVX512" CFLAGS="-O3 -xCORE-AVX512" --enable-option-checking=fatal \
    SCALAPACK_LDFLAGS="-L$MKLROOT/lib/intel64 -lmkl_scalapack_lp64 -lmkl_intel_lp64 -lmkl_sequential \
    -lmkl_core -lmkl_blacs_intelmpi_lp64 -lpthread -lm -Wl,-rpath,$MKL_ROOT/lib/intel64" \
    SCALAPACK_FCFLAGS="-L$MKLROOT/lib/intel64 -lmkl_scalapack_lp64 -lmkl_intel_lp64 -lmkl_sequential \
    -lmkl_core -lmkl_blacs_intelmpi_lp64 -lpthread -lm -I$MKLROOT/include/intel64/lp64" \
    --enable-avx2 --enable-avx512 --with-mpi=yes
    
# build
make -j32

# test (Optional)
make check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment