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
ba454342
Commit
ba454342
authored
Feb 10, 2026
by
one
Browse files
Update nekRS
parent
90d80a0b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
repos/spack_repo/hygon/tsoc/packages/nekrs/package.py
repos/spack_repo/hygon/tsoc/packages/nekrs/package.py
+14
-6
No files found.
repos/spack_repo/hygon/tsoc/packages/nekrs/package.py
View file @
ba454342
...
...
@@ -83,8 +83,7 @@ class Nekrs(Package, CMakePackage, CudaPackage, ROCmPackage):
filter_file
(
r
"mpirun -np"
,
"srun -n"
,
"nrsbmpi"
)
# nekRS upstream writes nekrs.conf into CMAKE_INSTALL_PREFIX at configure
# time, which is not Spack-friendly. Redirect it into the build tree
# and install it normally.
# time. Redirect it into the build tree and install it normally.
if
self
.
spec
.
satisfies
(
"@23.0:"
):
filter_file
(
r
"\$\{CMAKE_INSTALL_PREFIX\}/nekrs\.conf"
,
...
...
@@ -118,7 +117,11 @@ class Nekrs(Package, CMakePackage, CudaPackage, ROCmPackage):
env
.
set
(
"NEKRS_HOME"
,
self
.
prefix
)
env
.
prepend_path
(
"PATH"
,
self
.
prefix
.
bin
)
env
.
set
(
"OCCA_CXX"
,
self
.
compiler
.
cxx
)
# OCCA performs runtime JIT compilation; use a real runtime compiler
# path instead of Spack's build wrapper path.
runtime_cxx
=
spec
[
"mpi"
].
mpicxx
env
.
set
(
"OCCA_CXX"
,
runtime_cxx
)
env
.
set
(
"NEKRS_MPI_UNDERLYING_COMPILER"
,
runtime_cxx
)
cxxflags
=
spec
.
compiler_flags
.
get
(
"cxxflags"
,
[])
if
cxxflags
:
...
...
@@ -152,14 +155,11 @@ class GenericBuilder(generic.GenericBuilder):
class
CMakeBuilder
(
cmake
.
CMakeBuilder
):
def
cmake_args
(
self
):
cxxflags
=
self
.
spec
.
compiler_flags
.
get
(
"cxxflags"
,
[])
cxxflags_str
=
" "
.
join
(
cxxflags
)
if
cxxflags
else
""
args
=
[
# Match upstream recommended usage: MPI wrappers for all languages.
self
.
define
(
"CMAKE_C_COMPILER"
,
self
.
spec
[
"mpi"
].
mpicc
),
self
.
define
(
"CMAKE_CXX_COMPILER"
,
self
.
spec
[
"mpi"
].
mpicxx
),
self
.
define
(
"CMAKE_Fortran_COMPILER"
,
self
.
spec
[
"mpi"
].
mpifc
),
self
.
define
(
"NEKRS_COMPILER_FLAGS"
,
cxxflags_str
),
self
.
define
(
"OCCA_CXXFLAGS"
,
cxxflags_str
),
self
.
define_from_variant
(
"ENABLE_CUDA"
,
"cuda"
),
self
.
define_from_variant
(
"ENABLE_OPENCL"
,
"opencl"
),
self
.
define_from_variant
(
"ENABLE_HIP"
,
"rocm"
),
...
...
@@ -169,4 +169,12 @@ class CMakeBuilder(cmake.CMakeBuilder):
self
.
define_from_variant
(
"ENABLE_CVODE"
,
"cvode"
),
self
.
define_from_variant
(
"ENABLE_HYPRE_GPU"
,
"hypre_gpu"
),
]
if
cxxflags
:
cxxflags_str
=
" "
.
join
(
cxxflags
)
args
.
extend
(
[
self
.
define
(
"NEKRS_COMPILER_FLAGS"
,
cxxflags_str
),
self
.
define
(
"OCCA_CXXFLAGS"
,
cxxflags_str
),
]
)
return
args
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