Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tsoc
spack-packages
Commits
52f4786f
Commit
52f4786f
authored
Feb 10, 2026
by
one
Browse files
Add nekRS v26.0
parent
beb5c9ff
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
15 deletions
+73
-15
pyproject.toml
pyproject.toml
+19
-0
repos/spack_repo/hygon/tsoc/packages/nekrs/package.py
repos/spack_repo/hygon/tsoc/packages/nekrs/package.py
+54
-15
No files found.
pyproject.toml
0 → 100644
View file @
52f4786f
[tool.ruff]
line-length
=
99
[tool.ruff.format]
skip-magic-trailing-comma
=
false
[tool.ruff.lint]
extend-select
=
["I"]
ignore
=
[
"E731"
,
"E203"
,
"F403"
,
"F811"
]
[tool.ruff.lint.per-file-ignores]
"**/package.py"
=
[
"F403"
,
"F405"
,
"F811"
,
"F821"
]
[tool.pyright]
useLibraryCodeForTypes
=
true
reportMissingImports
=
true
reportWildcardImportFromLibrary
=
false
include
=
["repos"]
extraPaths
=
["repos"]
repos/spack_repo/hygon/tsoc/packages/nekrs/package.py
View file @
52f4786f
...
...
@@ -42,20 +42,37 @@ class Nekrs(Package, CMakePackage, CudaPackage, ROCmPackage):
conditional
(
"cmake"
,
when
=
"@23.0:"
),
conditional
(
"generic"
,
when
=
"@=21.0"
),
default
=
"cmake"
)
# Current
version
(
"26.0"
,
sha256
=
"af1d93e36dd0c446571ef00680bafa4bd3aabf3d0ac5ac7781f9803f906eab9f"
)
version
(
"23.0"
,
sha256
=
"2cb4ded69551b9614036e1a9d5ac54c8535826eae8f8b6a00ddb89043b2c392a"
)
version
(
"21.0"
,
tag
=
"v21.0"
,
commit
=
"bcd890bf3f9fb4d91224c83aeda75c33570f1eaa"
)
variant
(
"dpcpp"
,
default
=
False
,
description
=
"Enable OCCA SYCL/DPCPP backend"
)
variant
(
"opencl"
,
default
=
False
,
description
=
"Activates support for OpenCL"
)
variant
(
"gpu_mpi"
,
default
=
True
,
description
=
"Enable GPU-aware MPI support"
)
variant
(
"amgx"
,
default
=
False
,
description
=
"Enable NVIDIA AMGX support (requires CUDA)"
)
variant
(
"gpu_aware_mpi"
,
default
=
False
,
description
=
"Enable GPU-aware MPI support"
)
variant
(
"adios"
,
default
=
False
,
when
=
"@26.0:"
,
description
=
"Enable ADIOS2 checkpoint engine"
)
variant
(
"cpptrace"
,
default
=
False
,
when
=
"@26.0:"
,
description
=
"Enable stack tracing via bundled cpptrace"
)
variant
(
"single_precision"
,
default
=
True
,
when
=
"@26.0:"
,
description
=
"Build additional fp32 solver binaries (nekrs-fp32/libnekrs-fp32)"
,
)
variant
(
"amgx"
,
default
=
False
,
when
=
"@:23.0"
,
description
=
"Enable NVIDIA AMGX support (requires CUDA)"
,
)
variant
(
"cvode"
,
default
=
False
,
description
=
"Enable CVODE support"
)
variant
(
"hypre
_gpu
"
,
default
=
False
,
description
=
"Enable HYPRE GPU support"
)
variant
(
"hypre"
,
default
=
False
,
description
=
"Enable HYPRE GPU support"
)
conflicts
(
"+amgx~cuda"
,
msg
=
"AMGX support requires CUDA"
)
conflicts
(
"+cvode+opencl"
,
msg
=
"CVODE + OpenCL is not supported by nekRS"
)
conflicts
(
"+cvode+dpcpp"
,
msg
=
"CVODE + DPCPP is not supported by nekRS"
)
conflicts
(
"+cvode+rocm"
,
msg
=
"CVODE + HIP/ROCm is not supported by nekRS"
)
conflicts
(
"+amgx"
,
when
=
"@:23.0 ~cuda"
,
msg
=
"AMGX support requires CUDA"
)
conflicts
(
"+opencl"
,
when
=
"+cvode"
,
msg
=
"CVODE + OpenCL is not supported by nekRS"
)
conflicts
(
"+dpcpp"
,
when
=
"+cvode"
,
msg
=
"CVODE + DPCPP is not supported by nekRS"
)
conflicts
(
"+rocm"
,
when
=
"+cvode"
,
msg
=
"CVODE + HIP/ROCm is not supported by nekRS"
)
conflicts
(
"+hypre"
,
when
=
"~cuda~rocm"
,
msg
=
"HYPRE GPU support requires +cuda or +rocm"
)
# Conflicts:
# nekrs includes following packages, but in order to build as part of
...
...
@@ -71,13 +88,15 @@ class Nekrs(Package, CMakePackage, CudaPackage, ROCmPackage):
depends_on
(
"mpi"
)
depends_on
(
"git"
,
type
=
"build"
)
depends_on
(
"cmake@3.18:"
,
type
=
"build"
)
depends_on
(
"cmake@3.18:"
,
type
=
"build"
,
when
=
"@23.0:"
)
depends_on
(
"cmake@3.21:"
,
type
=
"build"
,
when
=
"@26.0:"
)
depends_on
(
"adios2+mpi"
,
when
=
"@26.0:+adios"
)
def
patch
(
self
):
with
working_dir
(
"scripts"
):
# Make sure nekmpi wrapper uses srun when we know OpenMPI
# is not built with mpiexec
if
self
.
spec
.
satisfies
(
"^openmpi~legacylaunchers"
):
if
self
.
spec
.
satisfies
(
"^openmpi~legacylaunchers
@:23.0
"
):
filter_file
(
r
"mpirun -np"
,
"srun -n"
,
"nrsmpi"
)
filter_file
(
r
"mpirun -np"
,
"srun -n"
,
"nrspre"
)
filter_file
(
r
"mpirun -np"
,
"srun -n"
,
"nrsbmpi"
)
...
...
@@ -190,15 +209,35 @@ class CMakeBuilder(cmake.CMakeBuilder):
self
.
define
(
"CMAKE_CXX_COMPILER"
,
self
.
spec
[
"mpi"
].
mpicxx
),
self
.
define
(
"CMAKE_Fortran_COMPILER"
,
self
.
spec
[
"mpi"
].
mpifc
),
self
.
define
(
"OCCA_CXX"
,
self
.
spec
[
"mpi"
].
mpicxx
),
self
.
define_from_variant
(
"ENABLE_CUDA"
,
"cuda"
),
self
.
define_from_variant
(
"ENABLE_OPENCL"
,
"opencl"
),
self
.
define_from_variant
(
"ENABLE_HIP"
,
"rocm"
),
self
.
define_from_variant
(
"ENABLE_DPCPP"
,
"dpcpp"
),
self
.
define_from_variant
(
"NEKRS_GPU_MPI"
,
"gpu_mpi"
),
self
.
define_from_variant
(
"NEKRS_GPU_MPI"
,
"gpu_aware_mpi"
),
self
.
define_from_variant
(
"ENABLE_AMGX"
,
"amgx"
),
self
.
define_from_variant
(
"ENABLE_CVODE"
,
"cvode"
),
self
.
define_from_variant
(
"ENABLE_HYPRE_GPU"
,
"hypre
_gpu
"
),
self
.
define_from_variant
(
"ENABLE_HYPRE_GPU"
,
"hypre"
),
]
if
self
.
spec
.
satisfies
(
"@26.0:"
):
args
.
extend
(
[
self
.
define_from_variant
(
"OCCA_ENABLE_CUDA"
,
"cuda"
),
self
.
define_from_variant
(
"OCCA_ENABLE_OPENCL"
,
"opencl"
),
self
.
define_from_variant
(
"OCCA_ENABLE_HIP"
,
"rocm"
),
self
.
define_from_variant
(
"OCCA_ENABLE_DPCPP"
,
"dpcpp"
),
self
.
define_from_variant
(
"NEKRS_BUILD_FLOAT"
,
"single_precision"
),
self
.
define_from_variant
(
"ENABLE_ADIOS"
,
"adios"
),
self
.
define_from_variant
(
"ENABLE_CPPTRACE"
,
"cpptrace"
),
]
)
if
"+adios"
in
self
.
spec
:
# Prefer external ADIOS2 over upstream bundled 3rd_party/adios.
args
.
append
(
self
.
define
(
"ADIOS2_INSTALL_DIR"
,
self
.
spec
[
"adios2"
].
prefix
))
else
:
args
.
extend
(
[
self
.
define_from_variant
(
"ENABLE_CUDA"
,
"cuda"
),
self
.
define_from_variant
(
"ENABLE_OPENCL"
,
"opencl"
),
self
.
define_from_variant
(
"ENABLE_HIP"
,
"rocm"
),
self
.
define_from_variant
(
"ENABLE_DPCPP"
,
"dpcpp"
),
]
)
if
cxxflags
:
cxxflags_str
=
" "
.
join
(
cxxflags
)
args
.
extend
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment