1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# 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 *
from spack.pkg.builtin.boost import Boost
class Branson(CMakePackage):
"""Branson's purpose is to study different algorithms for parallel Monte
Carlo transport. Currently it contains particle passing and mesh passing
methods for domain decomposition."""
homepage = "https://github.com/lanl/branson"
url = "https://github.com/lanl/branson/archive/0.82.tar.gz"
git = "https://github.com/lanl/branson.git"
tags = ["proxy-app"]
version("develop", branch="develop")
version(
"0.82",
sha256="7d83d41d0c7ab9c1c906a902165af31182da4604dd0b69aec28d709fe4d7a6ec",
preferred=True,
)
version("0.81", sha256="493f720904791f06b49ff48c17a681532c6a4d9fa59636522cf3f9700e77efe4")
version("0.8", sha256="85ffee110f89be00c37798700508b66b0d15de1d98c54328b6d02a9eb2cf1cb8")
depends_on("mpi@2:")
# TODO: replace this with an explicit list of components of Boost,
# for instance depends_on('boost +filesystem')
# See https://github.com/spack/spack/pull/22303 for reference
depends_on(Boost.with_default_variants, when="@:0.81")
depends_on("metis")
depends_on("parmetis", when="@:0.81")
root_cmakelists_dir = "src"
def cmake_args(self):
spec = self.spec
args = []
args.append("-DCMAKE_C_COMPILER=%s" % spec["mpi"].mpicc)
args.append("-DCMAKE_CXX_COMPILER=%s" % spec["mpi"].mpicxx)
args.append("-DCMAKE_Fortran_COMPILER=%s" % spec["mpi"].mpifc)
return args
def install(self, spec, prefix):
mkdir(prefix.bin)
mkdir(prefix.doc)
install(join_path(self.build_directory, "BRANSON"), prefix.bin)
install("LICENSE.md", prefix.doc)
install("README.md", prefix.doc)
|