summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMichaelLaufer <70094649+MichaelLaufer@users.noreply.github.com>2022-10-26 05:04:04 +0300
committerGitHub <noreply@github.com>2022-10-25 19:04:04 -0700
commit53a76761d0dcd91c0833952306500edd3bdc2d28 (patch)
treeb9efc19f1a6b8ffb29b0313436ea02aa9801e382 /var
parent7b053fde892d236dd6f3ece849b0258a2ec53557 (diff)
downloadspack-53a76761d0dcd91c0833952306500edd3bdc2d28.tar.gz
spack-53a76761d0dcd91c0833952306500edd3bdc2d28.tar.bz2
spack-53a76761d0dcd91c0833952306500edd3bdc2d28.tar.xz
spack-53a76761d0dcd91c0833952306500edd3bdc2d28.zip
Scotch: 'link_error_lib' variant - Link error handling library to libscotch/libptscotch (#33297)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/py-pyfr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/scotch/libscotch-scotcherr-link-7.0.1.patch20
-rw-r--r--var/spack/repos/builtin/packages/scotch/package.py7
3 files changed, 28 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/py-pyfr/package.py b/var/spack/repos/builtin/packages/py-pyfr/package.py
index 3e1d094c21..504f0e7e6b 100644
--- a/var/spack/repos/builtin/packages/py-pyfr/package.py
+++ b/var/spack/repos/builtin/packages/py-pyfr/package.py
@@ -57,7 +57,7 @@ class PyPyfr(PythonPackage, CudaPackage, ROCmPackage):
# Optional dependencies
depends_on("py-scipy", when="+scipy", type=("build", "run"))
depends_on("metis@5.0:", when="+metis", type=("run"))
- depends_on("scotch@6.0:", when="+scotch", type=("run"))
+ depends_on("scotch@7.0.1: +link_error_lib", when="+scotch", type=("run"))
depends_on("cuda@8.0: +allow-unsupported-compilers", when="@:1.14.0 +cuda", type=("run"))
depends_on("cuda@11.4.0: +allow-unsupported-compilers", when="@1.15.0: +cuda", type=("run"))
depends_on("rocblas@5.2.0:", when="+hip", type=("run"))
diff --git a/var/spack/repos/builtin/packages/scotch/libscotch-scotcherr-link-7.0.1.patch b/var/spack/repos/builtin/packages/scotch/libscotch-scotcherr-link-7.0.1.patch
new file mode 100644
index 0000000000..40e4ade883
--- /dev/null
+++ b/var/spack/repos/builtin/packages/scotch/libscotch-scotcherr-link-7.0.1.patch
@@ -0,0 +1,20 @@
+--- a/src/libscotch/CMakeLists.txt
++++ b/src/libscotch/CMakeLists.txt
+@@ -508,7 +508,7 @@ add_library(scotch
+ set_target_properties(scotch PROPERTIES VERSION
+ ${SCOTCH_VERSION}.${SCOTCH_RELEASE}.${SCOTCH_PATCHLEVEL})
+ add_dependencies(scotch parser_yy_c parser_ll_c)
+-target_link_libraries(scotch PUBLIC m)
++target_link_libraries(scotch PUBLIC m scotcherr)
+ target_include_directories(scotch PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
+@@ -748,7 +748,7 @@ if(BUILD_PTSCOTCH)
+ set_target_properties(ptscotch PROPERTIES
+ VERSION ${SCOTCH_VERSION}.${SCOTCH_RELEASE}.${SCOTCH_PATCHLEVEL}
+ COMPILE_FLAGS -DSCOTCH_PTSCOTCH)
+- target_link_libraries(ptscotch PUBLIC scotch MPI::MPI_C)
++ target_link_libraries(ptscotch PUBLIC ptscotcherr scotch MPI::MPI_C)
+ target_include_directories(ptscotch PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py
index 672706a635..166455876e 100644
--- a/var/spack/repos/builtin/packages/scotch/package.py
+++ b/var/spack/repos/builtin/packages/scotch/package.py
@@ -44,6 +44,12 @@ class Scotch(CMakePackage):
"metis", default=False, description="Expose vendored METIS/ParMETIS libraries and wrappers"
)
variant("int64", default=False, description="Use int64_t for SCOTCH_Num typedef")
+ variant(
+ "link_error_lib",
+ default=False,
+ when="@7.0.1",
+ description="Link error handling library to libscotch/libptscotch",
+ )
# Does not build with flex 2.6.[23]
depends_on("flex@:2.6.1,2.6.4:", type="build")
@@ -57,6 +63,7 @@ class Scotch(CMakePackage):
patch("metis-headers-6.0.4.patch", when="@6.0.4")
patch("libscotchmetis-return-6.0.5a.patch", when="@6.0.5a")
+ patch("libscotch-scotcherr-link-7.0.1.patch", when="@7.0.1 +link_error_lib")
# Vendored dependency of METIS/ParMETIS conflicts with standard
# installations