summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAdam Grofe <agrofe1417@gmail.com>2023-09-14 14:57:42 -0700
committerGitHub <noreply@github.com>2023-09-14 17:57:42 -0400
commit94c2043b283b069d11523d099ffce75842e27dbf (patch)
tree2be2022730cdd4f2f9bfa19d105d750309091860 /var
parent579df768ca62d879636a1e5104116d58410afe65 (diff)
downloadspack-94c2043b283b069d11523d099ffce75842e27dbf.tar.gz
spack-94c2043b283b069d11523d099ffce75842e27dbf.tar.bz2
spack-94c2043b283b069d11523d099ffce75842e27dbf.tar.xz
spack-94c2043b283b069d11523d099ffce75842e27dbf.zip
Add Scine QCMaquis recipe to builtin packages (#39709)
* Add Scine QCMaquis recipe to builtin packages * Format scine-qcmaquis recipe using black * Remove import os from scine-qcmaquis recipe * Reduce length of symmetries line in scine-qcmaquis * Add myself as a maintainer of the scine-qcmaquis recipe * Update Scine-QCMaquis recipe following the review PR URL: https://github.com/spack/spack/pull/39709 Changes: - Updated Symmetries variant to us multi feature - Added dependency to boost+chrono since it was undocumented - Use define_from_variant to setup CMake args - Make version 3.1.2 be preferred since 3.1.3 build is broken * Change build_tests boolean condition --------- Co-authored-by: Adam Grofe <adamgrofe@microsoft.com>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/scine-qcmaquis/package.py62
1 files changed, 62 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/scine-qcmaquis/package.py b/var/spack/repos/builtin/packages/scine-qcmaquis/package.py
new file mode 100644
index 0000000000..0f076227ab
--- /dev/null
+++ b/var/spack/repos/builtin/packages/scine-qcmaquis/package.py
@@ -0,0 +1,62 @@
+# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack.package import *
+
+
+class ScineQcmaquis(CMakePackage):
+ """Scine QCMaquis DMRG Solver"""
+
+ homepage = "https://scine.ethz.ch/download/qcmaquis"
+ git = "https://github.com/qcscine/qcmaquis.git"
+
+ maintainers("adam-grofe")
+
+ version("master", branch="master")
+ version("3.1.3", branch="release-3.1.3")
+ version("3.1.2", branch="release-3.1.2", preferred=True)
+ variant(
+ "blas",
+ values=("openblas", "mkl"),
+ default="openblas",
+ description="Which blas library to use.",
+ )
+ variant(
+ "symmetries",
+ default="SU2U1PG,TwoU1PG",
+ description='Wave functions symmetries to compile (e.g. "SU2U1PG,TwoU1PG")',
+ values=("U1", "TwoU1", "TwoU1PG", "NU1", "Z2", "SU2U1", "SU2U1PG", "U1DG", "NONE"),
+ multi=True,
+ )
+ variant(
+ "build_tests",
+ default=True,
+ description="Whether to build unit tests using gtest and gmock",
+ )
+
+ root_cmakelists_dir = "dmrg"
+
+ depends_on("hdf5~mpi")
+ depends_on("lapack")
+ depends_on("openblas+ilp64 threads=openmp", when="blas=openblas")
+ depends_on("intel-oneapi-mkl", when="blas=mkl")
+ depends_on("gsl")
+ depends_on("boost+program_options+filesystem+system+thread+serialization+chrono")
+ depends_on("googletest+gmock", when="+build_tests")
+
+ def cmake_args(self):
+ args = [
+ self.define_from_variant("BUILD_SYMMETRIES", "symmetries"),
+ self.define_from_variant("QCMAQUIS_TESTS", "build_tests"),
+ ]
+ return args
+
+ def patch(self):
+ if self.version <= Version("3.1.3"):
+ filter_file(
+ "#include <vector>",
+ "#include <vector>\n#include <map>",
+ "dmrg/framework/dmrg/utils/results_collector.h",
+ )