-
Notifications
You must be signed in to change notification settings - Fork 49
CMake support #664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMake support #664
Changes from all commits
930839b
6787970
ee43ab0
ca36cfe
7c37c40
3e4e536
fd2baf0
44214a4
541b0f5
e90a558
493d25e
40e5c5d
08ff19d
962f52b
77840b4
fd4c0bc
8cc2bc2
70e948e
725d118
07318c4
0c879bf
ecda407
b67330e
6f31a9f
7c07eb4
e1f6760
a9983fb
fc47a07
a1109c3
cac658f
bc53cf0
80e76a9
5a06486
4fc74dd
0c747c7
2a1980d
2bb456a
d68ffee
b33899b
28b13f4
7855c2f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,5 +9,5 @@ | |
| variables: | ||
| UENV_NAME: tmlqcd | ||
| UENV_VERSION: experimental | ||
| UENV_TAG: v0.0.6 | ||
|
|
||
| UENV_TAG: v0.0.7 | ||
| UENV_VERSION: v1 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| gcc: | ||
| version: "14.2" | ||
| version: "14.3" |
| 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") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here; add release tags as versions.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 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") | ||
|
|
||
|
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 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| repo: | ||
| namespace: apps | ||
| api: v2.2 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.