Skip to content

Commit b0b9cf1

Browse files
clevelamClevelandmthcrts
authored
add a '+no_warning' variant to METIS to prevent pervasive warning (spack#47452)
* add a '+no_warning' variant to metis to prevent prevasive warning * fix formating --------- Co-authored-by: Cleveland <[email protected]> Co-authored-by: mcourtois <[email protected]>
1 parent 8898e14 commit b0b9cf1

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

var/spack/repos/builtin/packages/draco/package.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ class Draco(CMakePackage):
7777
depends_on("lapack", when="+lapack")
7878
depends_on("[email protected]:", when="@7.4.0:+libquo")
7979
depends_on("metis", when="+parmetis")
80+
depends_on("metis@5:+no_warning", when="@7.19:+parmetis")
8081
depends_on("parmetis", when="+parmetis")
8182
depends_on("qt", when="+qt", type=("build", "link", "run"))
8283
depends_on("superlu-dist@:5", when="@:7.6+superlu_dist")
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/libmetis/pmetis.c b/libmetis/pmetis.c
2+
index 9174aa3..f8ced79 100644
3+
--- a/libmetis/pmetis.c
4+
+++ b/libmetis/pmetis.c
5+
@@ -163,8 +163,6 @@ idx_t MlevelRecursiveBisection(ctrl_t *ctrl, graph_t *graph, idx_t nparts,
6+
real_t wsum, *tpwgts2;
7+
8+
if ((nvtxs = graph->nvtxs) == 0) {
9+
- printf("\t***Cannot bisect a graph with 0 vertices!\n"
10+
- "\t***You are trying to partition a graph into too many parts!\n");
11+
return 0;
12+
}
13+

var/spack/repos/builtin/packages/metis/package.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ class Metis(CMakePackage, MakefilePackage):
3434
depends_on("c", type="build")
3535
depends_on("cxx", type="build")
3636

37+
variant(
38+
"no_warning",
39+
default=False,
40+
description="Disable failed partition warning print on all ranks",
41+
)
42+
patch("no_warning.patch", when="@5:+no_warning")
43+
3744
build_system(
3845
conditional("cmake", when="@5:"), conditional("makefile", when="@:4"), default="cmake"
3946
)

0 commit comments

Comments
 (0)