su2hmc: Two Colour Hybrid Monte Carlo with Clover Improved Wilson Fermions
Introduction
Hybrid Monte Carlo algorithm for Two Color QCD with Clover Improved Wilson-Gor'kov fermions based on the algorithm of Duane et al. Phys. Lett. B195 (1987) 216.
There is "up/down partitioning": each update requires one operation of congradq on complex vectors to determine $$\left(M^\dagger M\right)^{-1}\Phi$$ where $$\Phi$$ has dimension 4 * kvol * nc * Nf - The matrix M is the fermion matrix for a single flavor there is no extra species doubling as a result. Hence, the number of lattice flavors Nf is related to the number of continuum flavors N_f by $$N_f = 2 \text{Nf}\text{.}$$
Fermion expectation values are measured using a noisy estimator. on the Wilson-Gor'kov matrix, which has dimension 8 * kvol * nc * Nf inversions done using congradp, and matrix multiplies with dslash, dslashd
The code runs for a fixed number ntraj of trajectories.
| |
| Phi | pseudofermion field |
| bmass | bare fermion mass |
| fmu | chemical potential |
| actiona | running average of total action |
The code produces the following outputs:
| File Name | Data type |
| config.bβββkκκκmuμμμμjJJJcCCCsNXtNT.XXXXXX | Lattice configuration for given parameters. Last digits are the trajectory number |
| Output.bβββkκκκmuμμμμjJJJcCCCsNXtNT | Number of conjugate gradient steps for each trajectory. Also contains general simulation details upon completion |
| bose.bβββkκκκmuμμμμjJJJcCCCsNXtNT | Average spatial plaquette, Average temporal plaquette, Average Polyakov line |
| fermi.bβββkκκκmuμμμμjJJJcCCCsNXtNT | $\langle\bar{\psi}\psi\rangle$, Energy density, Quark number density |
| diq.bβββkκκκmuμμμμjJJJcCCCsNXtNT | Diquark Condensate |
- SJH March 2005
- Temporal Extent Parallelisation S. Kim (김세용)
- Full MPI Parallelisation T. Janowski
- BlueGene Optimisation J. Enright
- Hybrid MPI-OpenMP code, P.Giudice, May 2013
- Converted from Fortran to C by D. Lawlor March 2021
- CUDA Implementation by D. Lawlor April 2024
- Clover Action Implementation by D. Lawlor July 2026
Conversion notes
This two colour implementation was originally written in FORTRAN for: [S. Hands, S. Kim and J.-I. Skullerud, Deconfinement in dense 2-color QCD, Eur. Phys. J. C48, 193 (2006), hep- lat/0604004](https://arxiv.org/abs/hep-lat/0604004)
It has since been rewritten in C and has been adapted for CUDA on a single GPU. We have sucessfully run on 7000+ Zen 2 cores, as well as Nvidia GPUs.
Some adaptions from the original are:
- Mixed precision conjugate gradient.
- Implementation of BLAS routines for vector operations.
- Removal of excess halo exchanges.
- #pragma omp simd instructions.
- GSL ranlux support.
- CUDA implementation.
- Higher order integrators.
- Clover Improved Wilson Fermion Action.
Other works in progress include:
- yaml input file.
- Set lattice volume and CPU grid at runtime.
And possible future directions
- Hasenbusch preconditioning.
Getting started
This code is written for MPI on Linux, thus has a few caveats to get up and running
- In sizes.h, set the lattice size. By default we assume the spatial components to be equal.
- Also in sizes.h set the processor grid size by setting the values of
#define npx
Processor grid x extent. This must be a divisor of nx.
#define npz
Processor grid z extent.
#define npy
Processor grid y extent.
#define npt
Processor grid t extent.
These MUST be divisors of
#define nt
Lattice temporal extent. This also corresponds to the inverse temperature.
#define nx
Lattice x extent.
#define nz
Lattice z extent. We normally use cubic lattices so this is the same as nx.
#define ny
Lattice y extent. We normally use cubic lattices so this is the same as nx.
set in step one. For the CUDA version these must be set to 1 as only single GPU is supported at present.
- Compile the code using the desired Makefile. Please note that the paths given in the Makefiles for BLAS libraries etc. are based on my own system. You may need to adjust these manually.
Run the code. This may differ from system to system, especially if a task scheduler like SLURM is being used. On my desktop it can be run locally using the following command
mpirun -n<nproc> ./su2hmc <input_file>
- nproc is the number of processors, given by the product of npx npy npz npt.
- If no input file is given, the programme defaults to midout. The default name is a historical one which goes back generations to the early days of Lattice QCD.
Input parameters
A sample input file looks like
0.002 1.7 0.1780 0.00 0.000 0.0 0.0 500 20 1 1 100
dt beta akappa jqq c_sw fmu aNf stepl ntraj istart icheck iread
where
- dt is the step size for the update.
- beta is the inverse gauge coupling, given up to three significant figures.
- akappa is hopping parameter, given up to four significant figures.
- jqq is the diquark source, given up to three significant figures.
- c_sw is the clover coefficient. Leave as zero for an unimproved action.
- fmu is the chemical potential.
- aNf is ignored but remains for legacy reasons. Originating in the Cornell group when Ken Wilson was still there, that molecular dynamics time-discretisation artifacts can be absorbed into renormalisation of the bare parameters of the lattice action.
- stepl is the average number of steps per trajectory. For a single trajectory it times dt should equal 1.
- ntraj is the number of trajectories.
- istart signals a hot start (>=1) or cold start (<=0).
- icheck is how often to print out a configuration. We typically use 5 and tune for 80% acceptance rate.
- iread is the starting configuration for continuation runs. If zero, start without reading.
The bottom line of the input is ignored by the programme and is just there to make your life easier. Blank space does not matter, so long as there is some gap between the input parameters in the file and they are all on a single line.
Known issues
- One cannot currently run the clover improved action with MPI. This is due to the $$x\pm\hat{\mu}\pm\hat{\nu}$$ terms not being storted in the halo at present. Single rank or GPU runs do work.