Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
faa76d8
ci: added mi300 tests on beverin
Mar 9, 2026
be4b0b1
Beverin uses a different authentification mechanism
Mar 11, 2026
02c82ce
Add client ID and secret to beverin pipeline
chaoos Mar 11, 2026
f6ba11d
pass right compiler flags for gh200 or mi300
Mar 11, 2026
4737a9d
Update 00-variables.yml
mtaillefumier Mar 11, 2026
0a5445f
Fix variable names for beverin pipeline secrets
mtaillefumier Mar 11, 2026
6a2e926
Add SLURM_TIMELIMIT variable to build stage
mtaillefumier Mar 11, 2026
d2ff7b8
CMake support
Oct 14, 2025
44b5c0b
Use TM_BLA for #ifdef flags
Feb 9, 2026
6d1e3d7
[cmake] More work
Feb 10, 2026
978fb30
Removed FindLemon.cmake
Feb 12, 2026
f948411
[cmake] More work
Feb 16, 2026
d945c80
Improvements
Feb 17, 2026
6491f11
Added basic documentation
Feb 19, 2026
2ec6afe
Add alignment detection at configuration time
Feb 24, 2026
174add7
Build DDalphaAMG automatically when DDalphaAMG is enabled
Feb 24, 2026
d3e0242
Remove comment
Mar 11, 2026
c0afb1e
Remove explicit reference to lemon include directory as Lemon uses ta…
Mar 11, 2026
dc63083
Rename file_body.c to file_body.inc
Mar 11, 2026
31cc894
More cleanup
Mar 11, 2026
c48d6cf
More cleanup
Mar 13, 2026
959f358
Fix typo in the ci/cd cmake command line
Mar 16, 2026
e0b3e02
Add HIP language support and dependencies
mtaillefumier Mar 19, 2026
5f5d51c
Fix include directories
Mar 19, 2026
010a063
Revert changes
Mar 20, 2026
9bb1164
Add cmake version 4 to environments.yaml
mtaillefumier Mar 20, 2026
7350295
Update UENV_TAG to version v0.0.7
chaoos Mar 20, 2026
51dc1e5
downgrade to cmake 3 something
Mar 20, 2026
8041586
Fix an issue with QUDA and HIP
Mar 23, 2026
0c4210a
Update the README.md
Mar 23, 2026
cfe38bd
update lemon hash tag to the latest version
Mar 23, 2026
5c00e8a
Fix typos
Mar 24, 2026
a3f85c7
Remove tmLQCD package.py
Mar 24, 2026
4420f6a
Remove autotools support from package.py
Mar 24, 2026
25a19cc
use stringent solver precisions for ddalphaamg CI workflow
kostrzewa Mar 24, 2026
7fc11ef
make the DDalphaAMG workflow more stringent
kostrzewa Mar 24, 2026
2436434
Update the CI/CD
Mar 24, 2026
e641c52
Use CMake 3.26 as default
Mar 26, 2026
c35a98f
Fix compilation issues
Mar 27, 2026
65725e2
Update src/lib/init/init_stout_smear_vars.c
mtaillefumier Mar 27, 2026
6970e4d
Fix compilation issues
Mar 27, 2026
8654432
Update .ci/uenv-recipes/tmlqcd/daint-gh200/repo/packages/tmlqcd/packa…
mtaillefumier Mar 27, 2026
716e021
Remove comment
Mar 27, 2026
919d565
Removed duplicate file
Mar 27, 2026
bf2b048
include hopping.h in tm_[sub,times]_Hopping_Matrix.c and include hopp…
kostrzewa Mar 27, 2026
215b8cd
adjusted beverin pipeline
Mar 30, 2026
e99c378
fixed tmlqcd environment
Mar 30, 2026
8fe5498
lemonio is now a CmakePackage in spack
Mar 30, 2026
13ec95d
tmlqcd spack package
Mar 30, 2026
c9d6609
added quda spack package
Mar 30, 2026
0dce3da
add beverin sample input file
Mar 30, 2026
679963d
fix yaml syntax error
Mar 30, 2026
f606802
bump ci version
Mar 30, 2026
c83eb69
fix job dependencies
Mar 31, 2026
b45067d
add path to qudas spack package to not expose ${ROCM_PATH}/include/hi…
Mar 31, 2026
3420f79
use hipcc in tmlqcd spack apckage if +rocm, use llvm-openmp if +rocm+…
Mar 31, 2026
86c19c4
add back openmp to ci pipeline
Mar 31, 2026
7238b32
corrected path in .test/hmc
Mar 31, 2026
9ef2d9f
added todo note
Mar 31, 2026
a5452ae
correct uenv image passing
Mar 31, 2026
e171c66
added debug prints in ci
Mar 31, 2026
3af655c
make executable
Mar 31, 2026
75f25b4
scope=spack
Mar 31, 2026
0ca0f5e
increase slurm timelimit ro 1h
Mar 31, 2026
72fdbc9
Merge remote-tracking branch 'fork/cmake_support' into feature/cicd-m…
Apr 1, 2026
c65f4a8
fixed path in test job
Apr 1, 2026
bbe7ae0
add quda to artifacts, add libquda dir to LD_LIBRARY_PATH in CI
Apr 1, 2026
1cd1c8a
adjust bindir path, and SLURM_LOCALID -> SLURM_PROCID
Apr 1, 2026
e82eeab
test job timelimit 30min -> 1h
Apr 1, 2026
4c777bf
local procid = 0 has to unpack
Apr 1, 2026
3f7d789
more verbosity in CI
Apr 2, 2026
9d1ac36
adjust beverin input file to match daint input file
Apr 2, 2026
4d2dd2e
removed noise in CI output, added after_script for output check
Apr 2, 2026
db0446b
moved hmc check into after_script
Apr 2, 2026
9c7a5b6
generic build script
Apr 2, 2026
3894d48
adjusted permissions
Apr 2, 2026
97d3110
adjusted CSCS gh200 pipeline to match mi300 pipeline
Apr 2, 2026
0929eaf
remove v2.2 from daint repo.yaml
Apr 2, 2026
3427c50
tidy up and move numdiff check back to script (from after_script)
Apr 2, 2026
8a7042d
add back brackets and quotes
Apr 2, 2026
da1082a
updated README with new features
Apr 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
30 changes: 23 additions & 7 deletions .ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,39 @@ This document describes the external pipeline executed through CSCS.
The pipeline can be triggered by commenting on a pull request with

