summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Grayson <sam@samgrayson.me>2022-04-18 20:51:13 -0500
committerGitHub <noreply@github.com>2022-04-18 20:51:13 -0500
commit8de726336f5b827b31e84b48b09955a99502a463 (patch)
treef1af74657fc5c927497e12b4bbbcd5f72560cfc5
parent3835ac0c41ce57dda16de98c40b69dac5d26d34a (diff)
downloadspack-8de726336f5b827b31e84b48b09955a99502a463.tar.gz
spack-8de726336f5b827b31e84b48b09955a99502a463.tar.bz2
spack-8de726336f5b827b31e84b48b09955a99502a463.tar.xz
spack-8de726336f5b827b31e84b48b09955a99502a463.zip
Add music package (#30147)
-rw-r--r--var/spack/repos/builtin/packages/music/package.py40
1 files changed, 40 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/music/package.py b/var/spack/repos/builtin/packages/music/package.py
new file mode 100644
index 0000000000..e483d279b9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/music/package.py
@@ -0,0 +1,40 @@
+# Copyright 2013-2022 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)
+
+import os
+
+from spack import *
+
+
+class Music(CMakePackage):
+ """MUSIC (Multi-Scale Initial Conditions for Cosmological Simulations) introduced in [Hahn and Abel][1]
+
+ [1]: https://arxiv.org/abs/1103.6031
+ """
+
+ homepage = "https://www-n.oca.eu/ohahn/MUSIC/"
+ git = "https://bitbucket.org/ohahn/music.git"
+
+ maintainers = ["charmoniumQ"]
+
+ version("2021-12-01", commit="6747c54f3b73ec36719c265fd96362849a83cb45")
+
+ variant("hdf5", default=False, description="Compile with HDF5. Some MUSIC output plug-ins---such as ENZO, Arepo and the MUSIC generic format---require HDF5.")
+ variant("single_prec", default=False, description="Enable single-precision")
+
+ depends_on("fftw@3:")
+ depends_on("gsl")
+ depends_on("hdf5", when="+hdf5")
+
+ def cmake_args(self):
+ return [
+ self.define_from_variant("MUSIC_ENABLE_SINGLE_PRECISION", "single_prec")
+ ]
+
+ def install(self, spec, prefix):
+ music_exe = os.path.join(self.build_directory, "MUSIC")
+ set_executable(music_exe)
+ mkdirp(prefix.bin)
+ install(music_exe, prefix.bin)