From 6c3c06a5710fd4a2f5799bc6909697f7e39ec382 Mon Sep 17 00:00:00 2001 From: m-shunji <76516098+m-shunji@users.noreply.github.com> Date: Fri, 26 Jan 2024 19:00:22 +0900 Subject: pexsi: fix to build with fujitsu-ssl2 (#42234) Co-authored-by: inada-yoshie --- .../repos/builtin/packages/pexsi/fujitsu-add-link-flags.patch | 11 +++++++++++ var/spack/repos/builtin/packages/pexsi/package.py | 6 ++++++ 2 files changed, 17 insertions(+) create mode 100644 var/spack/repos/builtin/packages/pexsi/fujitsu-add-link-flags.patch diff --git a/var/spack/repos/builtin/packages/pexsi/fujitsu-add-link-flags.patch b/var/spack/repos/builtin/packages/pexsi/fujitsu-add-link-flags.patch new file mode 100644 index 0000000000..2a2f6e7716 --- /dev/null +++ b/var/spack/repos/builtin/packages/pexsi/fujitsu-add-link-flags.patch @@ -0,0 +1,11 @@ +diff -Nur spack-src.org/fortran/CMakeLists.txt spack-src/fortran/CMakeLists.txt +--- spack-src.org/fortran/CMakeLists.txt 2023-06-06 17:55:44.000000000 +0900 ++++ spack-src/fortran/CMakeLists.txt 2023-06-06 15:50:05.000000000 +0900 +@@ -47,6 +47,7 @@ + + endmacro() + ++set (CMAKE_EXE_LINKER_FLAGS "--linkfortran") + + add_pexsi_f_example_exe( f_driver_ksdft ) + add_pexsi_f_example_exe( f_driver_pselinv_real ) diff --git a/var/spack/repos/builtin/packages/pexsi/package.py b/var/spack/repos/builtin/packages/pexsi/package.py index 88728a5c5e..9b7191ef00 100644 --- a/var/spack/repos/builtin/packages/pexsi/package.py +++ b/var/spack/repos/builtin/packages/pexsi/package.py @@ -38,6 +38,8 @@ class Pexsi(MakefilePackage, CMakePackage): version("0.10.2", sha256="8714c71b76542e096211b537a9cb1ffb2c28f53eea4f5a92f94cc1ca1e7b499f") version("0.9.0", sha256="e5efe0c129013392cdac3234e37f1f4fea641c139b1fbea47618b4b839d05029") + patch("fujitsu-add-link-flags.patch", when="%fj") + depends_on("parmetis") depends_on("superlu-dist@5.1.2:5.3", when="@0.10.2:0") depends_on("superlu-dist@:6.1.0", when="@1") # Upper limit from CP2K toolchain @@ -123,4 +125,8 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder): self.define_from_variant("PEXSI_ENABLE_FORTRAN", "fortran"), self.define_from_variant("PEXSI_ENABLE_OPENMP ", "openmp"), ] + + if self.spec.satisfies("%fj"): + args.append(self.define("BLAS_LIBRARIES", self.spec["blas"].libs.link_flags)) + return args -- cgit v1.2.3-70-g09d2