```
cscs-ci run default # runs the default pipeline
cscs-ci run default # runs the default pipeline (on GH200 nodes @ CSCS)
cscs-ci run beverin # runs the beverin pipeline (on MI300A nodes @ CSCS)
```

An automatic trigger on all merge-requests is currently disabled.

This pipeline has 2 stages: `build` and `test`.
This pipeline has 3 stages: `prepare`, `build` and `test`.

The `build` stage builds a uenv image that includes all necessary compilers, MPI libraries and other dependecies to build QUDA and tmLQCD against QUDA. In this stage, QUDA is built correctly for the GH200 machine at CSCS with all required build flags for production runs. The uenv recipe can be found [here](uenv-recipes/tmlqcd/daint-gh200).
## `prepare` stage

In the `test` stage, the aforementioned uenv image is loaded, tmLQCD is built and linked against the QUDA library that is inside the image. Finally a minimal HMC is executed and checked against some reference data.
The `prepare` stage builds an uenv image that includes all necessary compilers, MPI libraries and other dependecies to build QUDA and tmLQCD against QUDA. The uenv recipe can be found [here for GH200](uenv-recipes/tmlqcd/daint-gh200) and [here for MI300A](uenv-recipes/tmlqcd/beverin-mi300).

## Force recompilation of quda
## `build` stage

In the `build` stage, the aforementioned uenv image is loaded, tmLQCD and QUDA are built using their spack packages using the dependencies from the base image. This stage exposes an artifact with tmLQCD/QUDA binaries. For tmLQCD, the current branch is compiled. For QUDA the following environment variables are respected:

* `QUDA_GIT_REPO`: the git repository URL to use as source (defaults to `https://github.com/lattice/quda.git`)
* `QUDA_GIT_BRANCH`: the git branch to compile (defaults to `develop`)
* `QUDA_GIT_COMMIT`: the git commit to compile (defaults to the current head commit of `QUDA_GIT_BRANCH`)

Then QUDA is cloned and compiled, completely bypassing the spack compile cache.

## `test` stage

