developers documentation part 1 #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CHAMP with QMCkl and TREXIO build with Intel | |
on: | |
push: | |
branches: | |
- 'releases/**' | |
- main | |
tags: | |
- v2.*.* | |
- v3.*.* | |
pull_request: | |
branches: | |
- 'releases/**' | |
- main | |
workflow_dispatch: | |
jobs: | |
build_champ: | |
strategy: | |
matrix: | |
toolchain: ['intel'] | |
name: Build CHAMP and TREXIO with ${{ matrix.toolchain }} OneAPI GitHub-hosted runner | |
runs-on: ubuntu-latest | |
timeout-minutes: 180 | |
defaults: | |
run: | |
shell: bash --noprofile --norc {0} | |
steps: | |
- name: Use Intel oneAPI GitHub Actions fast setup | |
uses: neelravi/[email protected] | |
with: | |
components: fortran,cpp,mpi,mkl | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y emacs cmake git wget | |
- name: Build HDF5 from source | |
run: | | |
source /opt/intel/oneapi/setvars.sh | |
wget https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5-1_14_2.tar.gz | |
tar -xzf hdf5-1_14_2.tar.gz | |
cd hdf5-hdf5-1_14_2 | |
./configure FC=mpiifx CC=mpiicx FCFLAGS=-O2 CFLAGS=-O2 CXX=icpx --enable-static --enable-shared --enable-fortran --enable-parallel --prefix=$HOME | |
make -j$(nproc) | |
make install | |
- name: Clone and Install TREXIO | |
run: | | |
source /opt/intel/oneapi/setvars.sh | |
git clone https://github.com/TREX-CoE/trexio.git | |
cd trexio | |
export LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH | |
cmake -S. -Bbuild \ | |
-DCMAKE_Fortran_COMPILER=mpiifx \ | |
-DCMAKE_C_COMPILER=mpiicx \ | |
-DCMAKE_INSTALL_PREFIX=$HOME | |
cmake --build build -- -j$(nproc) | |
cd build | |
ctest --output-on-failure --verbose | |
make install | |
- name: Clone and Install QMCKL | |
run: | | |
source /opt/intel/oneapi/setvars.sh | |
git clone https://github.com/TREX-CoE/qmckl.git | |
cd qmckl | |
export LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH | |
./autogen.sh | |
./configure --prefix=$HOME --with-icx --with-ifort --enable-hpc --with-hdf5=$HOME --with-trexio=$HOME --with-openmp --disable-python | |
make -j$(nproc) | |
make check -j$(nproc) | |
make install | |
- name: Clone the CHAMP code from GitHub | |
uses: actions/checkout@v4 | |
- name: Compile the CHAMP code with TREXIO and QMCkl using Intel and run all tests | |
run: | | |
source /opt/intel/oneapi/setvars.sh | |
export LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH | |
cmake -H. -Bbuild \ | |
-DCMAKE_Fortran_COMPILER=mpiifx \ | |
-DCMAKE_C_COMPILER=mpiicx \ | |
-DENABLE_TREXIO=ON \ | |
-DTREXIO_INCLUDE_DIR=$HOME/include \ | |
-DTREXIO_LIBRARY=$HOME/lib/libtrexio.so \ | |
-DENABLE_QMCKL=ON \ | |
-DQMCKL_INCLUDE_DIR=$HOME/include \ | |
-DQMCKL_LIBRARY=$HOME/lib/libqmckl.so | |
cmake --build build -- -j$(nproc) | |
cd build | |
ctest --output-on-failure --verbose -L "QMCKL" | |
- name: Clean and Re-Compile CHAMP with TREXIO only | |
run: | | |
source /opt/intel/oneapi/setvars.sh | |
rm -rf build bin | |
export LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH | |
cmake -H. -Bbuild \ | |
-DCMAKE_Fortran_COMPILER=mpiifx \ | |
-DCMAKE_C_COMPILER=mpiicx \ | |
-DENABLE_TREXIO=ON \ | |
-DTREXIO_INCLUDE_DIR=$HOME/include \ | |
-DTREXIO_LIBRARY=$HOME/lib/libtrexio.so \ | |
-DENABLE_QMCKL=OFF | |
cmake --build build -- -j$(nproc) | |
cd build | |
ctest --output-on-failure --verbose -L "TREXIO" -LE "QMCKL" |