openfoam-org: zoltan renumbering and decompsition (#39915)
This commit is contained in:
parent
e99750fd3c
commit
19f8e9147d
1 changed files with 20 additions and 0 deletions
|
@ -88,6 +88,7 @@ class OpenfoamOrg(Package):
|
||||||
)
|
)
|
||||||
variant("metis", default=False, description="With metis decomposition")
|
variant("metis", default=False, description="With metis decomposition")
|
||||||
variant("scotch", default=True, description="With scotch/ptscotch decomposition")
|
variant("scotch", default=True, description="With scotch/ptscotch decomposition")
|
||||||
|
variant("zoltan", default=False, description="Enable Zoltan renumbering and decomposition")
|
||||||
variant(
|
variant(
|
||||||
"precision",
|
"precision",
|
||||||
default="dp",
|
default="dp",
|
||||||
|
@ -104,6 +105,7 @@ class OpenfoamOrg(Package):
|
||||||
# Require scotch with ptscotch - corresponds to standard OpenFOAM setup
|
# Require scotch with ptscotch - corresponds to standard OpenFOAM setup
|
||||||
depends_on("scotch~metis+mpi~int64", when="+scotch~int64")
|
depends_on("scotch~metis+mpi~int64", when="+scotch~int64")
|
||||||
depends_on("scotch~metis+mpi+int64", when="+scotch+int64")
|
depends_on("scotch~metis+mpi+int64", when="+scotch+int64")
|
||||||
|
depends_on("zoltan+shared", when="+zoltan")
|
||||||
|
|
||||||
depends_on("metis@5:", when="+metis")
|
depends_on("metis@5:", when="+metis")
|
||||||
depends_on("metis+int64", when="+metis+int64")
|
depends_on("metis+int64", when="+metis+int64")
|
||||||
|
@ -260,6 +262,13 @@ def patch(self):
|
||||||
rewrite_environ_files( # Adjust etc/bashrc and etc/cshrc
|
rewrite_environ_files( # Adjust etc/bashrc and etc/cshrc
|
||||||
edits, posix=join_path("etc", "bashrc"), cshell=join_path("etc", "cshrc")
|
edits, posix=join_path("etc", "bashrc"), cshell=join_path("etc", "cshrc")
|
||||||
)
|
)
|
||||||
|
if self.spec.satisfies("@10:") and "+zoltan" in self.spec:
|
||||||
|
filter_file("libzoltan.a", "libzoltan.so", join_path("src", "renumber", "Allwmake"))
|
||||||
|
filter_file(
|
||||||
|
"libzoltan.a",
|
||||||
|
"libzoltan.so",
|
||||||
|
join_path("src", "parallel", "decompose", "Allwmake"),
|
||||||
|
)
|
||||||
|
|
||||||
def configure(self, spec, prefix):
|
def configure(self, spec, prefix):
|
||||||
"""Make adjustments to the OpenFOAM configuration files in their various
|
"""Make adjustments to the OpenFOAM configuration files in their various
|
||||||
|
@ -289,6 +298,7 @@ def configure(self, spec, prefix):
|
||||||
self.etc_config = {
|
self.etc_config = {
|
||||||
"CGAL": {},
|
"CGAL": {},
|
||||||
"scotch": {},
|
"scotch": {},
|
||||||
|
"zoltan": {},
|
||||||
"metis": {},
|
"metis": {},
|
||||||
"paraview": [],
|
"paraview": [],
|
||||||
"gperftools": [], # Currently unused
|
"gperftools": [], # Currently unused
|
||||||
|
@ -301,6 +311,16 @@ def configure(self, spec, prefix):
|
||||||
"SCOTCH_VERSION": "scotch-{0}".format(spec["scotch"].version),
|
"SCOTCH_VERSION": "scotch-{0}".format(spec["scotch"].version),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if "+zoltan" in spec:
|
||||||
|
if spec.satisfies("@:9"):
|
||||||
|
self.etc_prefs["ZOLTAN_ARCH_PATH"] = spec["zoltan"].prefix
|
||||||
|
self.etc_prefs["ZOLTAN_VERSION"] = "Zoltan-{0}".format(spec["zoltan"].version)
|
||||||
|
else:
|
||||||
|
self.etc_config["zoltan"] = {
|
||||||
|
"ZOLTAN_ARCH_PATH": spec["zoltan"].prefix,
|
||||||
|
"ZOLTAN_VERSION": "Zoltan-{0}".format(spec["zoltan"].version),
|
||||||
|
}
|
||||||
|
|
||||||
if "+metis" in spec:
|
if "+metis" in spec:
|
||||||
self.etc_config["metis"] = {"METIS_ARCH_PATH": spec["metis"].prefix}
|
self.etc_config["metis"] = {"METIS_ARCH_PATH": spec["metis"].prefix}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue