Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
930839b
CMake support
Oct 14, 2025
6787970
Use TM_BLA for #ifdef flags
Feb 9, 2026
ee43ab0
[cmake] More work
Feb 10, 2026
ca36cfe
Removed FindLemon.cmake
Feb 12, 2026
7c37c40
[cmake] More work
Feb 16, 2026
3e4e536
Improvements
Feb 17, 2026
fd2baf0
Added basic documentation
Feb 19, 2026
44214a4
Add alignment detection at configuration time
Feb 24, 2026
541b0f5
Build DDalphaAMG automatically when DDalphaAMG is enabled
Feb 24, 2026
e90a558
Remove comment
Mar 11, 2026
493d25e
Remove explicit reference to lemon include directory as Lemon uses ta…
Mar 11, 2026
40e5c5d
Rename file_body.c to file_body.inc
Mar 11, 2026
08ff19d
More cleanup
Mar 11, 2026
962f52b
More cleanup
Mar 13, 2026
77840b4
Fix typo in the ci/cd cmake command line
Mar 16, 2026
fd4c0bc
Add HIP language support and dependencies
mtaillefumier Mar 19, 2026
8cc2bc2
Fix include directories
Mar 19, 2026
70e948e
Revert changes
Mar 20, 2026
725d118
Add cmake version 4 to environments.yaml
mtaillefumier Mar 20, 2026
07318c4
Update UENV_TAG to version v0.0.7
chaoos Mar 20, 2026
0c879bf
downgrade to cmake 3 something
Mar 20, 2026
ecda407
Fix an issue with QUDA and HIP
Mar 23, 2026
b67330e
Update the README.md
Mar 23, 2026
6f31a9f
update lemon hash tag to the latest version
Mar 23, 2026
7c07eb4
Fix typos
Mar 24, 2026
e1f6760
Remove tmLQCD package.py
Mar 24, 2026
a9983fb
Remove autotools support from package.py
Mar 24, 2026
fc47a07
use stringent solver precisions for ddalphaamg CI workflow
kostrzewa Mar 24, 2026
a1109c3
make the DDalphaAMG workflow more stringent
kostrzewa Mar 24, 2026
cac658f
Update the CI/CD
Mar 24, 2026
bc53cf0
Use CMake 3.26 as default
Mar 26, 2026
80e76a9
Fix compilation issues
Mar 27, 2026
5a06486
Update src/lib/init/init_stout_smear_vars.c
mtaillefumier Mar 27, 2026
4fc74dd
Fix compilation issues
Mar 27, 2026
0c747c7
Update .ci/uenv-recipes/tmlqcd/daint-gh200/repo/packages/tmlqcd/packa…
mtaillefumier Mar 27, 2026
2a1980d
Remove comment
Mar 27, 2026
2bb456a
Removed duplicate file
Mar 27, 2026
d68ffee
include hopping.h in tm_[sub,times]_Hopping_Matrix.c and include hopp…
kostrzewa Mar 27, 2026
b33899b
Created an alias DDalphaMG::DDalphaAMG
Apr 1, 2026
28b13f4
Update CMakeLists.txt
kostrzewa Apr 2, 2026
7855c2f
Update README.md
kostrzewa 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
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .ci/include/cscs/00-variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
variables:
UENV_NAME: tmlqcd
UENV_VERSION: experimental
UENV_TAG: v0.0.6

