summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/sirius/cmake-fix-shared-library-installation.patch53
-rw-r--r--var/spack/repos/builtin/packages/sirius/link-libraries-fortran.patch25
-rw-r--r--var/spack/repos/builtin/packages/sirius/package.py132
-rw-r--r--var/spack/repos/builtin/packages/sirius/strip-spglib-include-subfolder.patch25
4 files changed, 22 insertions, 213 deletions
diff --git a/var/spack/repos/builtin/packages/sirius/cmake-fix-shared-library-installation.patch b/var/spack/repos/builtin/packages/sirius/cmake-fix-shared-library-installation.patch
deleted file mode 100644
index bffa67e5da..0000000000
--- a/var/spack/repos/builtin/packages/sirius/cmake-fix-shared-library-installation.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 4b51d07369b5972f3917cc8f2425caa814ae0975 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Tiziano=20M=C3=BCller?= <tiziano.mueller@chem.uzh.ch>
-Date: Thu, 16 May 2019 10:53:04 +0200
-Subject: [PATCH] cmake: fix shared library installation
-
-fixes the error during `make install`:
-
- TARGETS given no LIBRARY DESTINATION for shared library target
-
-when building shared libraries.
-
-... and respect the current OS/distro library dir.
----
- src/CMakeLists.txt | 11 +++++++++--
- 1 file changed, 9 insertions(+), 2 deletions(-)
-
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 65307dd3..2b7a5279 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -2,6 +2,8 @@
- # working correctly
- # list(APPEND CUDA_NVCC_FLAGS "-Xcompiler -fPIC")
-
-+include(GNUInstallDirs) # required to get a proper LIBDIR variable
-+
- # keep two libraries: libsirius and libsirius_f
-
- if(USE_CUDA)
-@@ -9,13 +11,18 @@ if(USE_CUDA)
- file(GLOB_RECURSE CUFILES_KERNELS "Kernels/*.cu")
- add_library(sirius_cu "${CUFILES_KERNELS};${CUFILES_SDDK}")
- set_target_properties(sirius_cu PROPERTIES POSITION_INDEPENDENT_CODE ON)
-- INSTALL (TARGETS sirius_cu ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/)
-+ INSTALL (TARGETS sirius_cu
-+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
-+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
-+ )
- endif()
- if(CREATE_FORTRAN_BINDINGS)
- add_library(sirius_f "sirius_api.cpp;sirius.f90")
- SIRIUS_SETUP_TARGET(sirius_f)
- INSTALL (TARGETS sirius_f ARCHIVE DESTINATION
-- ${CMAKE_INSTALL_PREFIX}/lib/)
-+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
-+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
-+ )
- set_target_properties(sirius_f PROPERTIES POSITION_INDEPENDENT_CODE ON)
- set_target_properties(sirius_f PROPERTIES Fortran_MODULE_DIRECTORY mod_files)
- target_link_libraries(sirius_f PUBLIC OpenMP::OpenMP_CXX)
---
-2.16.4
-
diff --git a/var/spack/repos/builtin/packages/sirius/link-libraries-fortran.patch b/var/spack/repos/builtin/packages/sirius/link-libraries-fortran.patch
deleted file mode 100644
index 16de3a1710..0000000000
--- a/var/spack/repos/builtin/packages/sirius/link-libraries-fortran.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 76f238d0ebcfc186f5210b0807b6a83a5c17bd43 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Tiziano=20M=C3=BCller?= <tiziano.mueller@chem.uzh.ch>
-Date: Wed, 24 Apr 2019 15:30:50 +0200
-Subject: [PATCH 2/2] cmake: properly link Fortran lib against used libraries
-
----
- src/CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index b927adef..a0d4aeb3 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -13,7 +13,7 @@ if(USE_CUDA)
- endif()
- if(CREATE_FORTRAN_BINDINGS)
- add_library(sirius_f "sirius_api.cpp;sirius.f90")
-- add_dependencies(sirius_f generate_version_hpp runtime_options_json_hpp)
-+ SIRIUS_SETUP_TARGET(sirius_f)
- INSTALL (TARGETS sirius_f ARCHIVE DESTINATION
- ${CMAKE_INSTALL_PREFIX}/lib/)
- set_target_properties(sirius_f PROPERTIES POSITION_INDEPENDENT_CODE ON)
---
-2.16.4
-
diff --git a/var/spack/repos/builtin/packages/sirius/package.py b/var/spack/repos/builtin/packages/sirius/package.py
index e9b6b5cd45..20f5a4246d 100644
--- a/var/spack/repos/builtin/packages/sirius/package.py
+++ b/var/spack/repos/builtin/packages/sirius/package.py
@@ -26,111 +26,54 @@ class Sirius(CMakePackage, CudaPackage, ROCmPackage):
version("7.3.2", sha256="a256508de6b344345c295ad8642dbb260c4753cd87cc3dd192605c33542955d7")
version("7.3.1", sha256="8bf9848b8ebf0b43797fd359adf8c84f00822de4eb677e3049f22baa72735e98")
version("7.3.0", sha256="69b5cf356adbe181be6c919032859c4e0160901ff42a885d7e7ea0f38cc772e2")
- version("7.2.7", sha256="929bf7f131a4847624858b9c4295532c24b0c06f6dcef5453c0dfc33fb78eb03")
- version("7.2.6", sha256="e751fd46cdc7c481ab23b0839d3f27fb00b75dc61dc22a650c92fe8e35336e3a")
- version("7.2.5", sha256="794e03d4da91025f77542d3d593d87a8c74e980394f658a0210a4fd91c011f22")
- version("7.2.4", sha256="aeed0e83b80c3a79a9469e7f3fe10d80ad331795e38dbc3c49cb0308e2bd084d")
- version("7.2.3", sha256="6c10f0e87e50fcc7cdb4d1b2d35e91dba6144de8f111e36c7d08912e5942a906")
- version("7.2.1", sha256="01bf6c9893ff471473e13351ca7fdc2ed6c1f4b1bb7afa151909ea7cd6fa0de7")
- version("7.2.0", sha256="537800459db8a7553d7aa251c19f3a31f911930194b068bc5bca2dfb2c9b71db")
version(
- "7.0.2",
- sha256="ee613607ce3be0b2c3f69b560b2415ce1b0e015179002aa90739430dbfaa0389",
- deprecated=True,
- )
- version(
- "7.0.1",
- sha256="cca11433f86e7f4921f7956d6589f27bf0fd5539f3e8f96e66a3a6f274888595",
- deprecated=True,
- )
- version(
- "7.0.0",
- sha256="da783df11e7b65668e29ba8d55c8a6827e2216ad6d88040f84f42ac20fd1bb99",
- deprecated=True,
- )
- version(
- "6.5.7",
- sha256="d886c3066163c43666ebac2ea50351df03907b5686671e514a75f131ba51b43c",
- deprecated=True,
- )
- version(
- "6.5.6",
- sha256="c8120100bde4477545eae489ea7f9140d264a3f88696ec92728616d78f214cae",
- deprecated=True,
- )
- version(
- "6.5.5",
- sha256="0b23d3a8512682eea67aec57271031c65f465b61853a165015b38f7477651dd1",
- deprecated=True,
- )
- version(
- "6.5.4",
- sha256="5f731926b882a567d117afa5e0ed33291f1db887fce52f371ba51f014209b85d",
- deprecated=True,
- )
- version(
- "6.5.3",
- sha256="eae0c303f332425a8c792d4455dca62557931b28a5df8b4c242652d5ffddd580",
+ "7.2.7",
+ sha256="929bf7f131a4847624858b9c4295532c24b0c06f6dcef5453c0dfc33fb78eb03",
deprecated=True,
)
version(
- "6.5.2",
- sha256="c18adc45b069ebae03f94eeeeed031ee99b3d8171fa6ee73c7c6fb1e42397fe7",
+ "7.2.6",
+ sha256="e751fd46cdc7c481ab23b0839d3f27fb00b75dc61dc22a650c92fe8e35336e3a",
deprecated=True,
)
version(
- "6.5.1",
- sha256="599dd0fa25a4e83db2a359257a125e855d4259188cf5b0065b8e7e66378eacf3",
+ "7.2.5",
+ sha256="794e03d4da91025f77542d3d593d87a8c74e980394f658a0210a4fd91c011f22",
deprecated=True,
)
version(
- "6.5.0",
- sha256="5544f3abbb71dcd6aa08d18aceaf53c38373de4cbd0c3af44fbb39c20cfeb7cc",
+ "7.2.4",
+ sha256="aeed0e83b80c3a79a9469e7f3fe10d80ad331795e38dbc3c49cb0308e2bd084d",
deprecated=True,
)
version(
- "6.4.4",
- sha256="1c5de9565781847658c3cc11edcb404e6e6d1c5a9dfc81e977de7a9a7a162c8a",
+ "7.2.3",
+ sha256="6c10f0e87e50fcc7cdb4d1b2d35e91dba6144de8f111e36c7d08912e5942a906",
deprecated=True,
)
version(
- "6.4.3",
- sha256="4d1effeadb84b3e1efd7d9ac88018ef567aa2e0aa72e1112f0abf2e493e2a189",
+ "7.2.1",
+ sha256="01bf6c9893ff471473e13351ca7fdc2ed6c1f4b1bb7afa151909ea7cd6fa0de7",
deprecated=True,
)
version(
- "6.4.2",
- sha256="40b9b66deebb6538fc0f4cd802554d0d763ea6426b9b2f0e8db8dc617e494479",
+ "7.2.0",
+ sha256="537800459db8a7553d7aa251c19f3a31f911930194b068bc5bca2dfb2c9b71db",
deprecated=True,
)
version(
- "6.4.1",
- sha256="86f25c71517952a63e92e0a9bcf66d27e4afb2b0d67cf84af480f116b8e7f53c",
- deprecated=True,
- )
- version(
- "6.4.0",
- sha256="bc61758b71dd2996e2ff515b8c3560b2c69c00931cb2811a163a31bcfea4436e",
- deprecated=True,
- )
- version(
- "6.3.4",
- sha256="8839e988b4bb6ef99b6180f7fba03a5537e31fce51bb3e4c2298b513d6a07e0a",
- deprecated=True,
- )
- version(
- "6.3.3",
- sha256="7ba30a4e5c9a545433251211454ec0d59b74ba8941346057bc7de11e7f6886f7",
+ "7.0.2",
+ sha256="ee613607ce3be0b2c3f69b560b2415ce1b0e015179002aa90739430dbfaa0389",
deprecated=True,
)
version(
- "6.3.2",
- sha256="1723e5ad338dad9a816369a6957101b2cae7214425406b12e8712c82447a7ee5",
+ "7.0.1",
+ sha256="cca11433f86e7f4921f7956d6589f27bf0fd5539f3e8f96e66a3a6f274888595",
deprecated=True,
)
version(
- "6.1.5",
- sha256="379f0a2e5208fd6d91c2bd4939c3a5c40002975fb97652946fa1bfe4a3ef97cb",
+ "7.0.0",
+ sha256="da783df11e7b65668e29ba8d55c8a6827e2216ad6d88040f84f42ac20fd1bb99",
deprecated=True,
)
@@ -165,6 +108,7 @@ class Sirius(CMakePackage, CudaPackage, ROCmPackage):
"profiler", default=True, description="Use internal profiler to measure execution time"
)
+ depends_on("cmake@3.23:", type="build")
depends_on("mpi")
depends_on("gsl")
depends_on("lapack")
@@ -191,7 +135,6 @@ class Sirius(CMakePackage, CudaPackage, ROCmPackage):
depends_on("magma", when="+magma")
depends_on("boost cxxstd=14 +filesystem", when="+boost_filesystem")
- depends_on("spfft@0.9.6: +mpi", when="@6.4.0:")
depends_on("spfft@0.9.13:", when="@7.0.1:")
depends_on("spfft+single_precision", when="+single_precision ^spfft")
depends_on("spfft+cuda", when="+cuda ^spfft")
@@ -217,7 +160,6 @@ class Sirius(CMakePackage, CudaPackage, ROCmPackage):
# FindHIP cmake script only works for < 4.1
depends_on("hip@:4.0", when="@:7.2.0 +rocm")
- conflicts("+shared", when="@6.3.0:6.4")
conflicts("+boost_filesystem", when="~apps")
conflicts("^libxc@5.0.0") # known to produce incorrect results
conflicts("+single_precision", when="@:7.2.4")
@@ -244,32 +186,8 @@ class Sirius(CMakePackage, CudaPackage, ROCmPackage):
depends_on("umpire+cuda~device_alloc", when="+cuda")
depends_on("umpire+rocm~device_alloc", when="+rocm")
- patch("strip-spglib-include-subfolder.patch", when="@6.1.5")
- patch("link-libraries-fortran.patch", when="@6.1.5")
- patch("cmake-fix-shared-library-installation.patch", when="@6.1.5")
patch("mpi_datatypes.patch", when="@:7.2.6")
- @property
- def libs(self):
- libraries = []
-
- if "@6.3.0:" in self.spec:
- libraries += ["libsirius"]
-
- return find_libraries(
- libraries, root=self.prefix, shared="+shared" in self.spec, recursive=True
- )
- else:
- if "+fortran" in self.spec:
- libraries += ["libsirius_f"]
-
- if "+cuda" in self.spec:
- libraries += ["libsirius_cu"]
-
- return find_libraries(
- libraries, root=self.prefix, shared="+shared" in self.spec, recursive=True
- )
-
def cmake_args(self):
spec = self.spec
@@ -335,14 +253,8 @@ class Sirius(CMakePackage, CudaPackage, ROCmPackage):
if "+cuda" in spec:
cuda_arch = spec.variants["cuda_arch"].value
if cuda_arch[0] != "none":
- # Specify a single arch directly
- if "@:6" in spec:
- args.append(
- self.define("CMAKE_CUDA_FLAGS", "-arch=sm_{0}".format(cuda_arch[0]))
- )
-
# Make SIRIUS handle it
- elif "@6:7.4.3" in spec:
+ if "@6:7.4.3" in spec:
args.append(self.define("CMAKE_CUDA_ARCH", ";".join(cuda_arch)))
else:
args.append(self.define("CMAKE_CUDA_ARCHITECTURES", ";".join(cuda_arch)))
diff --git a/var/spack/repos/builtin/packages/sirius/strip-spglib-include-subfolder.patch b/var/spack/repos/builtin/packages/sirius/strip-spglib-include-subfolder.patch
deleted file mode 100644
index 0e775149a3..0000000000
--- a/var/spack/repos/builtin/packages/sirius/strip-spglib-include-subfolder.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 1a4ae29387790183b3de38acf8d38623429f3f62 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Tiziano=20M=C3=BCller?= <tiziano.mueller@chem.uzh.ch>
-Date: Wed, 24 Apr 2019 11:29:05 +0200
-Subject: [PATCH] spglib does not install to a subfolder by default
-
----
- src/Unit_cell/unit_cell_symmetry.hpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/Unit_cell/unit_cell_symmetry.hpp b/src/Unit_cell/unit_cell_symmetry.hpp
-index 9852bd4a..2c5a1e04 100644
---- a/src/Unit_cell/unit_cell_symmetry.hpp
-+++ b/src/Unit_cell/unit_cell_symmetry.hpp
-@@ -26,7 +26,7 @@
- #define __UNIT_CELL_SYMMETRY_HPP__
-
- extern "C" {
--#include <spglib/spglib.h>
-+#include <spglib.h>
- }
-
- #include "geometry3d.hpp"
---
-2.16.4
-