Skip to content

Commit 004872e

Browse files
committed
spack package fixes for required CRAY / ROCM CMake flags.
1 parent 1bb48e0 commit 004872e

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

scripts/spack/packages/spheral/package.py

+6-9
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,11 @@ def initconfig_mpi_entries(self):
139139
entries = []
140140
if "+mpi" in spec:
141141
entries = super(Spheral, self).initconfig_mpi_entries()
142+
if "cray-mpich" in spec:
143+
for e in entries:
144+
if 'MPIEXEC_NUMPROC_FLAG' in e:
145+
entries.remove(e)
146+
entries.append(cmake_cache_string('MPIEXEC_NUMPROC_FLAG', '-n'))
142147
return entries
143148

144149
def initconfig_hardware_entries(self):
@@ -147,15 +152,7 @@ def initconfig_hardware_entries(self):
147152

148153
if '+rocm' in spec:
149154
entries.append(cmake_cache_option("ENABLE_HIP", True))
150-
hip_root = spec["hip"].prefix
151-
152-
hip_link_flags = ""
153-
# Additional libraries for TOSS4
154-
hip_link_flags += " -L{0}/../lib64 -Wl,-rpath,{0}/../lib64 ".format(hip_root)
155-
hip_link_flags += " -L{0}/../lib -Wl,-rpath,{0}/../lib ".format(hip_root)
156-
hip_link_flags += "-lamd_comgr -lhsa-runtime64 "
157-
158-
entries.append(cmake_cache_string("CMAKE_EXE_LINKER_FLAGS", hip_link_flags))
155+
entries.append(cmake_cache_option("ROCM_PATH", spec["hip"].prefix))
159156

160157
if '+cuda' in spec:
161158
entries.append(cmake_cache_option("ENABLE_CUDA", True))

0 commit comments

Comments
 (0)