update of prototypes #2
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: basic-build | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# handling of environment variable: https://stackoverflow.com/a/57969570 | |
- name: lscpu | |
run: | | |
lscpu; \ | |
echo "nb_cores=$(lscpu | grep \^CPU\(s\)\: | awk '{print $2}')" >> $GITHUB_ENV | |
- name: gcc_version | |
run: gcc --version | |
- name: echo_nb_cores | |
run: echo "Number of cores ${nb_cores}" | |
- name: get_packages | |
run: sudo apt-get update && sudo apt install openmpi-bin openmpi-common numdiff | |
- name: get_lime | |
uses: actions/checkout@v2 | |
with: | |
repository: usqcd-software/c-lime | |
path: lime | |
- name: autogen_lime | |
working-directory: ${{github.workspace}}/lime | |
run: ./autogen.sh && mkdir build | |
- name: build_lime | |
working-directory: ${{github.workspace}}/lime/build | |
run: | | |
CC=gcc \ | |
CFLAGS="-march=haswell -mtune=haswell -O2" \ | |
../configure --prefix=$(pwd)/install_dir | |
make -j | |
make install | |
- name: get_lemon | |
uses: actions/checkout@v2 | |
with: | |
repository: etmc/lemon | |
path: lemon | |
- name: autogen_lemon | |
working-directory: ${{github.workspace}}/lemon | |
run: | | |
autoreconf -i -f | |
mkdir build | |
- name: build_lemon | |
working-directory: ${{github.workspace}}/lemon/build | |
run: | | |
CC=mpicc \ | |
CFLAGS="-march=haswell -mtune=haswell -O2" \ | |
../configure --prefix=$(pwd)/install_dir | |
make -j | |
make install | |
- name: get_tmlqcd | |
uses: actions/checkout@v2 | |
with: | |
path: main | |
- name: create_builddir | |
shell: bash | |
run: mkdir ${{github.workspace}}/main/build | |
- name: autogen_tmlqcd | |
working-directory: ${{github.workspace}}/main | |
run: autoconf | |
- name: configure_and_build | |
shell: bash | |
working-directory: ${{github.workspace}}/main/build | |
run: | | |
CC=mpicc CXX=mpicxx \ | |
LDFLAGS="-fopenmp" \ | |
CFLAGS="-O2 -mtune=haswell -march=haswell -mavx2 -mfma -DOMPI_SKIP_MPICXX -fopenmp" \ | |
CXXFLAGS="-O2 -mtune=haswell -march=haswell -mavx2 -mfma -DOMPI_SKIP_MPICXX -fopenmp" \ | |
../configure \ | |
--enable-mpi \ | |
--with-mpidimension=4 \ | |
--enable-omp \ | |
--disable-sse2 \ | |
--disable-sse3 \ | |
--with-limedir=${{github.workspace}}/lime/build/install_dir \ | |
--with-lemondir=${{github.workspace}}/lemon/build/install_dir \ | |
--with-lapack="-lblas -llapack" || cat config.log | |
make -j | |
- name: nf2_rgmixedcg_hmc_tmcloverdetratio | |
working-directory: ${{github.workspace}}/main/build | |
run: | | |
mpirun -np 2 ./hmc_tm \ | |
-f ../sample-input/sample-hmc-rgmixedcg-tmcloverdetratio.input | |
- name: compare_nf2_rgmixedcg_hmc_tmcloverdetratio | |
working-directory: ${{github.workspace}}/main/build | |
run: | | |
refpath=${{github.workspace}}/main/sample-output/hmc-rgmixedcg-tmcloverdetratio | |
numdiff -r 1e-4 -X 1:10 -X 1:5-8 -X 2:10 -X 2:5-8 output.data ${refpath}/output.data | |
for i in $(seq 0 2 18); do \ | |
f=onlinemeas.$(printf %06d $i); \ | |
numdiff -r 1e-5 ${f} ${refpath}/${f}; \ | |
done | |