summaryrefslogtreecommitdiff
path: root/var/spack/repos
diff options
context:
space:
mode:
authoreugeneswalker <38933153+eugeneswalker@users.noreply.github.com>2022-08-03 15:01:59 -0700
committerGitHub <noreply@github.com>2022-08-03 16:01:59 -0600
commit2b04c4f8409de38b706792aa2749139be4ff27f8 (patch)
tree3c4af15c5d65ace3592045f9d6932443f9a163b3 /var/spack/repos
parent3a62f3aeae198053b58d088b801a00c9495f6587 (diff)
downloadspack-2b04c4f8409de38b706792aa2749139be4ff27f8.tar.gz
spack-2b04c4f8409de38b706792aa2749139be4ff27f8.tar.bz2
spack-2b04c4f8409de38b706792aa2749139be4ff27f8.tar.xz
spack-2b04c4f8409de38b706792aa2749139be4ff27f8.zip
sundials@6.1.0:6.2.0 +rocm: patch nvector to use pic (#31910)
* sundials@6.1.0:6.2.0 +rocm: patch nvector to use pic * e4s ci: add sundials +rocm
Diffstat (limited to 'var/spack/repos')
-rw-r--r--var/spack/repos/builtin/packages/sundials/nvector-pic.patch24
-rw-r--r--var/spack/repos/builtin/packages/sundials/package.py2
2 files changed, 26 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/sundials/nvector-pic.patch b/var/spack/repos/builtin/packages/sundials/nvector-pic.patch
new file mode 100644
index 0000000000..84b78b4130
--- /dev/null
+++ b/var/spack/repos/builtin/packages/sundials/nvector-pic.patch
@@ -0,0 +1,24 @@
+diff -ruN spack-src/examples/nvector/CMakeLists.txt spack-src-patched/examples/nvector/CMakeLists.txt
+--- spack-src/examples/nvector/CMakeLists.txt 2022-04-22 16:55:14.000000000 +0000
++++ spack-src-patched/examples/nvector/CMakeLists.txt 2022-08-03 16:34:47.789320825 +0000
+@@ -25,6 +25,10 @@
+
+ # Build the nvector test utilities
+ add_library(test_nvector_obj OBJECT test_nvector.c)
++if(BUILD_SHARED_LIBS)
++ # need PIC when shared libs are used since the example executables will link to the shared lib
++ set_property(TARGET test_nvector_obj PROPERTY POSITION_INDEPENDENT_CODE TRUE)
++endif()
+ target_link_libraries(test_nvector_obj PRIVATE sundials_nvecserial)
+
+ if(ENABLE_MPI AND MPI_C_FOUND)
+@@ -33,6 +37,9 @@
+ add_subdirectory(mpiplusx)
+ # Build the mpi nvector test utilities
+ add_library(test_nvectormpi_obj OBJECT test_mpinvector.c)
++ if(BUILD_SHARED_LIBS)
++ set_property(TARGET test_nvectormpi_obj PROPERTY POSITION_INDEPENDENT_CODE TRUE)
++ endif()
+ target_link_libraries(test_nvectormpi_obj PRIVATE MPI::MPI_C sundials_nvecparallel)
+ endif()
+ add_subdirectory(manyvector)
diff --git a/var/spack/repos/builtin/packages/sundials/package.py b/var/spack/repos/builtin/packages/sundials/package.py
index 5ebebb837f..582c2a761b 100644
--- a/var/spack/repos/builtin/packages/sundials/package.py
+++ b/var/spack/repos/builtin/packages/sundials/package.py
@@ -237,6 +237,8 @@ class Sundials(CMakePackage, CudaPackage, ROCmPackage):
# ==========================================================================
# Patches
# ==========================================================================
+ # https://github.com/spack/spack/issues/29526
+ patch("nvector-pic.patch", when="@6.1.0:6.2.0 +rocm")
# remove OpenMP header file and function from hypre vector test code
patch("test_nvector_parhyp.patch", when="@2.7.0:3.0.0")