Skip to content
A next-generation conjugate gradient benchmark from computational particle physics
C Other
  1. C 98.2%
  2. Other 1.8%
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
sombrero fix logic to allow running on multiple of 3 processes May 12, 2019
.gitignore first public release Apr 8, 2019
Makefile correct download link Apr 15, 2019


A benchmarking utility for high performance computing based on lattice field theory applications.


Requires an MPI library and compiler.

Set Up

  1. Clone the repository
git clone
cd sombrero
  1. Edit Make/MkFlags to set the compiler, CFLAGS and linker flags
  2. To compile run


To run all benchmarks use the script

./ -n <num-cores>  [ -w ] [ -s small | medium | large | very_large ]

By default this will run a medium scale problem using <num-cores> mpi ranks. The problem size independent of the number of processes. This is useful for strong scaling.

All output is printed to stdout and error messages to stderr.


-n <num-cores>:
    Set the number of mpi ranks. SOMBRERO will attempt to divide the problem accross the ranks automatically. The number of ranks num-cores should be a power of 2, num-cores = 2^n. This can be multiplied by a factor of 3, num-cores = 3 * 2^n.

-s small | medium | large | very_large:
    Specify the problem size. Compatible with weak or strong scaling.

./ -n Np -s large

    Weak scaling. The problem size will be a multiple of the number of MPI ranks.

./ -n Np -w 

By default a small local problem size is used, requiring maximal communication. A larger local problem size can be set as in the strong scaling case, for example

./ -n Np -w -s medium

Note that for the medium and large cases a minimum of 4 MPI ranks is required.

Example Slurm Script

An example job script for a strong scaling study:

#SBATCH --ntasks=256
#SBATCH --job-name=sombrero_strong
#SBATCH --time=0-0:20
#SBATCH --ntasks-per-node=32


./ -n $SLURM_NTASKS -s medium > strong_$n

A weak scaling example:

#SBATCH --ntasks=128
#SBATCH --job-name=sombrero_strong
#SBATCH --time=0-0:20
#SBATCH --ntasks-per-node=32


./ -n $SLURM_NTASKS -w -s small > weak_$n


SOMBRERO runs 6 benchmarks, each representing a theory in under active study by the lattice field theory community. For the purposes of benchmarking, the models vary only in the amount of data communicated and the number of floating point operation required. Since the exact numbers depend on the problem size and the number of ranks, they are printed for each case.

The theories are

Case 1: Two color QCD (Quantum Chronodynamics)

Case 2: Two color QCD with adjoint fermions

Case 3: QCD

Case 4: Symplectic four color QCD

Case 5: QCD with sextet fermions

Case 6: Symplectic four color QCD with adjoint fermions


Additional parameters -l and -p exist for more precise control of the problem size. The benchmark theories are defined on a four dimensional lattice, which is partitioned equally among the MPI ranks.

-l NxNxNxN:
    Set the lattice size in each direction. Replace each N with an integer larger or equal to 4.

-p NxNxNxN:
    Manually partition the lattice among the mpi ranks. The lattice is divided accross N ranks in each direction. A positive integer must be used.

Once compiled, binaries for individual test cases can be found in the sombrero folder. For example the case 3 can be run separately with

mpirun -n Np sombrero/sombrero3 -s medium 

The verbose mode will produce additional information:

mpirun -n Np sombrero/sombrero3 -s medium -v verbose 
You can’t perform that action at this time.