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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
# 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 Hpddm(Package):
"""High-performance unified framework for domain decomposition methods."""
homepage = "https://github.com/hpddm/hpddm"
url = "https://github.com/hpddm/hpddm"
git = "https://github.com/hpddm/hpddm.git"
maintainers("corentin-dev")
version("main", branch="main")
version("2.1.2", commit="e58205623814f59bf2aec2e2bab8eafcfbd22466")
depends_on("mpi")
depends_on("blas")
depends_on("lapack")
depends_on("mumps")
depends_on("hypre")
depends_on("scalapack")
depends_on("arpack-ng")
depends_on("python")
def configure(self):
makefile_inc = []
# cflags = [
makefile_inc.append("SOLVER ?= MUMPS")
makefile_inc.append("SUBSOLVER ?= MUMPS")
makefile_inc.append("EIGENSOLVER ?= ARPACK")
makefile_inc.append("MPICXX ?= mpic++")
makefile_inc.append("MPICC ?= mpicc")
makefile_inc.append("MPIF90 ?= mpif90")
makefile_inc.append("MPIRUN ?= mpirun -np")
makefile_inc.append("override CXXFLAGS += -std=c++11 -O3 -fPIC")
makefile_inc.append("override CFLAGS += -std=c99 -O3")
makefile_inc.append("INCS =")
makefile_inc.append("LIBS =")
makefile_inc.append("HPDDMFLAGS ?= -DHPDM_NUMBERING='C'")
makefile_inc.append("MUMPS_INCS = ")
makefile_inc.append("PYTHON_INCS = ")
makefile_inc.append("BLAS_LIBS = -lopenblas")
makefile_inc.append("ARPACK_LIBS = -larpack")
makefile_inc.append("SCALAPACK_LIBS = -lscalapack")
makefile_inc.append(
" ".join(
[
"MUMPS_LIBS",
"=",
"-lcmumps",
"-ldmumps",
"-lsmumps",
"-lzmumps",
"-lmumps_common",
"-lpord",
"-fopenmp",
]
)
)
makefile_inc.append("HYPRE_LIBS = -lHYPRE")
makefile_inc.append("PYTHON_LIBS = -lpython3")
with working_dir("."):
with open("Makefile.inc", "w") as fh:
fh.write("\n".join(makefile_inc))
def patch(self):
self.configure()
def install(self, spec, prefix):
make()
install_tree("include", prefix.include)
# make('install')
|