In the `test` stage, the aforementioned uenv image is loaded, tmLQCD and QUDA are unpacked from the artifact. Finally a minimal HMC is executed and checked against some reference data.

## Force recompilation of base image in `prepare` stage

Remove the build cache:

```bash
/capstor/scratch/cscs/${USER}/uenv-cache/user-environment/build_cache/linux-sles15-neoverse_v2/gcc-13.2.0/quda-*
/capstor/scratch/cscs/${USER}/uenv-cache/user-environment/build_cache/linux-sles15-neoverse_v2-gcc-13.2.0-quda*
/capstor/scratch/cscs/${USER}/uenv-cache/user-environment/build_cache/linux-sles15-neoverse_v2/gcc-13.2.0/tmlqcd-*
/capstor/scratch/cscs/${USER}/uenv-cache/user-environment/build_cache/linux-sles15-neoverse_v2-gcc-13.2.0-tmlqcd*
```

Or increment the the version counter tag in [.ci/include/cscs/00-variables.yml](include/cscs/00-variables.yml):
Expand All @@ -46,3 +61,4 @@ and commit.
* [CSCS Uenv Writing Documentation](https://eth-cscs.github.io/alps-uenv/)
* [CSCS Status Page](https://status.cscs.ch/)
* [CSCS Spack Base Containers](https://github.com/orgs/eth-cscs/packages/container/package/docker-ci-ext%2Fspack-base-containers%2Fspack-build)
* [Sirius CI/CD](https://github.com/electronic-structure/SIRIUS/tree/develop/ci) where this one is based upon
52 changes: 52 additions & 0 deletions .ci/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/bin/bash

set -xeuo pipefail

export SPACK_SYSTEM_CONFIG_PATH="/user-environment/config"
export SPACK_PYTHON="$(which python3.6)" # must be <=3.12, system python is 3.6
export CICD_SRC_DIR="$PWD"
export QUDA_SRC_DIR="$PWD/deps/src/quda"

# QUDA git, branch and commit
export QUDA_GIT_REPO="${QUDA_GIT_REPO:=https://github.com/lattice/quda.git}"
export QUDA_GIT_BRANCH="${QUDA_GIT_BRANCH:=develop}"
export QUDA_GIT_COMMIT="${QUDA_GIT_COMMIT:=$(git ls-remote ${QUDA_GIT_REPO} refs/heads/${QUDA_GIT_BRANCH} | awk '{print $1}')}"

# obtain QUDA
git clone -b "${QUDA_GIT_BRANCH}" "${QUDA_GIT_REPO}" "${QUDA_SRC_DIR}"
git -C "${QUDA_SRC_DIR}" checkout "${QUDA_GIT_COMMIT}"

# make sure we keep the stage direcorty
spack config --scope=spack add config:build_stage:/dev/shm/spack-stage
# we might need to install dependencies too, e.g. nlcglib in case of API changes
spack config --scope=spack add config:install_tree:root:/dev/shm/spack-stage

spack env create -d ./spack-env

# add local repository with current tmlqcd recipe
spack -e ./spack-env repo add "${REPO}"

spack -e ./spack-env config add "packages:all:variants:[${VARIANTS}]"

spack -e ./spack-env add "${SPEC}"

# for tmlqcd use local src instead of fetch git
spack -e ./spack-env develop -p "${CICD_SRC_DIR}" tmlqcd@cicd

# for quda use local src instead of fetch git, to be able to tests against
# differnt repo, branch, commit and also to support that quda branch develop is
# a moving target
spack -e ./spack-env develop -p "${QUDA_SRC_DIR}" quda@cicd

# display spack.yaml
cat ./spack-env/spack.yaml

spack -e ./spack-env concretize
spack -e ./spack-env install

# the tar pipe below expects a relative path
builddir_tmlqcd=$(spack -e ./spack-env location -b tmlqcd)
builddir_quda=$(spack -e ./spack-env location -b quda)

# create a symlink to spack build directory (keep in artifacts)
tar -cf builddir.tar $builddir_tmlqcd $builddir_quda
52 changes: 52 additions & 0 deletions .ci/cscs_beverin_pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
include:
- remote: 'https://gitlab.com/cscs-ci/recipes/-/raw/master/templates/v2/.ci-ext.yml'
- local: '/.ci/include/cscs/00-variables.yml'
- local: '/.ci/include/cscs/01-build-templates.yml'
- local: '/.ci/include/cscs/02-test-templates.yml'


stages:
- prepare
- build
- test


build-base/uenv/beverin-mi300:
stage: prepare
extends: [.uenv-builder-beverin-mi300, .beverin-mi300-secrets]
variables:
UENV_RECIPE: .ci/uenv-recipes/tmlqcd/beverin-mi300
SLURM_TIMELIMIT: "08:00:00"


build-tmlqcd/uenv/beverin-mi300:
extends: [.uenv-runner-beverin-mi300, .build/base, .beverin-mi300-secrets]
needs: [build-base/uenv/beverin-mi300]
variables:
SPEC: "tmlqcd@cicd +lemon +quda ^quda@cicd +qdp +multigrid +twisted_clover +twisted_mass"
REPO: "./.ci/uenv-recipes/tmlqcd/beverin-mi300/repo/"
VARIANTS: "amdgpu_target=gfx942,amdgpu_target_sram_ecc=gfx942,+rocm,+mpi"
SLURM_TIMELIMIT: "01:00:00"


test/beverin-mi300:
extends: [.uenv-runner-beverin-mi300, .test/base, .beverin-mi300-secrets]
needs: [build-tmlqcd/uenv/beverin-mi300]
variables:
REFPATH: "doc/sample-output/hmc-quda-cscs"
QUDA_ENABLE_TUNING: 0 # disable tuning
QUDA_ENABLE_P2P: 0 # disable P2P
SLURM_JOB_NUM_NODES: 2
SLURM_NTASKS: 8
SLURM_TIMELIMIT: "01:00:00"
script:
- hmc_tm -f doc/sample-input/sample-hmc-quda-cscs-beverin.input
- |
if test "${SLURM_PROCID}" -eq "0"; then
echo "Check the results on SLURM_PROCID=${SLURM_PROCID} ..."
numdiff -r 1.2e-6 -X 1:22 -X 1:5-21 -X 2:22 -X 2:5-21 output.data ${REFPATH}/output.data
for i in $(seq 0 2 18); do
f=onlinemeas.$(printf %06d $i);
numdiff -r 5e-4 ${f} ${REFPATH}/${f};
done
fi
41 changes: 34 additions & 7 deletions .ci/cscs_default_pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,52 @@
include:
- remote: 'https://gitlab.com/cscs-ci/recipes/-/raw/master/templates/v2/.ci-ext.yml'
- local: '/.ci/include/cscs/00-variables.yml'
- local: '/.ci/include/cscs/01-test-templates.yml'
- local: '/.ci/include/cscs/01-build-templates.yml'
- local: '/.ci/include/cscs/02-test-templates.yml'


stages:
- prepare
- build
- test

build-quda/uenv/daint-gh200:
stage: build

build-base/uenv/daint-gh200:
stage: prepare
extends: .uenv-builder-daint-gh200
variables:
UENV_RECIPE: .ci/uenv-recipes/tmlqcd/daint-gh200
SLURM_TIMELIMIT: "04:00:00"


build-tmlqcd/uenv/daint-gh200:
extends: [.uenv-runner-daint-gh200, .build/base]
needs: [build-base/uenv/daint-gh200]
variables:
SPEC: "tmlqcd@cicd +lemon +quda ^quda@cicd +qdp +multigrid +twisted_clover +twisted_mass"
REPO: "./.ci/uenv-recipes/tmlqcd/daint-gh200/repo/"
VARIANTS: "cuda_arch=90,+cuda,+mpi"
SLURM_TIMELIMIT: "01:00:00"


test/daint-gh200:
extends: .test/hmc
extends: [.uenv-runner-daint-gh200, .test/base]
needs: [build-tmlqcd/uenv/daint-gh200]
variables:
INPUT_FILE: "doc/sample-input/sample-hmc-quda-cscs.input"
REFPATH: "doc/sample-output/hmc-quda-cscs"
QUDA_ENABLE_TUNING: 0 # disable tuning
QUDA_ENABLE_GDR: 1 # enable GPU-Direct RDMA
QUDA_ENABLE_GDR: 0 # enable GPU-Direct RDMA
SLURM_JOB_NUM_NODES: 2
SLURM_NTASKS: 8
SLURM_TIMELIMIT: "00:30:00"
SLURM_TIMELIMIT: "01:00:00"
script:
- hmc_tm -f doc/sample-input/sample-hmc-quda-cscs.input
- |
if test "${SLURM_PROCID}" -eq "0"; then
echo "Check the results on SLURM_PROCID=${SLURM_PROCID} ..."
numdiff -r 1.2e-6 -X 1:22 -X 1:5-21 -X 2:22 -X 2:5-21 output.data ${REFPATH}/output.data
for i in $(seq 0 2 18); do
f=onlinemeas.$(printf %06d $i);
numdiff -r 5e-4 ${f} ${REFPATH}/${f};
done
fi
7 changes: 6 additions & 1 deletion .ci/include/cscs/00-variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,10 @@
variables:
UENV_NAME: tmlqcd
UENV_VERSION: experimental
UENV_TAG: v0.0.6
UENV_TAG: v0.0.8

# These are the firecrest id and secret for the beverin pipeline
.beverin-mi300-secrets:
variables:
F7T_CLIENT_ID: $F7T_TDS_CONSUMER_KEY
F7T_CLIENT_SECRET: $F7T_TDS_CONSUMER_SECRET
17 changes: 17 additions & 0 deletions .ci/include/cscs/01-build-templates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
include:
- remote: 'https://gitlab.com/cscs-ci/recipes/-/raw/master/templates/v2/.ci-ext.yml'


.build/base:
stage: build
image: ${UENV_NAME}/${UENV_VERSION}:${UENV_TAG}
artifacts:
paths:
- builddir.tar
variables:
SLURM_TIMELIMIT: "01:00:00"
script:
- git clone --filter=tree:0 $(jq -r .spack.repo /user-environment/meta/configure.json) /dev/shm/spack-clone
- git -C /dev/shm/spack-clone checkout $(jq -r .spack.commit /user-environment/meta/configure.json)
- source /dev/shm/spack-clone/share/spack/setup-env.sh
- bwrap --dev-bind / / --tmpfs ~ -- ./.ci/build.sh
54 changes: 0 additions & 54 deletions .ci/include/cscs/01-test-templates.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .ci/include/cscs/02-test-templates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
include:
- remote: 'https://gitlab.com/cscs-ci/recipes/-/raw/master/templates/v2/.ci-ext.yml'


.test/base:
stage: test
image: ${UENV_NAME}/${UENV_VERSION}:${UENV_TAG}
variables:
WITH_UENV_VIEW: "default"
before_script:
- |
if test "${SLURM_LOCALID}" -eq "0"; then
tar xf ./builddir.tar -C /
touch preparation-done-${CI_JOB_ID}
fi
- while test ! -f preparation-done-${CI_JOB_ID}; do sleep 5; done
- bindir=$(echo /dev/shm/spack-stage/*/spack-stage-tmlqcd-cicd-*/spack-build-*/src/bin)
- libdir=$(dirname $(echo /dev/shm/spack-stage/*/spack-stage-quda-cicd-*/spack-build-*/lib/libquda.so))
- export PATH=:${bindir}:$PATH
- export LD_LIBRARY_PATH=:${libdir}:$LD_LIBRARY_PATH
13 changes: 7 additions & 6 deletions ...nt-gh200/repo/packages/lemonio/package.py → .ci/spack_packages/lemonio/package.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack_repo.builtin.build_systems.autotools import AutotoolsPackage
from spack_repo.builtin.build_systems import cmake
from spack_repo.builtin.build_systems.cmake import CMakePackage, generator


from spack.package import *

class Lemonio(AutotoolsPackage):
class Lemonio(CMakePackage):
"""LEMON: Lightweight Parallel I/O library for Lattice QCD."""

homepage = "https://github.com/etmc/lemon"
Expand All @@ -16,13 +17,13 @@ class Lemonio(AutotoolsPackage):

version('master', branch='master')

depends_on("autoconf", type="build", when="@master build_system=autotools")
depends_on("automake", type="build", when="@master build_system=autotools")
depends_on("libtool", type="build", when="@master build_system=autotools")
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("fortran", type="build")

depends_on('mpi')
generator("ninja")

def configure_args(self):
args = []
args.append('CC={0}'.format(self.spec['mpi'].mpicc))
return args
Loading
Loading