Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
  •  
  •  
  •  
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,30 +8,29 @@ 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_ENABLE_ALIGNMENT=32 \
-DTM_USE_GAUGE_COPY-ON \
-DTM_USE_HALFSPINOR=ON \
-DCMAKE_INSTALL_PREFIX=../install_dir ..
make
make install
touch preparation-done-${CI_JOB_ID}
Expand Down
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(AutotoolsPackage, CMakePackage):
"""LEMON: Lightweight Parallel I/O library for Lattice QCD."""

homepage = "https://github.com/etmc/lemon"
Expand All @@ -16,13 +17,18 @@ 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("libtool", type="build", when="@master build_system=cmake")
depends_on("cmake", type="build", when="master build_system=cmake")

depends_on('mpi')

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

class CMakeBuilder(cmake.CMakeBuilder):
def cmake_args(self):
spec = self.spec
args = [
self.define_from_variant("DBUILD_SHARED_LIBS", "shared"),
]
return args

113 changes: 113 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,113 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack_repo.builtin.build_systems.cmake import CmakePackage
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")

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")

# 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("quda+nvshmem", when="+shmem")

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
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
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
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
47 changes: 17 additions & 30 deletions .github/workflows/ddalphaamg-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,16 @@ jobs:
repository: usqcd-software/c-lime
path: lime

- name: autogen_lime
- name: create_builddir_lime
working-directory: ${{github.workspace}}/lime
run: ./autogen.sh

- name: create_lime_builddir
run: mkdir ${{github.workspace}}/lime/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 @@ -69,23 +66,20 @@ jobs:
repository: etmc/lemon
path: lemon

- name: create_lemon_builddir
run: mkdir ${{github.workspace}}/lemon/build

- name: autogen_lemon
- name: create_builddir_lemon
working-directory: ${{github.workspace}}/lemon
run: autoreconf -i -f
run: |
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() }}
uses: actions/upload-artifact@v4
Expand All @@ -111,10 +105,6 @@ 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
Expand All @@ -123,22 +113,19 @@ jobs:
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-DDalphaAMG=${{github.workspace}}/ddalphaamg \
--with-lapack="-lblas -llapack" || cat config.log
cmake -DCMAKE_PREFIX_PATH="${{github.workspace}}/lime/build/install_dir;${{github.workspace}}/lemon/build/install_dir;${{github.workspace}}/ddalphaamg" \
-DTM_USE_MPI=ON \
-DTM_USE_OMP=ON \
-DTM_USE_LEMON=ON \
-DTM_USE_DDalphaAMG=ON \
.. > config.log
cat config.log
make -j

- name: nf2_ddalphaamg_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-ddalphaamg-tmcloverdetratio.input

- name: Archive nf2_ddalphaamg_hmc_tmcloverdetratio output
Expand Down
Loading
Loading