-
Notifications
You must be signed in to change notification settings - Fork 7
195 lines (161 loc) · 7.78 KB
/
build_champ_debug.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
name: Github CI
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