Qlua

Lua 5.1 with lattice QCD built in.

Qlua is an interpreter for lattice QCD calculations. It is Lua 5.1 — the whole language, unchanged — with the lattice added to it: the QDP/C field types and their algebra, the file formats a calculation reads and writes, and a set of Level III inverters, all reachable as ordinary Lua values. A gauge field is a variable, a propagator is a variable, and the arithmetic between them is written the way it is written on paper.

A calculation is therefore a script rather than a program to be compiled, and the part of it that is physics stays the size of the physics. The parallelism is not in the script: Qlua runs under MPI across the whole machine, and a field operation is collective over the ranks that hold the lattice. What a script says is what is computed, not how it is distributed.

It is built for the machines lattice calculations actually run on: the build system ships targets for Wombat at MIT and for Perlmutter at NERSC, on CPUs and on GPUs, and writing a target for another cluster is a short file. It also builds and runs on a laptop, which is the way to learn it and to get a script right before it goes to a cluster. The documentation covers installation, a set of tutorials, and a reference manual for every name the interpreter answers to.

The USQCD software stack

Qlua does not reimplement the lattice. It is an application package on top of the USQCD SciDAC software stack — a suite of modules, developed under SciDAC and layered by level, that lets a lattice QCD computation run with high performance across a variety of architectures. Qlua is listed there among the applications built on it, beside Chroma, CPS, FUEL and MILC.

These are the modules a Qlua build draws on:

LevelModuleWhat it provides
1 QMP the message-passing layer the rest of the stack communicates through
1 QLA the per-site linear algebra — SU(3) matrices, spinors, and the operations on them
2 QDP/C lattice-wide data-parallel fields, which are the field types Qlua exposes
2 QIO record-oriented I/O in the community file formats
3 QOPQDP optimized inverters, including the QOPQDP multigrid solver
3 MDWF the Möbius domain wall fermion solver
3 QUDA the GPU inverters, in builds configured for them

Alongside these a build takes the clover and twisted-mass solvers, Lua itself, and the general-purpose libraries — GSL, LAPACK, ARPACK, HDF5 — that a calculation needs. The whole stack is built from one tarball, which is on the downloads page; the installation page says how. More about the collaboration is at usqcd.org.