HPMC User Guide v 1.00
© 2026 Bassem W. Jamaleddine
The open source library QUDA = Quantum Chromodynamics on NVIDIA GPUs has been installed on your HPMC. QUDA is designed to accelerate lattice Quantum Chromodynamics (LQCD) calculations using GPUs via NVIDIA's CUDA platform. It includes solvers for conjugate gradient (CG), multi-shift CG, BiCGStab, BiCGStab(l), and domain-decomposition (DD) preconditioned GCR. Installing QUDA on your HPMC is simple: download quda-master tar archive, extract it, run configure, and make.
From the README file of the package.
Release Notes for QUDA v0.7.0 4th February 2015 ----------------------------- Overview: QUDA is a library for performing calculations in lattice QCD on graphics processing units (GPUs), leveraging NVIDIA's CUDA platform. The current release includes optimized Dirac operators and solvers for the following fermion actions: * Wilson * Clover-improved Wilson * Twisted mass (including non-degenerate pairs) * Twisted mass with a clover term * Staggered fermions * Improved staggered (asqtad or HISQ) * Domain wall (4-d or 5-d preconditioned) * Mobius fermion Implementations of CG, multi-shift CG, BiCGstab, and DD-preconditioned GCR are provided, including robust mixed-precision variants supporting combinations of double, single, and half (16-bit "block floating point") precision. The library also includes auxilliary routines necessary for Hybrid Monte Carlo, such as HISQ link fattening, force terms and clover-field construction. Use of many GPUs in parallel is supported throughout, with communication handled by QMP or MPI.
The quda-master tree is shown below:
09:30 root@skyblue: /hpmc/cuda/quda-master # tree --charset unicode -d
.
|-- include
|
| |-- block
| |
| |-- device
| | |-- block
| | |
| |
| |
| |-- grid
| |-- host
| |-- iterator
| |-- thread
|
|
|-- lib
| |-- dslash_core
|
|-- include
|
`-- cub | |-- block
| |
`-- specializations | |-- device
| | |-- block
| | |
`-- specializations | |
`-- region | |
`-- specializations | |-- grid
| |-- host
| |-- iterator
| |-- thread
|
`-- warp |
`-- specializations |-- lib
| |-- dslash_core
|
`-- generate `-- tests To find out what the quda-master package offers you, just look into its library directory for the *.cu files. The filenames in the lib directory give you a good idea on what is provided by quda-master.
10:25 root@skyblue: /hpmc/cuda/quda-master # ls -l lib/*.cu | lsnames
blas_quda clover_deriv_quda clover_invert clover_quda clover_trace_quda color_spinor_util contract copy_clover copy_color_spinor copy_gauge copy_gauge_double copy_gauge_extended copy_gauge_half copy_gauge_inc copy_gauge_single copy_quda covDev cuda_color_spinor_field cuda_gauge_field dslash_clover_asym dslash_clover dslash_domain_wall_4d dslash_domain_wall dslash_improved_staggered dslash_mobius dslash_ndeg_twisted_mass dslash_pack dslash_quda dslash_staggered dslash_twisted_clover dslash_twisted_mass dslash_wilson extended_color_spinor_utilities extract_gauge_ghost extract_gauge_ghost_extended fermion_force_quda gauge_ape gauge_force_quda gauge_phase gauge_plaq gauge_update_quda hisq_paths_force_quda ks_force_quda llfat_quda max_gauge misc_helpers reduce_quda shift_quark_field staggered_oprod unitarize_force_quda unitarize_links_qudaBLAS (Basic Linear Algebra Subprograms) represents the vector-vector and matrix-vector operations in QUDA.
To speed up matrix operations while maintaining numerical accuracy, QUDA allows you to have floating points with mixed precision: quarter precision, half (16-bit block floating point), single, and double.
Here is the output of blas_test showing these mixed precisions.
# blas_test
running the following test:
S_dimension T_dimension Nspin
24/24/24 24 0
Grid partition info: X Y Z T
0 0 0 0
Found device 0: GeForce GTX TITAN X
Using device 0: GeForce GTX TITAN X
Loaded 1 sets of cached parameters from /tmp/junk/tunecache.tsv
Benchmarking half precision with 10 iterations...
copyHS : Gflop/s = 0.0, GB/s = 239.1
copyLS : Gflop/s = 0.0, GB/s = 247.4
axpby : Gflop/s = 101.8, GB/s = 220.5
xpy : Gflop/s = 37.8, GB/s = 245.8
axpy : Gflop/s = 76.4, GB/s = 248.2
xpay : Gflop/s = 75.8, GB/s = 246.3
mxpy : Gflop/s = 37.8, GB/s = 245.6
ax : Gflop/s = 54.5, GB/s = 236.2
caxpy : Gflop/s = 151.9, GB/s = 246.8
caxpby : Gflop/s = 241.5, GB/s = 224.3
cxpaypbz : Gflop/s = 231.7, GB/s = 251.0
axpyBzpcx : Gflop/s = 202.6, GB/s = 219.5
axpyZpbx : Gflop/s = 177.0, GB/s = 239.7
caxpbypzYmbw : Gflop/s = 228.1, GB/s = 247.1
cabxpyAx : Gflop/s = 134.3, GB/s = 232.9
caxpbypz : Gflop/s = 143.1, GB/s = 248.0
caxpbypczpw : Gflop/s = 106.0, GB/s = 183.7
caxpyXmaz : Gflop/s = 172.1, GB/s = 233.1
norm : Gflop/s = 170.8, GB/s = 185.1
reDotProduct : Gflop/s = 105.1, GB/s = 227.6
axpyNorm : Gflop/s = 136.4, GB/s = 221.7
xmyNorm : Gflop/s = 104.7, GB/s = 226.9
caxpyNorm : Gflop/s = 181.7, GB/s = 196.8
caxpyXmazNormX : Gflop/s = 208.0, GB/s = 225.4
cabxpyAxNorm : Gflop/s = 255.0, GB/s = 221.0
cDotProduct : Gflop/s = 201.8, GB/s = 218.6
xpaycDotzy : Gflop/s = 159.3, GB/s = 230.2
caxpyDotzy : Gflop/s = 212.8, GB/s = 230.5
cDotProductNormA : Gflop/s = 282.4, GB/s = 204.0
cDotProductNormB : Gflop/s = 283.0, GB/s = 204.4
caxpbypzYmbwcDotProductWYNormY : Gflop/s = 257.4, GB/s = 216.9
HeavyQuarkResidualNorm : Gflop/s = 183.0, GB/s = 198.2
Benchmarking single precision with 10 iterations...
copyHS : Gflop/s = 0.0, GB/s = 250.6
copyLS : Gflop/s = 0.0, GB/s = 236.6
axpby : Gflop/s = 64.6, GB/s = 258.5
xpy : Gflop/s = 21.1, GB/s = 253.3
axpy : Gflop/s = 43.1, GB/s = 258.6
xpay : Gflop/s = 43.2, GB/s = 258.9
mxpy : Gflop/s = 21.7, GB/s = 260.4
ax : Gflop/s = 30.9, GB/s = 247.4
caxpy : Gflop/s = 86.6, GB/s = 259.8
caxpby : Gflop/s = 151.5, GB/s = 259.8
cxpaypbz : Gflop/s = 131.7, GB/s = 263.4
axpyBzpcx : Gflop/s = 123.9, GB/s = 247.9
axpyZpbx : Gflop/s = 100.0, GB/s = 250.1
caxpbypzYmbw : Gflop/s = 131.0, GB/s = 262.1
cabxpyAx : Gflop/s = 79.8, GB/s = 255.2
caxpbypz : Gflop/s = 82.9, GB/s = 265.2
caxpbypczpw : Gflop/s = 65.2, GB/s = 208.7
caxpyXmaz : Gflop/s = 103.9, GB/s = 259.8
norm : Gflop/s = 115.4, GB/s = 230.7
reDotProduct : Gflop/s = 59.7, GB/s = 238.7
axpyNorm : Gflop/s = 74.4, GB/s = 223.3
xmyNorm : Gflop/s = 59.4, GB/s = 237.7
caxpyNorm : Gflop/s = 123.6, GB/s = 247.3
caxpyXmazNormX : Gflop/s = 126.0, GB/s = 252.1
cabxpyAxNorm : Gflop/s = 149.9, GB/s = 239.9
cDotProduct : Gflop/s = 126.0, GB/s = 252.1
xpaycDotzy : Gflop/s = 92.1, GB/s = 245.5
caxpyDotzy : Gflop/s = 116.8, GB/s = 233.5
cDotProductNormA : Gflop/s = 185.7, GB/s = 247.6
cDotProductNormB : Gflop/s = 186.8, GB/s = 249.0
caxpbypzYmbwcDotProductWYNormY : Gflop/s = 164.7, GB/s = 256.2
HeavyQuarkResidualNorm : Gflop/s = 122.7, GB/s = 245.5
Benchmarking double precision with 10 iterations...
copyHS : Gflop/s = 0.0, GB/s = 252.3
copyLS : Gflop/s = 0.0, GB/s = 241.8
axpby : Gflop/s = 31.3, GB/s = 250.6
xpy : Gflop/s = 10.9, GB/s = 262.8
axpy : Gflop/s = 21.1, GB/s = 253.3
xpay : Gflop/s = 21.7, GB/s = 260.0
mxpy : Gflop/s = 11.0, GB/s = 263.4
ax : Gflop/s = 15.9, GB/s = 255.0
caxpy : Gflop/s = 43.8, GB/s = 262.7
caxpby : Gflop/s = 76.2, GB/s = 261.4
cxpaypbz : Gflop/s = 64.5, GB/s = 258.0
axpyBzpcx : Gflop/s = 62.6, GB/s = 250.2
axpyZpbx : Gflop/s = 52.2, GB/s = 260.9
caxpbypzYmbw : Gflop/s = 65.4, GB/s = 261.4
cabxpyAx : Gflop/s = 39.9, GB/s = 255.5
caxpbypz : Gflop/s = 41.2, GB/s = 263.8
caxpbypczpw : Gflop/s = 33.5, GB/s = 214.2
caxpyXmaz : Gflop/s = 49.5, GB/s = 247.4
norm : Gflop/s = 63.4, GB/s = 253.7
reDotProduct : Gflop/s = 32.1, GB/s = 256.8
axpyNorm : Gflop/s = 40.2, GB/s = 241.2
xmyNorm : Gflop/s = 30.0, GB/s = 240.1
caxpyNorm : Gflop/s = 63.2, GB/s = 252.9
caxpyXmazNormX : Gflop/s = 61.2, GB/s = 244.9
cabxpyAxNorm : Gflop/s = 77.1, GB/s = 246.7
cDotProduct : Gflop/s = 64.0, GB/s = 256.1
xpaycDotzy : Gflop/s = 47.6, GB/s = 253.7
caxpyDotzy : Gflop/s = 64.2, GB/s = 256.6
cDotProductNormA : Gflop/s = 95.1, GB/s = 253.6
cDotProductNormB : Gflop/s = 97.4, GB/s = 259.6
caxpbypzYmbwcDotProductWYNormY : Gflop/s = 81.7, GB/s = 254.3
HeavyQuarkResidualNorm : Gflop/s = 58.9, GB/s = 235.7
[==========] Running 96 tests from 96 test cases.
[----------] Global test environment set-up.
[----------] 1 test from copyHS_half/BlasTest
[ RUN ] copyHS_half/BlasTest.verify/0
copyHS error = 5.035899e-05
[ OK ] copyHS_half/BlasTest.verify/0 (301 ms)
[----------] 1 test from copyHS_half/BlasTest (301 ms total)
[----------] 1 test from copyLS_half/BlasTest
[ RUN ] copyLS_half/BlasTest.verify/0
copyLS error = 4.709370e-05
[ OK ] copyLS_half/BlasTest.verify/0 (295 ms)
[----------] 1 test from copyLS_half/BlasTest (295 ms total)
...
This section is not included in the SAMPLE PREVIEW.
To reduce the memory footprint and the number of floating-point operations per site, it is possible to transform the Dirac equation reducing the system down to a single spin or 1-component complex fields per lattice site.
Compare this to Wilson-type fermions that use 4 × 4 Dirac spin structures, making staggered Dslash incredibly fast but highly memory-bandwidth bound.
# stagerred_dslash
running the following test:
prec recon test_type dagger S_dim T_dimension
single 18 0 0 24/24/24 24
Grid partition info: X Y Z T
0 0 0 0
Found device 0: GeForce GTX TITAN X
Using device 0: GeForce GTX TITAN X
WARNING: Failed to determine NUMA affinity for device 0 (possibly not applicable)
WARNING: The path "/tmp/junk" specified by QUDA_RESOURCE_PATH does not exist or is not a directory.
WARNING: Caching of tuned parameters will be disabled.
Randomizing fields ...
Fat links sending...Fat links sent
Long links sending...Long links sent...
Sending fields to GPU...Creating cudaSpinor
Creating cudaSpinorOut
Sending spinor field to GPU
Source CPU = 331535.911710, CUDA=331535.911760
Creating a DiracImprovedStaggeredPC operator
Tuning...
Tuned block=(32,1,1), shared=7022 giving 246.23 Gflop/s, 0.00 GB/s for N4quda19StaggeredDslashCudaI6float2S1_6float4fEE
with type=single-GPU,reconstruct=18
Executing 100 kernel loops...
77.343740ms per loop
Calculating reference implementation...done.
GFLOPS = 248.253738
GB/s = 247.082669
Tuned block=(224,1,1), grid=(174,1,1), shared=1792 giving 74.38 Gflop/s, 148.77 GB/s for N4quda5Norm2Id6float2S1_EE
with vol=165888,stride=179712,precision=4
Results: CPU = 371887968.146624, CUDA=371887968.095154, CPU-CUDA = 371887968.081692
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from dslash
[ RUN ] dslash.verify
0 fails = 0
1 fails = 0
2 fails = 0
3 fails = 0
4 fails = 0
5 fails = 0
1.000000e-01 Failures: 0 / 995328 = 0.000000e+00
1.000000e-02 Failures: 0 / 995328 = 0.000000e+00
1.000000e-03 Failures: 0 / 995328 = 0.000000e+00
1.000000e-04 Failures: 0 / 995328 = 0.000000e+00
1.000000e-05 Failures: 1 / 995328 = 1.004694e-06
1.000000e-06 Failures: 383055 / 995328 = 3.848530e-01
1.000000e-07 Failures: 921451 / 995328 = 9.257762e-01
1.000000e-08 Failures: 988039 / 995328 = 9.926768e-01
1.000000e-09 Failures: 994576 / 995328 = 9.992445e-01
1.000000e-10 Failures: 995261 / 995328 = 9.999327e-01
1.000000e-11 Failures: 995322 / 995328 = 9.999940e-01
1.000000e-12 Failures: 995328 / 995328 = 1.000000e+00
1.000000e-13 Failures: 995328 / 995328 = 1.000000e+00
1.000000e-14 Failures: 995328 / 995328 = 1.000000e+00
1.000000e-15 Failures: 995328 / 995328 = 1.000000e+00
1.000000e-16 Failures: 995328 / 995328 = 1.000000e+00
[ OK ] dslash.verify (876 ms)
[----------] 1 test from dslash (876 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (876 ms total)
[ PASSED ] 1 test.
initQuda Total time = 2.45735 secs
loadGaugeQuda Total time = 0.220196 secs
download = 0.184582 secs ( 83.8%), with 2 calls at 9.229100e+04 us per call
init = 0.034531 secs ( 15.7%), with 2 calls at 1.726550e+04 us per call
compute = 0.000001 secs (0.000454%), with 2 calls at 5.000000e-01 us per call
free = 0.001079 secs ( 0.49%), with 2 calls at 5.395000e+02 us per call
total accounted = 0.220193 secs ( 100%)
total missing = 0.000003 secs (0.00136%)
endQuda Total time = 0.108361 secs
Device memory used = 227.8 MB
Page-locked host memory used = 120.8 MB
Total host memory used >= 185.1 MB
accuracy_level =0
This section is not included in the SAMPLE PREVIEW.
Elements of the SU3 matrix are kept in registers as long as possible to avoid redundant cache lookups when multiplying multiple spin components (in Wilson-type actions). Complex matrix multiplications are broken down into real-valued arithmetic structures natively supported by GPU fused Multiply-Add (FMA): QUDA structures these equations so they compile directly into high-throughput hardware FMA instructions.
With SU3 gauge compression, the matrix is parameterized into 8 real angles/phases. The remaining elements are mathematically reconstructed inside the CUDA kernel. While this demands more floating-point calculations, it slashes the memory bandwidth footprint by more than 50% compared to uncompressed storage.
This section is not included in the SAMPLE PREVIEW.