Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hb solver #546

Merged
merged 38 commits into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
9640a58
I am adding a functionality to the HMC. For the CLOVERDETRATIO monomi…
simone-romiti Jul 6, 2022
7cdddf5
In `read_input.l`, I added the block
simone-romiti Jul 6, 2022
40482d0
In `monomial/detratio_monomial.c` I changed the function `detratio_he…
simone-romiti Jul 8, 2022
c39d63e
Reply to https://github.com/etmc/tmLQCD/pull/546#discussion_r91773270…
simone-romiti Jul 12, 2022
327f2d8
Reply to https://github.com/etmc/tmLQCD/pull/546#discussion_r91773408…
simone-romiti Jul 12, 2022
860e5ad
Reply to https://github.com/etmc/tmLQCD/pull/546#discussion_r91773854…
simone-romiti Jul 12, 2022
2534c6c
modified: read_input.l
simone-romiti Jul 12, 2022
141c9a6
- declaration of DETRATIO
Jul 12, 2022
3cf0922
add HB_maxiter
simone-romiti Jul 13, 2022
7438daa
fix reading of HB_solver and HB_MaxSolverIterations
Marcogarofalo Jul 13, 2022
d0d772d
always init HB_solver_params
Marcogarofalo Jul 13, 2022
5bccf10
deleting not necessary files
Marcogarofalo Jul 13, 2022
0d14fc4
default and initialization of HB_solver
Marcogarofalo Jul 13, 2022
cc5292a
DDalphaAMG as HB solver
Marcogarofalo Jul 14, 2022
4f02cc5
Merge remote-tracking branch 'origin/quda_work' into HB_solver
kostrzewa Nov 2, 2022
23f7f54
added documentation for the `HB_solver` parameter
simone-romiti Dec 16, 2022
ff57999
added doc for HB_solver options in a dedicated subsection.
simone-romiti Dec 16, 2022
0cc0336
see https://github.com/etmc/tmLQCD/commit/ff57999735061187e7a64d21bcc…
simone-romiti Dec 16, 2022
c330493
output mpicc version in basic build workflow
kostrzewa Jan 11, 2023
7786c3e
typo in basic-build.yaml
kostrzewa Jan 11, 2023
ee1c4e1
test github action artifact upload (lime config.log)
kostrzewa Jan 11, 2023
8854044
figure out how this artifact stuff works
kostrzewa Jan 11, 2023
41a9916
with: is required
kostrzewa Jan 11, 2023
81a9c80
update basic-build.yaml to use checkout@v3 action
kostrzewa Jan 11, 2023
704b891
add more artifacts for basic-build.yaml
kostrzewa Jan 11, 2023
b855787
always attempt to upload artifacts
kostrzewa Jan 11, 2023
bcf6cfb
test if using LD=mpicc fixes things for now
kostrzewa Jan 11, 2023
1d05e28
apparently the OpenMPI package does not ship with libmpi any more, th…
kostrzewa Jan 11, 2023
ad2738b
hopefully fix all three github actions
kostrzewa Jan 11, 2023
fe1d38b
remove LD=mpicc from basic build
kostrzewa Jan 11, 2023
bd9e369
Merge remote-tracking branch 'origin/quda_work' into HB_solver
kostrzewa Jan 27, 2023
5c25216
switch qphix branch, maybe this will help
kostrzewa Feb 2, 2023
7f65fe9
prevent the qphix workflow from crashing the CI node ...
kostrzewa Feb 2, 2023
10989e0
let's see if modifying qphix has fixed the qphix workflow
kostrzewa Feb 3, 2023
fadcbc1
see if ed165e0065c422743a60d65ec325ce3c9ee791aa for DDalphaAMG fixes …
kostrzewa Feb 4, 2023
d8a7d38
correctly initialize HB_maxiter when no HB solver has been defined
kostrzewa Mar 1, 2023
d24e5ce
set reorder = 0 by default to work correctly on LUMI
kostrzewa Mar 2, 2023
ac9349e
change reference location for the HB_solver details
kostrzewa Mar 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 39 additions & 4 deletions .github/workflows/basic-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,28 @@ jobs:
steps:
# handling of environment variable: https://stackoverflow.com/a/57969570
- name: lscpu
if: ${{ always() }}
run: |
lscpu; \
echo "nb_cores=$(lscpu | grep \^CPU\(s\)\: | awk '{print $2}')" >> $GITHUB_ENV

- name: gcc_version
if: ${{ always() }}
run: gcc --version

- name: echo_nb_cores
if: ${{ always() }}
run: echo "Number of cores ${nb_cores}"

- name: get_packages
run: sudo apt-get update && sudo apt install openmpi-bin openmpi-common numdiff
run: sudo apt-get update && sudo apt install openmpi-bin openmpi-common libopenmpi3 libopenmpi-dev numdiff

- name: mpicc_version
if: ${{ always() }}
run: mpicc --version

- name: get_lime
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: usqcd-software/c-lime
path: lime
Expand All @@ -41,8 +48,15 @@ jobs:
make -j
make install

- name: Archive lime config.log
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: lime_config_output
path: ${{github.workspace}}/lime/build/config.log

- name: get_lemon
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: etmc/lemon
path: lemon
Expand All @@ -61,9 +75,16 @@ jobs:
../configure --prefix=$(pwd)/install_dir
make -j
make install

- name: Archive lemon config.log
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: lemon_config_output
path: ${{github.workspace}}/lemon/build/config.log

- name: get_tmlqcd
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: main

Expand Down Expand Up @@ -94,11 +115,25 @@ jobs:
--with-lapack="-lblas -llapack" || cat config.log
make -j

- name: Archive tmLQCD config.log
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: tmlqcd_config_output
path: ${{github.workspace}}/main/build/config.log

- 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: Archive nf2_rgmixedcg_hmc_tmcloverdetratio output
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: tmlqcd_test_output
path: ${{github.workspace}}/main/build/output.data

- name: compare_nf2_rgmixedcg_hmc_tmcloverdetratio
working-directory: ${{github.workspace}}/main/build
Expand Down
40 changes: 34 additions & 6 deletions .github/workflows/ddalphaamg-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

steps:
- name: get_tmlqcd
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: main

Expand All @@ -20,16 +20,22 @@ jobs:
echo "nb_cores=$(lscpu | grep \^CPU\(s\)\: | awk '{print $2}')" >> $GITHUB_ENV

- name: gcc_version
if: ${{ always() }}
run: gcc --version

- name: echo_nb_cores
if: ${{ always() }}
run: echo "Number of cores ${nb_cores}"

- name: get_packages
run: sudo apt update && sudo apt install openmpi-bin openmpi-common numdiff
run: sudo apt update && sudo apt install openmpi-bin openmpi-common libopenmpi3 libopenmpi-dev numdiff

- name: mpicc_version
if: ${{ always() }}
run: mpicc --version

- name: get_lime
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: usqcd-software/c-lime
path: lime
Expand All @@ -50,8 +56,15 @@ jobs:
make -j
make install

- name: Archive lime config.log
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: lime_config_output
path: ${{github.workspace}}/lime/build/config.log

- name: get_lemon
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: etmc/lemon
path: lemon
Expand All @@ -73,10 +86,18 @@ jobs:
make -j
make install

- name: Archive lemon config.log
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: lemon_config_output
path: ${{github.workspace}}/lemon/build/config.log

- name: get_ddalphaamg
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: sbacchio/ddalphaamg
repository: kostrzewa/ddalphaamg #sbacchio/ddalphaamg
ref: fix_main_build
path: ddalphaamg

- name: build_ddalphaamg
Expand Down Expand Up @@ -120,6 +141,13 @@ jobs:
mpirun -np 2 ./hmc_tm \
-f ../sample-input/sample-hmc-ddalphaamg-tmcloverdetratio.input

- name: Archive nf2_ddalphaamg_hmc_tmcloverdetratio output
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: tmlqcd_test_output
path: ${{github.workspace}}/main/build/output.data

- name: compare_nf2_ddalphaamg_hmc_tmcloverdetratio
working-directory: ${{github.workspace}}/main/build
run: |
Expand Down
61 changes: 53 additions & 8 deletions .github/workflows/qphix-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,28 @@ jobs:
steps:
# handling of environment variable: https://stackoverflow.com/a/57969570
- name: lscpu
if: ${{ always() }}
run: |
lscpu; \
echo "nb_cores=$(lscpu | grep \^CPU\(s\)\: | awk '{print $2}')" >> $GITHUB_ENV

- name: gcc_version
if: ${{ always() }}
run: gcc --version

- name: echo_nb_cores
if: ${{ always() }}
run: echo "Number of cores ${nb_cores}"

- name: get_packages
run: sudo apt update && sudo apt install openmpi-bin openmpi-common numdiff
run: sudo apt update && sudo apt install openmpi-bin openmpi-common libopenmpi3 libopenmpi-dev numdiff

- name: mpicc_version
if: ${{ always() }}
run: mpicc --version

- name: get_lime
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: usqcd-software/c-lime
path: lime
Expand All @@ -41,8 +48,15 @@ jobs:
make -j
make install

- name: Archive lime config.log
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: lime_config_output
path: ${{github.workspace}}/lime/build/config.log

- name: get_lemon
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: etmc/lemon
path: lemon
Expand All @@ -63,8 +77,16 @@ jobs:
make -j
make install

- name: Archive lemon config.log
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: lemon_config_output
path: ${{github.workspace}}/lemon/build/config.log


- name: get_qmp
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: usqcd-software/qmp
path: qmp
Expand All @@ -86,11 +108,18 @@ jobs:
make -j
make install

- name: Archive qmp config.log
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: qmp_config_output
path: ${{github.workspace}}/qmp/build/config.log

- name: get_qphix
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: JeffersonLab/qphix
ref: fix_tmlqcd
ref: sysctl_deprecated
path: qphix

- name: create_qphix_builddir
Expand All @@ -99,7 +128,7 @@ jobs:

- name: cache_qphix
id: cache-qphix
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: qphix/build
key: ${{ runner.os }}-haswell-qphix
Expand All @@ -116,6 +145,7 @@ jobs:
-Dtm_clover=ON \
-Dtwisted_mass=ON \
-Dtesting=OFF \
-Drecursive_jN=$(( ${nb_cores} + 3 )) \
-DCMAKE_CXX_COMPILER=mpicxx \
-DCMAKE_CXX_FLAGS="-std=c++11 -O2 -mavx2 -mfma -mtune=haswell -march=haswell -fopenmp" \
-DCMAKE_C_COMPILER=mpicc \
Expand All @@ -126,7 +156,7 @@ jobs:
make install

- name: get_tmlqcd
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: main

Expand Down Expand Up @@ -160,12 +190,27 @@ jobs:
--enable-qphix-soalen=4 || cat config.log
make -j

- name: Archive tmLQCD config.log
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: tmlqcd_config_output
path: ${{github.workspace}}/main/build/config.log

- name: nf2_qphix_hmc_tmcloverdetratio
working-directory: ${{github.workspace}}/main/build
run: |
mpirun -np 2 ./hmc_tm \
-f ../sample-input/sample-hmc-qphix-tmcloverdetratio.input

- name: Archive nf2_qphix_hmc_tmcloverdetratio output
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: tmlqcd_test_output
path: ${{github.workspace}}/main/build/output.data


- name: compare_nf2_qphix_hmc_tmcloverdetratio
working-directory: ${{github.workspace}}/main/build
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ doc/*.txt
doc/*.gpl
doc/wrapper*
history_hmc_tm
.vscode/*
1 change: 1 addition & 0 deletions default_input_values.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
#define _default_rlxd_level 1
#define _default_solver_flag 1 // this is CG (see solver/solver_types.h)
#define _default_nd_solver_flag 15 // this is CGMMSND (see solver/solver_types.h)
#define _default_HB_solver_flag 26 // this is INVALID_SOLVER (see solver/solver_types.h)
#define _default_startoption 0
#define _default_Ntherm 0
#define _default_Nmeas 1
Expand Down
34 changes: 29 additions & 5 deletions doc/input.tex
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,8 @@ \subsection{Input parameter for main program}
\left[\det(P_{n}(Q^2(\kappa) + \mu^2)) det(Q^2(\kappa_2) + \mu^2_2)\right]^{-1}
\]
\end{itemize}
Each of them has different options:
Each of them has different options
:
\begin{itemize}
\item {\ttfamily DET, CLOVERDET}:
\begin{itemize}
Expand Down Expand Up @@ -450,19 +451,24 @@ \subsection{Input parameter for main program}
\item {\ttfamily MaxSolverIterations}: default is $5000$
\item {\ttfamily Solver}: the solver to be used, either CG or
BiCGstab. Default is CG.
\item {\ttfamily HB\_Solver}: the solver to be used in the heatbath step, see section \ref{sec:hb.solver} for details.
\item {\ttfamily Name}: a name to be assigned to the monomial. The
default is {\ttfamily DET}
\end{itemize}
%
\item {\ttfamily DETRATIO}: the same as for {\ttfamily DET}, but in
addition:
\begin{itemize}
\item {\ttfamily 2KappaMu2}
\item {\ttfamily Kappa2}
\item {\ttfamily Name}: a name to be assigned to the monomial. The
default is {\ttfamily DETRATIO}
\item {\ttfamily Name}:
a name to be assigned to the monomial.
The default is {\ttfamily DETRATIO}
\end{itemize}


%
\item {\ttfamily CLOVERDETRATIO}:
see {\ttfamily CLOVERDET} and {\ttfamily DETRATIO}.
%
\item {\ttfamily GAUGE}:
\begin{itemize}
\item {\ttfamily Timescale}: the timescale on which to integrate
Expand Down Expand Up @@ -641,6 +647,24 @@ \subsection{Input parameter for main program}
{\ttfamily <epsilon>} is to be replaced by the ratio {\ttfamily Lmin/Lmax}.
\end{itemize}

\subsubsection{The heatbath solver}
\label{sec:hb.solver}

Inside each monomial the user specifies the solver for the inversion of the Dirac operator.
The solver used in the HB (heatbath) can be different from the MD (Molecular Dynamics) and ACC step (acceptance step).
%
This is determined by the {\ttfamily HB\_solver} parameter inside the {\ttfamily BeginMonomial}-{\ttfamily EndMonomial}.
Supported values: CG, MIXEDCG, RGMIXEDCG, BICGSTAB, MIXEDBICGSTAB, MG.
If specified, the following (optional) parameters of the HB solver are parsed:
\begin{itemize}
\item {\ttfamily HB\_MaxSolverIterations}: analogous to {\ttfamily MaxSolverIterations}
\item {\ttfamily HB\_UseExternalInverter}: analogous to {\ttfamily UseExternalInverter}
\item {\ttfamily HB\_UseSloppyPrecision}: analogous to {\ttfamily UseSloppyPrecision}
\item {\ttfamily HB\_UseCompression}: analogous to {\ttfamily UseCompression}
\end{itemize}
%
Their default values are taken from the corresponding MD solver parameters.

\subsubsection{The Integrator}

The Integrator can be specified similar to the monomials:
Expand Down
Loading