From 1c3c4a6aabb84e7996476ddef18596c53feb3b39 Mon Sep 17 00:00:00 2001 From: Greg Sjaardema Date: Thu, 13 Jul 2023 09:56:39 -0600 Subject: [PATCH 1/2] IOSS: Fix bad changes from !compare to != --- packages/seacas/libraries/ioss/src/Ioss_Compare.C | 2 +- .../libraries/ioss/src/Ioss_ElementTopology.C | 4 ++-- .../libraries/ioss/src/Ioss_GroupingEntity.C | 2 +- packages/seacas/libraries/ioss/src/Ioss_Property.C | 4 ++-- .../seacas/libraries/ioss/src/main/CMakeLists.txt | 14 ++++++++++++++ 5 files changed, 20 insertions(+), 6 deletions(-) diff --git a/packages/seacas/libraries/ioss/src/Ioss_Compare.C b/packages/seacas/libraries/ioss/src/Ioss_Compare.C index 87dc2e7832a1..c6834400dd5b 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_Compare.C +++ b/packages/seacas/libraries/ioss/src/Ioss_Compare.C @@ -1019,7 +1019,7 @@ namespace { continue; } - if (in_qa_record_1 == *it) { + if (in_qa_record_1 != *it) { fmt::print(buf, VALUE_MISMATCH, "QA RECORD", in_qa_record_1, (*it)); printed = true; overall_result = false; diff --git a/packages/seacas/libraries/ioss/src/Ioss_ElementTopology.C b/packages/seacas/libraries/ioss/src/Ioss_ElementTopology.C index e417231a637e..1fc7dac108c7 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_ElementTopology.C +++ b/packages/seacas/libraries/ioss/src/Ioss_ElementTopology.C @@ -347,7 +347,7 @@ Ioss::ElementTopology *Ioss::ElementTopology::boundary_type(int bnd_number) cons bool Ioss::ElementTopology::equal_(const Ioss::ElementTopology &rhs, bool quiet) const { - if (this->name_ == rhs.name_) { + if (this->name_ != rhs.name_) { if (!quiet) { fmt::print(Ioss::OUTPUT(), "Element Topology: NAME mismatch ({} vs. {})\n", this->name_.c_str(), rhs.name_.c_str()); @@ -355,7 +355,7 @@ bool Ioss::ElementTopology::equal_(const Ioss::ElementTopology &rhs, bool quiet) return false; } - if (this->masterElementName_ == rhs.masterElementName_) { + if (this->masterElementName_ != rhs.masterElementName_) { if (!quiet) { fmt::print(Ioss::OUTPUT(), "Element Topology: MASTER ELEMENT NAME mismatch ({} vs. {})\n", this->masterElementName_.c_str(), rhs.masterElementName_.c_str()); diff --git a/packages/seacas/libraries/ioss/src/Ioss_GroupingEntity.C b/packages/seacas/libraries/ioss/src/Ioss_GroupingEntity.C index 614478e9bc87..dcfd2c2e6b84 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_GroupingEntity.C +++ b/packages/seacas/libraries/ioss/src/Ioss_GroupingEntity.C @@ -390,7 +390,7 @@ void Ioss::GroupingEntity::property_update(const std::string &property, bool Ioss::GroupingEntity::equal_(const Ioss::GroupingEntity &rhs, bool quiet) const { bool same = true; - if (this->entityName == rhs.entityName) { + if (this->entityName != rhs.entityName) { if (quiet) { return false; } diff --git a/packages/seacas/libraries/ioss/src/Ioss_Property.C b/packages/seacas/libraries/ioss/src/Ioss_Property.C index 6158a2db82c4..55ef27c42512 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_Property.C +++ b/packages/seacas/libraries/ioss/src/Ioss_Property.C @@ -191,7 +191,7 @@ Ioss::Property &Ioss::Property::operator=(Ioss::Property rhs) bool Ioss::Property::operator==(const Ioss::Property &rhs) const { - if (this->name_ == rhs.name_) { + if (this->name_ != rhs.name_) { return false; } @@ -243,7 +243,7 @@ bool Ioss::Property::operator==(const Ioss::Property &rhs) const std::string s_lhs, s_rhs; this->get_value(&s_lhs); rhs.get_value(&s_rhs); - if (s_lhs == s_rhs) { + if (s_lhs != s_rhs) { return false; } break; diff --git a/packages/seacas/libraries/ioss/src/main/CMakeLists.txt b/packages/seacas/libraries/ioss/src/main/CMakeLists.txt index e3b60d788a5c..e4259a8ad732 100644 --- a/packages/seacas/libraries/ioss/src/main/CMakeLists.txt +++ b/packages/seacas/libraries/ioss/src/main/CMakeLists.txt @@ -278,6 +278,20 @@ TRIBITS_ADD_ADVANCED_TEST(exodus32_to_unstructured_cgns ) endif() +TRIBITS_ADD_TEST( + io_shell ARGS "${DECOMP_ARG} --compare ${CMAKE_CURRENT_SOURCE_DIR}/test/8-block.g ${CMAKE_CURRENT_SOURCE_DIR}/test/8-block.g" + NAME io_shell_compare_same_database + NOEXEPREFIX NOEXESUFFIX + COMM mpi serial + ) + +TRIBITS_ADD_TEST( + io_shell ARGS "${DECOMP_ARG} --compare ${CMAKE_CURRENT_SOURCE_DIR}/test/multiple_zones_fields.cgns ${CMAKE_CURRENT_SOURCE_DIR}/test/multiple_zones_fields.cgns" + NAME io_shell_compare_same_database_cgns + NOEXEPREFIX NOEXESUFFIX + COMM mpi serial + ) + TRIBITS_ADD_TEST( io_shell ARGS "${DECOMP_ARG} ${JOIN_ARG} --out_type=null --in_type=generated 10x10x10+shell:xXyYzZ+sideset:xXyY+times:2+variables:element,2,nodal,3,sideset,4 null_file" NAME generated_to_null From 77b8bf5feb0d7beb9dd8a0961f76ce5f555547df Mon Sep 17 00:00:00 2001 From: Greg Sjaardema Date: Fri, 14 Jul 2023 08:27:00 -0600 Subject: [PATCH 2/2] SEACAS: Fix for netcdf without pnetcdf --- packages/seacas/libraries/ioss/src/main/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/seacas/libraries/ioss/src/main/CMakeLists.txt b/packages/seacas/libraries/ioss/src/main/CMakeLists.txt index e4259a8ad732..e6624040a83a 100644 --- a/packages/seacas/libraries/ioss/src/main/CMakeLists.txt +++ b/packages/seacas/libraries/ioss/src/main/CMakeLists.txt @@ -278,12 +278,14 @@ TRIBITS_ADD_ADVANCED_TEST(exodus32_to_unstructured_cgns ) endif() +IF (NOT TPL_ENABLE_MPI OR TPL_Netcdf_Enables_PNetcdf) TRIBITS_ADD_TEST( io_shell ARGS "${DECOMP_ARG} --compare ${CMAKE_CURRENT_SOURCE_DIR}/test/8-block.g ${CMAKE_CURRENT_SOURCE_DIR}/test/8-block.g" NAME io_shell_compare_same_database NOEXEPREFIX NOEXESUFFIX COMM mpi serial ) +ENDIF() TRIBITS_ADD_TEST( io_shell ARGS "${DECOMP_ARG} --compare ${CMAKE_CURRENT_SOURCE_DIR}/test/multiple_zones_fields.cgns ${CMAKE_CURRENT_SOURCE_DIR}/test/multiple_zones_fields.cgns"