UENV_TAG: v0.0.7
UENV_VERSION: v1
37 changes: 18 additions & 19 deletions .ci/include/cscs/01-test-templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,31 @@ include:
image: ${UENV_NAME}/${UENV_VERSION}:${UENV_TAG}
variables:
WITH_UENV_VIEW: "default"
CFLAGS: "-O3 -fopenmp -mtune=neoverse-v2 -mcpu=neoverse-v2"
CXXFLAGS: "-O3 -fopenmp -mtune=neoverse-v2 -mcpu=neoverse-v2"
LDFLAGS: "-fopenmp"
# CFLAGS: "-O3 -fopenmp -mtune=neoverse-v2 -mcpu=neoverse-v2"
# CXXFLAGS: "-O3 -fopenmp -mtune=neoverse-v2 -mcpu=neoverse-v2"
# LDFLAGS: "-fopenmp"
before_script:
- |
if test "${SLURM_PROCID}" -eq "0"; then
export CC="$(which mpicc)"
export CXX="$(which mpicxx)"
mkdir -p install_dir
autoconf
./configure \
--enable-quda_experimental \
--enable-mpi \
--enable-omp \
--with-mpidimension=4 \
--disable-sse2 \
--disable-sse3 \
--enable-alignment=32 \
--with-qudadir="/user-environment/env/default" \
--with-limedir="/user-environment/env/default" \
--with-lemondir="/user-environment/env/default" \
--with-lapack="-lopenblas -L/user-environment/env/default/lib" \
--with-cudadir="/user-environment/env/default/lib64" \
--prefix="$(pwd)/install_dir"
mkdir -p build_dir
cd build_dir
cmake -DCMAKE_PREFIX_PATH="/user-environment/env/default" \
-DTM_USE_MPI=ON \
-DTM_USE_CUDA=ON \
-DCMAKE_C_CFLAGS="-O3 -mtune=neoverse-v2 -mcpu=neoverse-v2" \
-DCMAKE_CXX_FLAGS="-O3 -mtune=neoverse-v2 -mcpu=neoverse-v2" \
-DCMAKE_CUDA_ARCHITECTURES=90a \
-DTM_USE_OMP=ON \
-DTM_USE_QUDA=ON \
-DTM_USE_LEMON=ON \
-DTM_USE_GAUGE_COPY=ON \
-DTM_USE_HALFSPINOR=ON \
-DCMAKE_INSTALL_PREFIX=../install_dir ..
make
make install
cd ..
touch preparation-done-${CI_JOB_ID}
fi
- while test ! -f preparation-done-${CI_JOB_ID}; do sleep 5; done
Expand Down
2 changes: 1 addition & 1 deletion .ci/uenv-recipes/tmlqcd/daint-gh200/compilers.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
gcc:
version: "14.2"
version: "14.3"
4 changes: 2 additions & 2 deletions .ci/uenv-recipes/tmlqcd/daint-gh200/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: tmlqcd
store: /user-environment
spack:
repo: https://github.com/spack/spack.git
commit: releases/v1.0
commit: releases/v1.1
packages:
repo: https://github.com/spack/spack-packages.git
commit: releases/v2025.11
#commit:
modules: true
description: "tmLQCD is a freely available software suite providing a set of tools to be used in lattice QCD simulations."
version: 2
2 changes: 2 additions & 0 deletions .ci/uenv-recipes/tmlqcd/daint-gh200/environments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ gcc-env:
compiler: [gcc]
network:
mpi: cray-mpich@8.1.32 +cuda
specs: ['libfabric@2.4.0+cuda']
unify: true
specs:
- python@3.12
Expand All @@ -10,6 +11,7 @@ gcc-env:
- lemonio
- c-lime
- openblas
- cmake@3.31
- cuda
variants:
- +mpi
Expand Down
29 changes: 18 additions & 11 deletions .ci/uenv-recipes/tmlqcd/daint-gh200/repo/packages/lemonio/package.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,34 @@
#
# 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"
git = "https://github.com/etmc/lemon.git"
git = "https://github.com/etmc/lemon.git"
license("GPL-3.0-or-later")

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add the release tags (https://github.com/etmc/lemon/tags) as versions and we should tag a new one.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can tag a specific commit.

variant("shared", default=False, description="Build shared library")
depends_on("libtool", type="build", when="@master build_system=cmake")
depends_on("cmake@3.28:", type="build", when="@master build_system=cmake")

depends_on("mpi")

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")
generator("ninja")

depends_on('mpi')

def configure_args(self):
args = []
args.append('CC={0}'.format(self.spec['mpi'].mpicc))
class CMakeBuilder(cmake.CMakeBuilder):
def cmake_args(self):
spec = self.spec
args = [
self.define_from_variant("DBUILD_SHARED_LIBS", "shared"),
]
return args
116 changes: 116 additions & 0 deletions .ci/uenv-recipes/tmlqcd/daint-gh200/repo/packages/tmlqcd/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack_repo.builtin.build_systems import cmake
from spack_repo.builtin.build_systems.cmake import CMakePackage, generator
from spack_repo.builtin.build_systems.rocm import ROCmPackage
from spack_repo.builtin.build_systems.cuda import CudaPackage

from spack.package import *


class Tmlqcd(CMakePackage, CudaPackage, ROCmPackage):
"""Base class for building tmlQCD."""

homepage = "https://www.itkp.uni-bonn.de/~urbach/software.html"
url = "https://github.com/etmc/tmLQCD/archive/refs/tags/rel-5-1-6.tar.gz"
git = "https://github.com/etmc/tmLQCD.git"
license("GPL-3.0-or-later")

maintainers("mtaillefumier")
version("master", branch="master")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here; add release tags as versions.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you that if we were to distribute this file we would need a tag if the package is included in spack. For now there is none because I do not want to have to maintain the configure build system on top of cmake. We can update this as soon as we have a 6.0.3 version ready.

This file is ignored in practice as we build tmLQCD by hand. I only included it so that we have it in the main repository.


variant("lemon", default=False, description="Enable the lemon backend")
variant("mpi", default=True, description="Enable mpi support")
variant("DDalphaAMG", default=False, description="Enable DAlphaAMG support")
variant("openmp", default=True, description="Enable OpenMP")
variant("fftw", default=True, description="Enable FFTW interface")
variant(
"persistent_mpi",
default=True,
description="Enable persistent mpi calls for spinor and gauge fields",
when="+mpi",
)
variant(
"nonblocking_mpi",
default=True,
description="Enable non-blocking mpi calls for spinor and gauge fields",
when="+mpi",
)
variant("fixedvolume", default=True, description="Enable fixed volume at compile time")
variant(
"alignment",
default="auto",
values=("none", "auto", "16", "32", "64"),
description="Automatically or expliclty align arrays",
)
variant("gauge_copy", default=True, description="Enable gauge field copy")
variant("half_spinor", default=True, description="Use a Dirac operator with half-spinor")
variant("shared", default=False, description="Enable shared library")
variant("shmem", default=False, description="Use shmem API")
variant("quda", default=True, description="Enable the QUDA library", when="+cuda")
variant("quda", default=True, description="Enable the QUDA library", when="+rocm")
variant(
"QPhiX", default=False, description="Enable the QPhiX library for Intel Xeon and Xeon Phis"
)
variant(
"mpi_dimensions",
default="4",
values=("1", "2", "3", "4", "x", "xy", "xyz"),
description="number of dimensions the mpi processes are distributed. the default is parallelization over all four dimensions txyz",
when="+mpi",
)

generator("ninja")

# language dependencies
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("fortran", type="build")

# conflicts
conflicts("+cuda", when="cuda_arch=none")
conflicts("+rocm", when="amdgpu_target=none")
conflicts("+cuda +rocm", msg="CUDA and ROCm support are mutually exclusive")

Comment thread
mtaillefumier marked this conversation as resolved.
# hard dependencies
depends_on("c-lime")
depends_on("blas")
depends_on("lapack")
depends_on("pkgconfig", type="build")

# dependencies
depends_on("mpi", when="+mpi")
depends_on("lemon-io", when="+lemon")

with when("+quda"):
depends_on(
"quda+twisted_mass+twisted_clover+clover+ndeg_twisted_clover+ndeg_twisted_mass+wilson+qdp+staggered+usqcd+multigrid"
)

depends_on("quda+mpi", when="+mpi")
depends_on("quda+cuda", when="+cuda")
depends_on("quda+rocm", when="+rocm")

depends_on("fftw-api@3", when="+fftw")


class CMakeBuilder(cmake.CMakeBuilder):
def cmake_args(self):
spec = self.spec
args = [
self.define_from_variant("DBUILD_SHARED_LIBS", "shared"),
self.define_from_variant("TM_USE_LEMON", "lemon"),
self.define_from_variant("TM_USE_MPI", "mpi"),
self.define_from_variant("TM_USE_QUDA", "quda"),
self.define_from_variant("TM_USE_CUDA", "cuda"),
self.define_from_variant("TM_USE_HIP", "cuda"),
self.define_from_variant("TM_USE_FFTW", "fftw"),
self.define_from_variant("TM_FIXEDVOLUME", "fixed_volume"),
self.define_from_variant("TM_USE_OMP", "openmp"),
self.define_from_variant("TM_USE_SHMEM", "shmem"),
self.define_from_variant("TM_USE_GAUGE_COPY", "gauge_copy"),
self.define_from_variant("TM_USE_HALFSPINOR", "half_spinor"),
]
return args
1 change: 1 addition & 0 deletions .ci/uenv-recipes/tmlqcd/daint-gh200/repo/repo.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
repo:
namespace: apps
api: v2.2
38 changes: 14 additions & 24 deletions .github/workflows/basic-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ jobs:
repository: usqcd-software/c-lime
path: lime

- name: autogen_lime
- name: create_builddir_lime
Comment thread
kostrzewa marked this conversation as resolved.
working-directory: ${{github.workspace}}/lime
run: ./autogen.sh && mkdir build
run: mkdir build

- name: build_lime
working-directory: ${{github.workspace}}/lime/build
run: |
CC=gcc \
CFLAGS="-march=haswell -mtune=haswell -O2" \
../configure --prefix=$(pwd)/install_dir
cmake -DCMAKE_INSTALL_PREFIX=$(pwd)/install_dir .. >> config.log
make -j
make install

Expand All @@ -61,20 +61,19 @@ jobs:
repository: etmc/lemon
path: lemon

- name: autogen_lemon
- name: create_builddir_lemon
Comment thread
kostrzewa marked this conversation as resolved.
working-directory: ${{github.workspace}}/lemon
run: |
autoreconf -i -f
mkdir build

- name: build_lemon
working-directory: ${{github.workspace}}/lemon/build
run: |
CC=mpicc \
CFLAGS="-march=haswell -mtune=haswell -O2" \
../configure --prefix=$(pwd)/install_dir
cmake -DCMAKE_INSTALL_PREFIX=$(pwd)/install_dir ..
make -j
make install
make install > config.log

- name: Archive lemon config.log
if: ${{ always() }}
Expand All @@ -92,28 +91,19 @@ jobs:
shell: bash
run: mkdir ${{github.workspace}}/main/build

- name: autogen_tmlqcd
working-directory: ${{github.workspace}}/main
run: autoconf

- name: configure_and_build
shell: bash
working-directory: ${{github.workspace}}/main/build
run: |
CC=mpicc CXX=mpicxx \
LDFLAGS="-fopenmp" \
CFLAGS="-O2 -mtune=haswell -march=haswell -mavx2 -mfma -DOMPI_SKIP_MPICXX -fopenmp" \
CXXFLAGS="-O2 -mtune=haswell -march=haswell -mavx2 -mfma -DOMPI_SKIP_MPICXX -fopenmp" \
../configure \
--enable-mpi \
--with-mpidimension=4 \
--enable-omp \
--disable-sse2 \
--disable-sse3 \
--with-limedir=${{github.workspace}}/lime/build/install_dir \
--with-lemondir=${{github.workspace}}/lemon/build/install_dir \
--with-lapack="-lblas -llapack" || cat config.log
make -j
cmake -DCMAKE_PREFIX_PATH="${{github.workspace}}/lime/build/install_dir;${{github.workspace}}/lemon/build/install_dir" \
-DTM_USE_MPI=ON \
-DTM_USE_OMP=ON \
-DTM_USE_LEMON=ON \
.. > config.log
cat config.log
make -j

- name: Archive tmLQCD config.log
if: ${{ always() }}
Expand All @@ -125,7 +115,7 @@ jobs:
- name: nf2_rgmixedcg_hmc_tmcloverdetratio
working-directory: ${{github.workspace}}/main/build
run: |
mpirun -np 2 ./hmc_tm \
mpirun -np 2 src/bin/hmc_tm \
-f ../doc/sample-input/sample-hmc-rgmixedcg-tmcloverdetratio.input

- name: Archive nf2_rgmixedcg_hmc_tmcloverdetratio output
Expand Down
Loading