second batch of documentation #9
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: Debug build CHAMP with Intel and GNU | |
on: | |
push: | |
branches: [main, ci_hotfix] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
inputs: | |
tags: | |
description: 'Test tags (default: short)' | |
default: "short" | |
jobs: | |
debug_build_test_champ: | |
name: build and test with ${{ matrix.toolchain }} ${{ matrix.mode }} mode | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 200 | |
strategy: | |
matrix: | |
toolchain: ['intel','gnu'] | |
mode: ['RELEASE'] | |
exclude: | |
- toolchain: 'intel' | |
mode: 'DEBUG' | |
fail-fast: false | |
defaults: | |
run: | |
shell: bash --noprofile --norc {0} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get Intel Key | |
if: matrix.toolchain == 'intel' | |
run: | | |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | |
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | |
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | |
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main" | |
sudo apt-get update | |
- name: Install Cmake and HDF5 | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y cmake | |
sudo apt-get install -y libhdf5-dev | |
- name: Install GNU compilers and libraries | |
if: matrix.toolchain == 'gnu' | |
run: | | |
sudo apt install -y gfortran | |
sudo apt install -y openmpi-bin | |
sudo apt install -y libopenmpi-dev | |
sudo apt install -y gawk | |
sudo apt install -y liblapack-dev | |
sudo apt install -y libblas-dev | |
gawk --version | |
mpirun --version | |
gfortran --version | |
- name: install Intel oneapi components | |
if: matrix.toolchain == 'intel' | |
run: | | |
sudo apt-get install -y intel-oneapi-common-vars | |
sudo apt-get install -y intel-oneapi-compiler-fortran-2021.3.0 | |
sudo apt-get install -y intel-oneapi-mkl-2021.3.0 | |
sudo apt-get install -y intel-oneapi-mkl-devel-2021.3.0 | |
sudo apt-get install -y intel-oneapi-mpi-2021.3.0 | |
sudo apt-get install -y intel-oneapi-mpi-devel-2021.3.0 | |
- name: Install Trexio | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y cmake | |
sudo apt-get install -y libhdf5-dev | |
sudo apt-get install -y gfortran | |
sudo apt-get install -y gcc | |
wget https://github.com/TREX-CoE/trexio/releases/download/v1.0/trexio-1.0.0.tar.gz | |
tar -xzf trexio-1.0.0.tar.gz | |
cd trexio-1.0.0/ | |
./configure FC=gfortran CC=gcc | |
make all | |
make check | |
sudo make install | |
sudo cp include/* /usr/local/include/ | |
- name: Compile the CHAMP code with INTEL | |
if: matrix.toolchain == 'intel' | |
run: | | |
source /opt/intel/oneapi/setvars.sh | |
printenv >> $GITHUB_ENV | |
which mpiifort | |
MPIRUN=`which mpirun` | |
echo "mpirun used is " $MPIRUN | |
cmake --version | |
# cmake -H. -Bbuild -DCMAKE_Fortran_COMPILER=mpiifort -DCMAKE_BUILD_TYPE=DEBUG | |
cmake -H. -Bbuild -DCMAKE_Fortran_COMPILER=mpiifort | |
cmake --build build -- -j2 | |
ulimit -s unlimited | |
- name: Compile with GNU | |
if: matrix.toolchain == 'gnu' | |
run: | | |
printenv >> $GITHUB_ENV | |
which mpif90 | |
MPIRUN=`which mpirun` | |
echo "mpirun used is " $MPIRUN | |
cmake --version | |
cmake -H. -Bbuild -DCMAKE_Fortran_COMPILER=mpif90 -DCMAKE_BUILD_TYPE=${{ matrix.mode }} | |
cmake --build build -- -j2 | |
ulimit -s unlimited | |
- name: "Test 01 (H2) sto basis optimize jastrow sr_n method on 1 processor" | |
run: | | |
echo "Running the tests using the new parser. H2 " | |
cd tests/CI_test/VMC-H2 | |
echo "Running the optimization calculation" | |
mpirun -np 1 $HOME/work/champ/champ/bin/vmc.mov1 -i revised_vmc.inp -o revised_vmc_single.out -e error | |
echo "Comparing the energy with the reference one (total E = -1.0059842 +- 0.0070988) " | |
$HOME/work/champ/champ/tools/compare_value.py revised_vmc_single.out "total E" -1.0059842 0.0070988 | |
- name: "Test 02 (H2) sto basis optimize jastrow sr_n method on 2 processors" | |
run: | | |
ulimit -s unlimited | |
echo "Running the tests using the new parser. H2 " | |
cd tests/CI_test/VMC-H2 | |
echo "Running the optimization calculation" | |
mpirun -np 2 ${{ matrix.toolchain == 'gnu' && '--oversubscribe' || '' }} $HOME/work/champ/champ/bin/vmc.mov1 -i revised_vmc.inp -o revised_vmc_double.out -e error | |
echo "Comparing the energy with the reference one (total E = -1.0108635 +- 0.0054667) " | |
$HOME/work/champ/champ/tools/compare_value.py revised_vmc_double.out "total E" -1.0108635 0.0054667 | |
- name: "Test 03 (H2) sto basis optimize wf+jastrow using lin_d method nopt_iter=20 on 1 processor" | |
continue-on-error: true | |
run: | | |
ulimit -s unlimited | |
echo "Running the tests using the new parser. H2 " | |
cd tests/CI_test/VMC-H2 | |
echo "Running the optimization calculation" | |
mpirun -np 1 $HOME/work/champ/champ/bin/vmc.mov1 -i revised_vmc_lin.inp -o revised_vmc_lin_single.out -e error | |
echo "Comparing the energy with the reference one (total E = -1.0608157 +- 0.0026295) " | |
$HOME/work/champ/champ/tools/compare_value.py revised_vmc_lin_single.out "total E" -1.0608157 0.0026295 | |
- name: "Test 04 (H2) sto basis optimize wf+jastrow using lin_d method nopt_iter=20 on 2 processors" | |
continue-on-error: true | |
run: | | |
ulimit -s unlimited | |
echo "Running the tests using the new parser. H2 " | |
cd tests/CI_test/VMC-H2 | |
echo "Running the optimization calculation" | |
mpirun -np 2 ${{ matrix.toolchain == 'gnu' && '--oversubscribe' || '' }} $HOME/work/champ/champ/bin/vmc.mov1 -i revised_vmc_lin.inp -o revised_vmc_lin_double.out -e error | |
echo "Comparing the energy with the reference one (total E = -1.0578796 +- 0.0018813) " | |
$HOME/work/champ/champ/tools/compare_value.py revised_vmc_lin_double.out "total E" -1.0578796 0.0018813 | |
- name: "Test 05 (H2) corsamp :: sto basis optimize wf+ci+jastrow using linear method nopt_iter=5 on 1 processor" | |
run: | | |
ulimit -s unlimited | |
echo "Running the tests using the new parser. H2 " | |
cd tests/CI_test/VMC-H2 | |
echo "Running the optimization calculation" | |
mpirun -np 1 $HOME/work/champ/champ/bin/vmc.mov1 -i revised_vmc_corsamp.inp -o revised_vmc_corsamp_single.out -e error | |
echo "Comparing the energy with the reference one (Current energy = -0.9926131 +- 0.0120065 ) " | |
$HOME/work/champ/champ/tools/compare_value.py revised_vmc_corsamp_single.out "Current energy" -0.9926131 0.0120065 | |
#echo "Comparing the energy with the reference one Current best energy + 2*error = -1.0018" | |
#$HOME/work/champ/champ/tools/compare_value.py revised_vmc_corsamp_single.out "Current best energy + 2*error" -1.0018 0.0114836 | |
- name: "Test 06 (H2) corsamp :: sto basis optimize wf+ci+jastrow using linear method nopt_iter=5 on 2 processor" | |
run: | | |
ulimit -s unlimited | |
echo "Running the tests using the new parser. H2 " | |
cd tests/CI_test/VMC-H2 | |
echo "Running the optimization calculation" | |
mpirun -np 2 ${{ matrix.toolchain == 'gnu' && '--oversubscribe' || '' }} $HOME/work/champ/champ/bin/vmc.mov1 -i revised_vmc_corsamp.inp -o revised_vmc_corsamp_double.out -e error | |
echo "Comparing the energy with the reference one (Current energy = -1.0135052 +- 0.0069582 ) " | |
$HOME/work/champ/champ/tools/compare_value.py revised_vmc_corsamp_double.out "Current energy" -1.0135052 0.0069582 | |
#echo "Comparing the energy with the reference one Current best energy + 2*error = -1.0008" | |
#$HOME/work/champ/champ/tools/compare_value.py revised_vmc_corsamp_double.out "Current best energy + 2*error" -1.0008 0.0085151 | |