From 0f2272c0fceb2d5dc9817d7ce0673e3735505b00 Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Fri, 10 Feb 2023 11:06:47 -0500 Subject: [PATCH 1/3] verify: fail if the upward adjacency limit is exceeded --- apf/apfVerify.cc | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/apf/apfVerify.cc b/apf/apfVerify.cc index a348fa40a..0663b3b6c 100644 --- a/apf/apfVerify.cc +++ b/apf/apfVerify.cc @@ -84,6 +84,18 @@ static void verifyUp(Mesh* m, UpwardCounts& guc, m->getUp(e, up); int upwardCount = up.n; + /* this is here for some spiderwebby simmetrix meshes */ + if (upwardCount >= 200) { + std::stringstream ss; + ss << "warning: entity of type " << m->getType(e) + << " at " << getLinearCentroid(m, e) << " has " + << upwardCount << " upward adjacencies\n"; + // use a stringstream to prevent output from different procs mixing + std::string s = ss.str(); + lion_eprint(1,"%s",s.c_str()); + PCU_ALWAYS_ASSERT(upwardCount < MDS_SET_MAX); + } + /* check for duplicates in the upward list */ for (int i = 0; i < upwardCount; ++i) for (int j = i + 1; j < upwardCount; ++j) @@ -169,16 +181,7 @@ static void verifyUp(Mesh* m, UpwardCounts& guc, if (!adjacentToUpwardGhost && abort_on_error) fail(s.c_str()); } - /* this is here for some spiderwebby simmetrix meshes */ - if (upwardCount >= 200) { - std::stringstream ss; - ss << "warning: entity of type " << m->getType(e) - << " at " << getLinearCentroid(m, e) << " has " - << upwardCount << " upward adjacencies\n"; - // use a stringstream to prevent output from different procs mixing - std::string s = ss.str(); - lion_eprint(1,"%s",s.c_str()); - } + } static void verifyResidence(Mesh* m, MeshEntity* e) From c41076b14d1b74bd6dfc050c05fd82cff441d092 Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Sat, 14 Feb 2026 21:08:23 -0500 Subject: [PATCH 2/3] MDS_SET_MAX header --- apf/apfVerify.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/apf/apfVerify.cc b/apf/apfVerify.cc index 0663b3b6c..8db0b5d6d 100644 --- a/apf/apfVerify.cc +++ b/apf/apfVerify.cc @@ -6,6 +6,7 @@ #include #include #include "stdlib.h" // malloc +#include "mds_config.h" //MDS_SET_MAX namespace apf { From 643d63510589ab33fa002e4d02fcfb9e26f4d564 Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Sat, 14 Feb 2026 21:17:46 -0500 Subject: [PATCH 3/3] specify header dir --- apf/apfVerify.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apf/apfVerify.cc b/apf/apfVerify.cc index 8db0b5d6d..cb0f7906d 100644 --- a/apf/apfVerify.cc +++ b/apf/apfVerify.cc @@ -6,7 +6,7 @@ #include #include #include "stdlib.h" // malloc -#include "mds_config.h" //MDS_SET_MAX +#include "mds/mds_config.h" //MDS_SET_MAX namespace apf {