From 3038093a7a434631d53e044d161c1529b1983f2d Mon Sep 17 00:00:00 2001 From: arng40 Date: Wed, 18 Mar 2026 11:28:46 +0100 Subject: [PATCH 1/3] :bug: remove basicCleanup from catch --- src/main/main.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/main.cpp b/src/main/main.cpp index 7bfa23a2b02..8b5a60cd662 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -77,7 +77,6 @@ int main( int argc, char *argv[] ) catch( geos::Exception & e ) { // GEOS generated exceptions management ErrorLogger::global().flushCurrentExceptionMessage(); - basicCleanup(); // lvarray error handler is just program termination LvArray::system::callErrorHandler(); } @@ -88,7 +87,6 @@ int main( int argc, char *argv[] ) ::geos::logger::internal::g_rank ) .addCallStackInfo( LvArray::system::stackTrace( true ) ) .getDiagnosticMsg()); - basicCleanup(); // lvarray error handler is just program termination LvArray::system::callErrorHandler(); } From b5da5a5d58be37d51323f932a397158a1ad2a8de Mon Sep 17 00:00:00 2001 From: arng40 Date: Thu, 19 Mar 2026 11:14:28 +0100 Subject: [PATCH 2/3] :art: change basicCleanup signature & update MPI::finalize --- src/coreComponents/common/MpiWrapper.cpp | 15 ++++++++++++--- src/coreComponents/common/MpiWrapper.hpp | 5 +++-- .../format/table/unitTests/testMpiTable.cpp | 2 +- .../common/initializeEnvironment.cpp | 11 ++++------- .../common/initializeEnvironment.hpp | 5 +++-- .../common/unitTests/testMpiWrapper.cpp | 2 +- .../unitTests/testCapillaryPressure.cpp | 2 +- .../unitTests/testRelPerm.cpp | 2 +- .../unitTests/testCO2BrinePVTModels.cpp | 2 +- .../unitTests/testCO2SpycherPruessModels.cpp | 2 +- .../unitTests/testInverseCapillaryPressure.cpp | 2 +- .../unitTests/testMultiFluidBlackOil.cpp | 2 +- .../unitTests/testMultiFluidCO2Brine.cpp | 2 +- .../unitTests/testMultiFluidDeadOil.cpp | 2 +- ...ultiFluidThreePhaseCompositionalMultiphase.cpp | 2 +- ...tMultiFluidTwoPhaseCompositionalMultiphase.cpp | 2 +- .../unitTests/testTwoPhaseImmiscibleFluid.cpp | 2 +- .../unitTests/testErrorHandling.cpp | 2 +- .../unitTests/testObjectCatalog.cpp | 2 +- .../unitTests/testWrapperHelpers.cpp | 2 +- .../unitTests/testBlasLapack.cpp | 2 +- .../fileIO/Outputs/unitTests/testMemoryStats.cpp | 2 +- .../fileIO/timeHistory/unitTests/testHDFFile.cpp | 2 +- .../timeHistory/unitTests/testHDFParallelFile.cpp | 2 +- .../testConformingVirtualElementOrder1.cpp | 2 +- .../unitTests/testMimeticInnerProducts.cpp | 2 +- .../functions/unitTests/testFunctions.cpp | 2 +- .../constitutiveTests/testPVT.cpp | 2 +- .../constitutiveTests/testReactiveFluid.cpp | 2 +- .../constitutiveTests/testRelPermHysteresis.cpp | 2 +- .../constitutiveTests/testTriaxial.cpp | 2 +- .../dataRepositoryTests/testGroupPath.cpp | 2 +- .../dataRepositoryTests/testRestartBasic.cpp | 2 +- .../dataRepositoryTests/testRestartExtended.cpp | 2 +- .../testAquiferBoundaryCondition.cpp | 2 +- .../testFieldSpecification.cpp | 2 +- .../testRecursiveFieldApplication.cpp | 2 +- .../fluidFlowTests/testCompMultiphaseFlow.cpp | 2 +- .../testCompMultiphaseFlowHybrid.cpp | 2 +- .../testCompositionalMultiPhaseMFDPolyhedral.cpp | 2 +- .../testFixedDimHydrostaticEquilibrium.cpp | 2 +- .../testImmiscibleMultiphaseFlow.cpp | 2 +- .../testReactiveCompositionalMultiphaseOBL.cpp | 2 +- .../testSinglePhaseMFDPolyhedral.cpp | 2 +- .../testSinglePhaseReactiveTransport.cpp | 2 +- .../testThermalCompMultiphaseFlow.cpp | 2 +- .../fluidFlowTests/testThermalSinglePhaseFlow.cpp | 2 +- .../fluidFlowTests/testTransmissibility.cpp | 2 +- .../meshTests/testElementRegions.cpp | 2 +- .../meshTests/testMeshGeneration.cpp | 2 +- .../meshTests/testNeighborCommunicator.cpp | 2 +- .../integrationTests/meshTests/testVTKImport.cpp | 2 +- .../solverStatisticsTests/testSolverStats.cpp | 2 +- .../testTableFunctionsOutput.cpp | 2 +- .../wavePropagationTests/testWavePropagation.cpp | 2 +- .../testWavePropagationAcousticFirstOrder.cpp | 2 +- .../testWavePropagationAdjoint1.cpp | 2 +- .../testWavePropagationAttenuationAcoustic.cpp | 2 +- .../testWavePropagationAttenuationAcousticVTI.cpp | 2 +- .../testWavePropagationAttenuationElastic.cpp | 2 +- .../testWavePropagationDAS.cpp | 2 +- .../testWavePropagationDG.cpp | 2 +- .../testWavePropagationElasticFirstOrder.cpp | 2 +- .../testWavePropagationElasticTTI.cpp | 2 +- .../testWavePropagationElasticVTI.cpp | 2 +- .../testWavePropagationQ2.cpp | 2 +- .../testWavePropagationTaper.cpp | 2 +- ...malReservoirCompositionalMultiphaseMSWells.cpp | 2 +- ...malReservoirCompositionalMultiphaseSSWells.cpp | 2 +- .../wellsTests/testOpenClosePerf.cpp | 2 +- ...estReservoirCompositionalMultiphaseMSWells.cpp | 2 +- .../testReservoirSinglePhaseMSWells.cpp | 2 +- .../testReservoirThermalSinglePhaseMSWells.cpp | 2 +- ...ReservoirThermalSinglePhaseMSWells_RateInj.cpp | 2 +- ...malReservoirCompositionalMultiphaseMSWells.cpp | 2 +- ...malReservoirCompositionalMultiphaseSSWells.cpp | 2 +- .../integrationTests/xmlTests/testXML.cpp | 2 +- .../integrationTests/xmlTests/testXMLFile.cpp | 2 +- .../unitTests/testLinearAlgebraUtils.hpp | 2 +- .../unitTests/testLAIHelperFunctions.cpp | 2 +- .../mainInterface/initialization.cpp | 4 ++-- .../mainInterface/initialization.hpp | 3 ++- .../mesh/unitTests/testGraphColoringMPI.cpp | 2 +- .../unitTests/testSinglePhaseMobilityKernel.cpp | 2 +- .../fluidFlow/unitTests/testFlowStatistics.cpp | 2 +- src/main/main.cpp | 14 ++++++++------ src/pygeosx/pygeosx.cpp | 2 +- 87 files changed, 114 insertions(+), 103 deletions(-) diff --git a/src/coreComponents/common/MpiWrapper.cpp b/src/coreComponents/common/MpiWrapper.cpp index b80d0aa802a..45b19c9c63c 100644 --- a/src/coreComponents/common/MpiWrapper.cpp +++ b/src/coreComponents/common/MpiWrapper.cpp @@ -18,6 +18,7 @@ */ #include "MpiWrapper.hpp" +#include "LvArray/src/system.hpp" #include #if defined(__clang__) @@ -152,11 +153,19 @@ void internal::ManagedResources::finalize() m_mpiTypes.clear(); } -void MpiWrapper::finalize() +void MpiWrapper::finalize( bool inError ) { #ifdef GEOS_USE_MPI - internal::getManagedResources().finalize(); - MPI_CHECK_ERROR( MPI_Finalize() ); + if( !inError ) + { + MpiWrapper::commFree( MPI_COMM_GEOS ); + internal::getManagedResources().finalize(); + MPI_CHECK_ERROR( MPI_Finalize() ); + } + else + { + LvArray::system::callErrorHandler(); + } #endif } diff --git a/src/coreComponents/common/MpiWrapper.hpp b/src/coreComponents/common/MpiWrapper.hpp index fd3264a5317..924ed382364 100644 --- a/src/coreComponents/common/MpiWrapper.hpp +++ b/src/coreComponents/common/MpiWrapper.hpp @@ -196,10 +196,11 @@ struct MpiWrapper static int init( int * argc, char * * * argv ); /** - * @brief Free MPI managed resources, then call MPI_Finalize(). + * @brief Free MPI managed resources * Please note that once called, MPI functions, communicators and resources can no longer be used. + * @param inError indicate if an exception occured */ - static void finalize(); + static void finalize( bool inError ); static MPI_Comm commDup( MPI_Comm const comm ); diff --git a/src/coreComponents/common/format/table/unitTests/testMpiTable.cpp b/src/coreComponents/common/format/table/unitTests/testMpiTable.cpp index be3a532565a..7ee793c548d 100644 --- a/src/coreComponents/common/format/table/unitTests/testMpiTable.cpp +++ b/src/coreComponents/common/format/table/unitTests/testMpiTable.cpp @@ -35,7 +35,7 @@ class MpiTestScope ~MpiTestScope() { - geos::cleanupEnvironment(); + geos::cleanupEnvironment( false ); } }; diff --git a/src/coreComponents/common/initializeEnvironment.cpp b/src/coreComponents/common/initializeEnvironment.cpp index f08ad7582c2..c53a242f349 100644 --- a/src/coreComponents/common/initializeEnvironment.cpp +++ b/src/coreComponents/common/initializeEnvironment.cpp @@ -19,7 +19,6 @@ #include "Path.hpp" #include "LvArray/src/system.hpp" #include "common/LifoStorageCommon.hpp" -#include "common/MemoryInfos.hpp" #include "logger/ErrorHandling.hpp" #include "logger/ExternalErrorHandler.hpp" #include @@ -192,10 +191,9 @@ void setupMPI( int argc, char * argv[] ) } /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void finalizeMPI() +void finalizeMPI( bool inError ) { - MpiWrapper::commFree( MPI_COMM_GEOS ); - MpiWrapper::finalize(); + MpiWrapper::finalize( inError ); } /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -330,13 +328,12 @@ void setupEnvironment( int argc, char * argv[] ) } /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void cleanupEnvironment() +void cleanupEnvironment( bool inError ) { - MemoryLogging::getInstance().memoryStatsReport(); LvArray::system::resetSignalHandling(); finalizeLogger(); finalizeCaliper(); - finalizeMPI(); + finalizeMPI( inError ); } } // namespace geos diff --git a/src/coreComponents/common/initializeEnvironment.hpp b/src/coreComponents/common/initializeEnvironment.hpp index 1072e8147a0..f8ec5389fb5 100644 --- a/src/coreComponents/common/initializeEnvironment.hpp +++ b/src/coreComponents/common/initializeEnvironment.hpp @@ -136,7 +136,7 @@ void setupMPI( int argc, char * argv[] ); /** * @brief Finalize MPI. */ -void finalizeMPI(); +void finalizeMPI( bool inError ); /** * @brief Setup CUDA @@ -153,8 +153,9 @@ void setupEnvironment( int argc, char * argv[] ); /** * @brief Cleanup/finalize the environment. + * @param inError indicate if an exception occured */ -void cleanupEnvironment(); +void cleanupEnvironment( bool inError ); #if defined( GEOS_USE_CALIPER ) diff --git a/src/coreComponents/common/unitTests/testMpiWrapper.cpp b/src/coreComponents/common/unitTests/testMpiWrapper.cpp index 4881093f76d..30b28ddf1de 100644 --- a/src/coreComponents/common/unitTests/testMpiWrapper.cpp +++ b/src/coreComponents/common/unitTests/testMpiWrapper.cpp @@ -33,7 +33,7 @@ class MpiTestScope ~MpiTestScope() { - geos::cleanupEnvironment(); + geos::cleanupEnvironment( false ); } }; diff --git a/src/coreComponents/constitutive/capillaryPressure/unitTests/testCapillaryPressure.cpp b/src/coreComponents/constitutive/capillaryPressure/unitTests/testCapillaryPressure.cpp index a91136ef04b..87d69ae98e0 100644 --- a/src/coreComponents/constitutive/capillaryPressure/unitTests/testCapillaryPressure.cpp +++ b/src/coreComponents/constitutive/capillaryPressure/unitTests/testCapillaryPressure.cpp @@ -725,7 +725,7 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/constitutive/relativePermeability/unitTests/testRelPerm.cpp b/src/coreComponents/constitutive/relativePermeability/unitTests/testRelPerm.cpp index ce209d36699..dc515d72320 100644 --- a/src/coreComponents/constitutive/relativePermeability/unitTests/testRelPerm.cpp +++ b/src/coreComponents/constitutive/relativePermeability/unitTests/testRelPerm.cpp @@ -1105,7 +1105,7 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/constitutive/unitTests/testCO2BrinePVTModels.cpp b/src/coreComponents/constitutive/unitTests/testCO2BrinePVTModels.cpp index 30242769d45..de8c6cf7440 100644 --- a/src/coreComponents/constitutive/unitTests/testCO2BrinePVTModels.cpp +++ b/src/coreComponents/constitutive/unitTests/testCO2BrinePVTModels.cpp @@ -1114,7 +1114,7 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - geos::cleanupEnvironment(); + geos::cleanupEnvironment( false ); return result; } diff --git a/src/coreComponents/constitutive/unitTests/testCO2SpycherPruessModels.cpp b/src/coreComponents/constitutive/unitTests/testCO2SpycherPruessModels.cpp index 06feb1c6877..7722776353b 100644 --- a/src/coreComponents/constitutive/unitTests/testCO2SpycherPruessModels.cpp +++ b/src/coreComponents/constitutive/unitTests/testCO2SpycherPruessModels.cpp @@ -378,7 +378,7 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - geos::cleanupEnvironment(); + geos::cleanupEnvironment( false ); return result; } diff --git a/src/coreComponents/constitutive/unitTests/testInverseCapillaryPressure.cpp b/src/coreComponents/constitutive/unitTests/testInverseCapillaryPressure.cpp index f4a71a4b33e..8f8981c411b 100644 --- a/src/coreComponents/constitutive/unitTests/testInverseCapillaryPressure.cpp +++ b/src/coreComponents/constitutive/unitTests/testInverseCapillaryPressure.cpp @@ -519,7 +519,7 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - geos::cleanupEnvironment(); + geos::cleanupEnvironment( false ); return result; } diff --git a/src/coreComponents/constitutive/unitTests/testMultiFluidBlackOil.cpp b/src/coreComponents/constitutive/unitTests/testMultiFluidBlackOil.cpp index 04c9312a8bd..0f176ea365e 100644 --- a/src/coreComponents/constitutive/unitTests/testMultiFluidBlackOil.cpp +++ b/src/coreComponents/constitutive/unitTests/testMultiFluidBlackOil.cpp @@ -277,7 +277,7 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - geos::cleanupEnvironment(); + geos::cleanupEnvironment( false ); return result; } diff --git a/src/coreComponents/constitutive/unitTests/testMultiFluidCO2Brine.cpp b/src/coreComponents/constitutive/unitTests/testMultiFluidCO2Brine.cpp index d908f61445f..12ab961f4c2 100644 --- a/src/coreComponents/constitutive/unitTests/testMultiFluidCO2Brine.cpp +++ b/src/coreComponents/constitutive/unitTests/testMultiFluidCO2Brine.cpp @@ -403,7 +403,7 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - geos::cleanupEnvironment(); + geos::cleanupEnvironment( false ); return result; } diff --git a/src/coreComponents/constitutive/unitTests/testMultiFluidDeadOil.cpp b/src/coreComponents/constitutive/unitTests/testMultiFluidDeadOil.cpp index ff510ddb8d0..d232fe5cdb4 100644 --- a/src/coreComponents/constitutive/unitTests/testMultiFluidDeadOil.cpp +++ b/src/coreComponents/constitutive/unitTests/testMultiFluidDeadOil.cpp @@ -245,7 +245,7 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - geos::cleanupEnvironment(); + geos::cleanupEnvironment( false ); return result; } diff --git a/src/coreComponents/constitutive/unitTests/testMultiFluidThreePhaseCompositionalMultiphase.cpp b/src/coreComponents/constitutive/unitTests/testMultiFluidThreePhaseCompositionalMultiphase.cpp index 879c10ffe1a..6263b427b9a 100644 --- a/src/coreComponents/constitutive/unitTests/testMultiFluidThreePhaseCompositionalMultiphase.cpp +++ b/src/coreComponents/constitutive/unitTests/testMultiFluidThreePhaseCompositionalMultiphase.cpp @@ -223,7 +223,7 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - geos::cleanupEnvironment(); + geos::cleanupEnvironment( false ); return result; } diff --git a/src/coreComponents/constitutive/unitTests/testMultiFluidTwoPhaseCompositionalMultiphase.cpp b/src/coreComponents/constitutive/unitTests/testMultiFluidTwoPhaseCompositionalMultiphase.cpp index b26f3541648..0b2a4d5d81e 100644 --- a/src/coreComponents/constitutive/unitTests/testMultiFluidTwoPhaseCompositionalMultiphase.cpp +++ b/src/coreComponents/constitutive/unitTests/testMultiFluidTwoPhaseCompositionalMultiphase.cpp @@ -275,7 +275,7 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - geos::cleanupEnvironment(); + geos::cleanupEnvironment( false ); return result; } diff --git a/src/coreComponents/constitutive/unitTests/testTwoPhaseImmiscibleFluid.cpp b/src/coreComponents/constitutive/unitTests/testTwoPhaseImmiscibleFluid.cpp index 301e42d583f..ddbe7725b12 100644 --- a/src/coreComponents/constitutive/unitTests/testTwoPhaseImmiscibleFluid.cpp +++ b/src/coreComponents/constitutive/unitTests/testTwoPhaseImmiscibleFluid.cpp @@ -267,7 +267,7 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - geos::cleanupEnvironment(); + geos::cleanupEnvironment( false ); return result; } diff --git a/src/coreComponents/dataRepository/unitTests/testErrorHandling.cpp b/src/coreComponents/dataRepository/unitTests/testErrorHandling.cpp index ee2ed70b739..4d2e0d22de8 100644 --- a/src/coreComponents/dataRepository/unitTests/testErrorHandling.cpp +++ b/src/coreComponents/dataRepository/unitTests/testErrorHandling.cpp @@ -457,6 +457,6 @@ int main( int ac, char * av[] ) ::testing::InitGoogleTest( &ac, av ); geos::setupEnvironment( ac, av ); int const result = RUN_ALL_TESTS(); - geos::cleanupEnvironment( ); + geos::cleanupEnvironment( false ); return result; } diff --git a/src/coreComponents/dataRepository/unitTests/testObjectCatalog.cpp b/src/coreComponents/dataRepository/unitTests/testObjectCatalog.cpp index 737981ea002..62c4f87bc3e 100644 --- a/src/coreComponents/dataRepository/unitTests/testObjectCatalog.cpp +++ b/src/coreComponents/dataRepository/unitTests/testObjectCatalog.cpp @@ -128,7 +128,7 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/dataRepository/unitTests/testWrapperHelpers.cpp b/src/coreComponents/dataRepository/unitTests/testWrapperHelpers.cpp index a5956be0cf6..a2c9a2ffd48 100644 --- a/src/coreComponents/dataRepository/unitTests/testWrapperHelpers.cpp +++ b/src/coreComponents/dataRepository/unitTests/testWrapperHelpers.cpp @@ -240,7 +240,7 @@ int main( int argc, char * argv[] ) int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/denseLinearAlgebra/unitTests/testBlasLapack.cpp b/src/coreComponents/denseLinearAlgebra/unitTests/testBlasLapack.cpp index b3b8046b0f9..1fcfda2d8b6 100644 --- a/src/coreComponents/denseLinearAlgebra/unitTests/testBlasLapack.cpp +++ b/src/coreComponents/denseLinearAlgebra/unitTests/testBlasLapack.cpp @@ -1319,7 +1319,7 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - geos::cleanupEnvironment(); + geos::cleanupEnvironment( false ); return result; } diff --git a/src/coreComponents/fileIO/Outputs/unitTests/testMemoryStats.cpp b/src/coreComponents/fileIO/Outputs/unitTests/testMemoryStats.cpp index b07a30431a2..3279654a7b0 100644 --- a/src/coreComponents/fileIO/Outputs/unitTests/testMemoryStats.cpp +++ b/src/coreComponents/fileIO/Outputs/unitTests/testMemoryStats.cpp @@ -205,6 +205,6 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/fileIO/timeHistory/unitTests/testHDFFile.cpp b/src/coreComponents/fileIO/timeHistory/unitTests/testHDFFile.cpp index ea44608f06a..534871148e0 100644 --- a/src/coreComponents/fileIO/timeHistory/unitTests/testHDFFile.cpp +++ b/src/coreComponents/fileIO/timeHistory/unitTests/testHDFFile.cpp @@ -134,6 +134,6 @@ int main( int ac, char * av[] ) ::testing::InitGoogleTest( &ac, av ); geos::basicSetup( ac, av ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/fileIO/timeHistory/unitTests/testHDFParallelFile.cpp b/src/coreComponents/fileIO/timeHistory/unitTests/testHDFParallelFile.cpp index a447019d854..5d2f77b673c 100644 --- a/src/coreComponents/fileIO/timeHistory/unitTests/testHDFParallelFile.cpp +++ b/src/coreComponents/fileIO/timeHistory/unitTests/testHDFParallelFile.cpp @@ -96,6 +96,6 @@ int main( int ac, char * av[] ) ::testing::InitGoogleTest( &ac, av ); geos::basicSetup( ac, av ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/finiteElement/elementFormulations/unitTests/testConformingVirtualElementOrder1.cpp b/src/coreComponents/finiteElement/elementFormulations/unitTests/testConformingVirtualElementOrder1.cpp index dea9c0437fc..8e40edba7cc 100644 --- a/src/coreComponents/finiteElement/elementFormulations/unitTests/testConformingVirtualElementOrder1.cpp +++ b/src/coreComponents/finiteElement/elementFormulations/unitTests/testConformingVirtualElementOrder1.cpp @@ -363,6 +363,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/finiteVolume/mimeticInnerProducts/unitTests/testMimeticInnerProducts.cpp b/src/coreComponents/finiteVolume/mimeticInnerProducts/unitTests/testMimeticInnerProducts.cpp index 49c1df7a4c5..20f26672893 100644 --- a/src/coreComponents/finiteVolume/mimeticInnerProducts/unitTests/testMimeticInnerProducts.cpp +++ b/src/coreComponents/finiteVolume/mimeticInnerProducts/unitTests/testMimeticInnerProducts.cpp @@ -1785,7 +1785,7 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/functions/unitTests/testFunctions.cpp b/src/coreComponents/functions/unitTests/testFunctions.cpp index 04ca26acca6..43f8aa11364 100644 --- a/src/coreComponents/functions/unitTests/testFunctions.cpp +++ b/src/coreComponents/functions/unitTests/testFunctions.cpp @@ -914,7 +914,7 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - // geos::basicCleanup(); + // geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/constitutiveTests/testPVT.cpp b/src/coreComponents/integrationTests/constitutiveTests/testPVT.cpp index 205153ceda8..7f53f9de463 100644 --- a/src/coreComponents/integrationTests/constitutiveTests/testPVT.cpp +++ b/src/coreComponents/integrationTests/constitutiveTests/testPVT.cpp @@ -42,7 +42,7 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/constitutiveTests/testReactiveFluid.cpp b/src/coreComponents/integrationTests/constitutiveTests/testReactiveFluid.cpp index 8ad1df7c3b5..3ed7d63be8a 100644 --- a/src/coreComponents/integrationTests/constitutiveTests/testReactiveFluid.cpp +++ b/src/coreComponents/integrationTests/constitutiveTests/testReactiveFluid.cpp @@ -42,7 +42,7 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/constitutiveTests/testRelPermHysteresis.cpp b/src/coreComponents/integrationTests/constitutiveTests/testRelPermHysteresis.cpp index aec4f323c85..789d75d684e 100644 --- a/src/coreComponents/integrationTests/constitutiveTests/testRelPermHysteresis.cpp +++ b/src/coreComponents/integrationTests/constitutiveTests/testRelPermHysteresis.cpp @@ -255,7 +255,7 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/constitutiveTests/testTriaxial.cpp b/src/coreComponents/integrationTests/constitutiveTests/testTriaxial.cpp index 9dd8301388c..b03ad5a7d65 100644 --- a/src/coreComponents/integrationTests/constitutiveTests/testTriaxial.cpp +++ b/src/coreComponents/integrationTests/constitutiveTests/testTriaxial.cpp @@ -42,7 +42,7 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/dataRepositoryTests/testGroupPath.cpp b/src/coreComponents/integrationTests/dataRepositoryTests/testGroupPath.cpp index c177254e825..adf1878ae69 100644 --- a/src/coreComponents/integrationTests/dataRepositoryTests/testGroupPath.cpp +++ b/src/coreComponents/integrationTests/dataRepositoryTests/testGroupPath.cpp @@ -182,7 +182,7 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/dataRepositoryTests/testRestartBasic.cpp b/src/coreComponents/integrationTests/dataRepositoryTests/testRestartBasic.cpp index 6f33cf2c8c0..59f9ca45a11 100644 --- a/src/coreComponents/integrationTests/dataRepositoryTests/testRestartBasic.cpp +++ b/src/coreComponents/integrationTests/dataRepositoryTests/testRestartBasic.cpp @@ -140,7 +140,7 @@ int main( int argc, char * argv[] ) int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/dataRepositoryTests/testRestartExtended.cpp b/src/coreComponents/integrationTests/dataRepositoryTests/testRestartExtended.cpp index 6bd04bae088..5d036b81928 100644 --- a/src/coreComponents/integrationTests/dataRepositoryTests/testRestartExtended.cpp +++ b/src/coreComponents/integrationTests/dataRepositoryTests/testRestartExtended.cpp @@ -483,7 +483,7 @@ int main( int argc, char * argv[] ) int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/fieldSpecificationTests/testAquiferBoundaryCondition.cpp b/src/coreComponents/integrationTests/fieldSpecificationTests/testAquiferBoundaryCondition.cpp index d6739274fe9..23114e4750c 100644 --- a/src/coreComponents/integrationTests/fieldSpecificationTests/testAquiferBoundaryCondition.cpp +++ b/src/coreComponents/integrationTests/fieldSpecificationTests/testAquiferBoundaryCondition.cpp @@ -102,7 +102,7 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); int const result = RUN_ALL_TESTS(); - basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/fieldSpecificationTests/testFieldSpecification.cpp b/src/coreComponents/integrationTests/fieldSpecificationTests/testFieldSpecification.cpp index d474ee9c564..1ecca32f36b 100644 --- a/src/coreComponents/integrationTests/fieldSpecificationTests/testFieldSpecification.cpp +++ b/src/coreComponents/integrationTests/fieldSpecificationTests/testFieldSpecification.cpp @@ -445,6 +445,6 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/fieldSpecificationTests/testRecursiveFieldApplication.cpp b/src/coreComponents/integrationTests/fieldSpecificationTests/testRecursiveFieldApplication.cpp index 0e948a64332..d5a458feab1 100644 --- a/src/coreComponents/integrationTests/fieldSpecificationTests/testRecursiveFieldApplication.cpp +++ b/src/coreComponents/integrationTests/fieldSpecificationTests/testRecursiveFieldApplication.cpp @@ -215,7 +215,7 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); int const result = RUN_ALL_TESTS(); - basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/fluidFlowTests/testCompMultiphaseFlow.cpp b/src/coreComponents/integrationTests/fluidFlowTests/testCompMultiphaseFlow.cpp index beab9c48b97..c81e615fd2e 100644 --- a/src/coreComponents/integrationTests/fluidFlowTests/testCompMultiphaseFlow.cpp +++ b/src/coreComponents/integrationTests/fluidFlowTests/testCompMultiphaseFlow.cpp @@ -310,6 +310,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/fluidFlowTests/testCompMultiphaseFlowHybrid.cpp b/src/coreComponents/integrationTests/fluidFlowTests/testCompMultiphaseFlowHybrid.cpp index 75308ff932d..392cd2ca8a6 100644 --- a/src/coreComponents/integrationTests/fluidFlowTests/testCompMultiphaseFlowHybrid.cpp +++ b/src/coreComponents/integrationTests/fluidFlowTests/testCompMultiphaseFlowHybrid.cpp @@ -316,6 +316,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/fluidFlowTests/testCompositionalMultiPhaseMFDPolyhedral.cpp b/src/coreComponents/integrationTests/fluidFlowTests/testCompositionalMultiPhaseMFDPolyhedral.cpp index 8dfd432d91a..1bf74091b90 100644 --- a/src/coreComponents/integrationTests/fluidFlowTests/testCompositionalMultiPhaseMFDPolyhedral.cpp +++ b/src/coreComponents/integrationTests/fluidFlowTests/testCompositionalMultiPhaseMFDPolyhedral.cpp @@ -694,6 +694,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/fluidFlowTests/testFixedDimHydrostaticEquilibrium.cpp b/src/coreComponents/integrationTests/fluidFlowTests/testFixedDimHydrostaticEquilibrium.cpp index 5f9080b6711..39614a91e2f 100644 --- a/src/coreComponents/integrationTests/fluidFlowTests/testFixedDimHydrostaticEquilibrium.cpp +++ b/src/coreComponents/integrationTests/fluidFlowTests/testFixedDimHydrostaticEquilibrium.cpp @@ -41,6 +41,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/fluidFlowTests/testImmiscibleMultiphaseFlow.cpp b/src/coreComponents/integrationTests/fluidFlowTests/testImmiscibleMultiphaseFlow.cpp index 54f446bb5cd..376112925e6 100644 --- a/src/coreComponents/integrationTests/fluidFlowTests/testImmiscibleMultiphaseFlow.cpp +++ b/src/coreComponents/integrationTests/fluidFlowTests/testImmiscibleMultiphaseFlow.cpp @@ -466,6 +466,6 @@ int main( int argc, char * *argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/fluidFlowTests/testReactiveCompositionalMultiphaseOBL.cpp b/src/coreComponents/integrationTests/fluidFlowTests/testReactiveCompositionalMultiphaseOBL.cpp index f5b6c74be36..aa19c64c578 100644 --- a/src/coreComponents/integrationTests/fluidFlowTests/testReactiveCompositionalMultiphaseOBL.cpp +++ b/src/coreComponents/integrationTests/fluidFlowTests/testReactiveCompositionalMultiphaseOBL.cpp @@ -553,6 +553,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/fluidFlowTests/testSinglePhaseMFDPolyhedral.cpp b/src/coreComponents/integrationTests/fluidFlowTests/testSinglePhaseMFDPolyhedral.cpp index 58c8c167f66..d5b1780b3cb 100644 --- a/src/coreComponents/integrationTests/fluidFlowTests/testSinglePhaseMFDPolyhedral.cpp +++ b/src/coreComponents/integrationTests/fluidFlowTests/testSinglePhaseMFDPolyhedral.cpp @@ -548,6 +548,6 @@ int main( int argc, char * *argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/fluidFlowTests/testSinglePhaseReactiveTransport.cpp b/src/coreComponents/integrationTests/fluidFlowTests/testSinglePhaseReactiveTransport.cpp index c4b50dfab30..88add89509d 100644 --- a/src/coreComponents/integrationTests/fluidFlowTests/testSinglePhaseReactiveTransport.cpp +++ b/src/coreComponents/integrationTests/fluidFlowTests/testSinglePhaseReactiveTransport.cpp @@ -577,6 +577,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/fluidFlowTests/testThermalCompMultiphaseFlow.cpp b/src/coreComponents/integrationTests/fluidFlowTests/testThermalCompMultiphaseFlow.cpp index 64f947bf80d..156079c2257 100644 --- a/src/coreComponents/integrationTests/fluidFlowTests/testThermalCompMultiphaseFlow.cpp +++ b/src/coreComponents/integrationTests/fluidFlowTests/testThermalCompMultiphaseFlow.cpp @@ -389,6 +389,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/fluidFlowTests/testThermalSinglePhaseFlow.cpp b/src/coreComponents/integrationTests/fluidFlowTests/testThermalSinglePhaseFlow.cpp index 3cde4b72247..eb70849b808 100644 --- a/src/coreComponents/integrationTests/fluidFlowTests/testThermalSinglePhaseFlow.cpp +++ b/src/coreComponents/integrationTests/fluidFlowTests/testThermalSinglePhaseFlow.cpp @@ -285,6 +285,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/fluidFlowTests/testTransmissibility.cpp b/src/coreComponents/integrationTests/fluidFlowTests/testTransmissibility.cpp index f4f9a046834..2d1c846e246 100644 --- a/src/coreComponents/integrationTests/fluidFlowTests/testTransmissibility.cpp +++ b/src/coreComponents/integrationTests/fluidFlowTests/testTransmissibility.cpp @@ -328,6 +328,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/meshTests/testElementRegions.cpp b/src/coreComponents/integrationTests/meshTests/testElementRegions.cpp index bc50121e685..52d05e93c7e 100644 --- a/src/coreComponents/integrationTests/meshTests/testElementRegions.cpp +++ b/src/coreComponents/integrationTests/meshTests/testElementRegions.cpp @@ -234,7 +234,7 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/meshTests/testMeshGeneration.cpp b/src/coreComponents/integrationTests/meshTests/testMeshGeneration.cpp index 913dbeeb628..e7eb1feb6c5 100644 --- a/src/coreComponents/integrationTests/meshTests/testMeshGeneration.cpp +++ b/src/coreComponents/integrationTests/meshTests/testMeshGeneration.cpp @@ -574,7 +574,7 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/meshTests/testNeighborCommunicator.cpp b/src/coreComponents/integrationTests/meshTests/testNeighborCommunicator.cpp index 8b6fedcc934..998b9d1a8b0 100644 --- a/src/coreComponents/integrationTests/meshTests/testNeighborCommunicator.cpp +++ b/src/coreComponents/integrationTests/meshTests/testNeighborCommunicator.cpp @@ -128,6 +128,6 @@ int main( int ac, char * av[] ) ::testing::InitGoogleTest( &ac, av ); geos::basicSetup( ac, av ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/meshTests/testVTKImport.cpp b/src/coreComponents/integrationTests/meshTests/testVTKImport.cpp index 3eab728a833..bf3644c336a 100644 --- a/src/coreComponents/integrationTests/meshTests/testVTKImport.cpp +++ b/src/coreComponents/integrationTests/meshTests/testVTKImport.cpp @@ -678,7 +678,7 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/solverStatisticsTests/testSolverStats.cpp b/src/coreComponents/integrationTests/solverStatisticsTests/testSolverStats.cpp index 7247a45a722..40bbeeef3a2 100644 --- a/src/coreComponents/integrationTests/solverStatisticsTests/testSolverStats.cpp +++ b/src/coreComponents/integrationTests/solverStatisticsTests/testSolverStats.cpp @@ -319,6 +319,6 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/tableFunctionsFileTests/testTableFunctionsOutput.cpp b/src/coreComponents/integrationTests/tableFunctionsFileTests/testTableFunctionsOutput.cpp index bbb29ff0972..20bc0b29b75 100644 --- a/src/coreComponents/integrationTests/tableFunctionsFileTests/testTableFunctionsOutput.cpp +++ b/src/coreComponents/integrationTests/tableFunctionsFileTests/testTableFunctionsOutput.cpp @@ -319,6 +319,6 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagation.cpp b/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagation.cpp index b9bc488b6d3..63104e977e1 100644 --- a/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagation.cpp +++ b/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagation.cpp @@ -269,6 +269,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationAcousticFirstOrder.cpp b/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationAcousticFirstOrder.cpp index a5908f2c03b..eb71deb5f9b 100644 --- a/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationAcousticFirstOrder.cpp +++ b/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationAcousticFirstOrder.cpp @@ -253,6 +253,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationAdjoint1.cpp b/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationAdjoint1.cpp index 025320fceb3..bcb2f845dde 100644 --- a/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationAdjoint1.cpp +++ b/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationAdjoint1.cpp @@ -408,6 +408,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationAttenuationAcoustic.cpp b/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationAttenuationAcoustic.cpp index 83a2fb8eb0f..469f719769b 100644 --- a/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationAttenuationAcoustic.cpp +++ b/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationAttenuationAcoustic.cpp @@ -217,6 +217,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationAttenuationAcousticVTI.cpp b/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationAttenuationAcousticVTI.cpp index 8bd8ab88733..0643fd2fe6a 100644 --- a/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationAttenuationAcousticVTI.cpp +++ b/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationAttenuationAcousticVTI.cpp @@ -231,6 +231,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationAttenuationElastic.cpp b/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationAttenuationElastic.cpp index a52f36a3e94..e225d7f6491 100644 --- a/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationAttenuationElastic.cpp +++ b/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationAttenuationElastic.cpp @@ -236,6 +236,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationDAS.cpp b/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationDAS.cpp index da7fc6960df..d61e97b799d 100644 --- a/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationDAS.cpp +++ b/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationDAS.cpp @@ -225,6 +225,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationDG.cpp b/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationDG.cpp index e01cbc734c1..8e1231646fa 100644 --- a/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationDG.cpp +++ b/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationDG.cpp @@ -206,6 +206,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationElasticFirstOrder.cpp b/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationElasticFirstOrder.cpp index 3ffe1c0ee18..2fba08ddd9b 100644 --- a/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationElasticFirstOrder.cpp +++ b/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationElasticFirstOrder.cpp @@ -299,6 +299,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationElasticTTI.cpp b/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationElasticTTI.cpp index f9178bdc012..4d758b59225 100644 --- a/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationElasticTTI.cpp +++ b/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationElasticTTI.cpp @@ -260,6 +260,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationElasticVTI.cpp b/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationElasticVTI.cpp index f23026aabad..7c12d2ad03f 100644 --- a/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationElasticVTI.cpp +++ b/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationElasticVTI.cpp @@ -244,6 +244,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationQ2.cpp b/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationQ2.cpp index 056894f0235..c1edd938635 100644 --- a/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationQ2.cpp +++ b/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationQ2.cpp @@ -238,6 +238,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationTaper.cpp b/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationTaper.cpp index 880da1c8892..08779545667 100644 --- a/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationTaper.cpp +++ b/src/coreComponents/integrationTests/wavePropagationTests/testWavePropagationTaper.cpp @@ -229,6 +229,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/wellsTests/testIsothermalReservoirCompositionalMultiphaseMSWells.cpp b/src/coreComponents/integrationTests/wellsTests/testIsothermalReservoirCompositionalMultiphaseMSWells.cpp index da7d3606fb2..1c72aaef665 100644 --- a/src/coreComponents/integrationTests/wellsTests/testIsothermalReservoirCompositionalMultiphaseMSWells.cpp +++ b/src/coreComponents/integrationTests/wellsTests/testIsothermalReservoirCompositionalMultiphaseMSWells.cpp @@ -670,7 +670,7 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); removeFile( "co2flash.txt" ); removeFile( "pvtliquid.txt" ); removeFile( "pvtgas.txt" ); diff --git a/src/coreComponents/integrationTests/wellsTests/testIsothermalReservoirCompositionalMultiphaseSSWells.cpp b/src/coreComponents/integrationTests/wellsTests/testIsothermalReservoirCompositionalMultiphaseSSWells.cpp index 277c7a2a38c..6c1188101d1 100644 --- a/src/coreComponents/integrationTests/wellsTests/testIsothermalReservoirCompositionalMultiphaseSSWells.cpp +++ b/src/coreComponents/integrationTests/wellsTests/testIsothermalReservoirCompositionalMultiphaseSSWells.cpp @@ -762,7 +762,7 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); removeFile( "co2flash.txt" ); removeFile( "pvtliquid.txt" ); removeFile( "pvtgas.txt" ); diff --git a/src/coreComponents/integrationTests/wellsTests/testOpenClosePerf.cpp b/src/coreComponents/integrationTests/wellsTests/testOpenClosePerf.cpp index c45c9a21e68..9790d3aa341 100644 --- a/src/coreComponents/integrationTests/wellsTests/testOpenClosePerf.cpp +++ b/src/coreComponents/integrationTests/wellsTests/testOpenClosePerf.cpp @@ -567,6 +567,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/wellsTests/testReservoirCompositionalMultiphaseMSWells.cpp b/src/coreComponents/integrationTests/wellsTests/testReservoirCompositionalMultiphaseMSWells.cpp index f1ca32e9e81..9edac71104e 100644 --- a/src/coreComponents/integrationTests/wellsTests/testReservoirCompositionalMultiphaseMSWells.cpp +++ b/src/coreComponents/integrationTests/wellsTests/testReservoirCompositionalMultiphaseMSWells.cpp @@ -554,6 +554,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/wellsTests/testReservoirSinglePhaseMSWells.cpp b/src/coreComponents/integrationTests/wellsTests/testReservoirSinglePhaseMSWells.cpp index d75ad50a957..d8acdba1ad0 100644 --- a/src/coreComponents/integrationTests/wellsTests/testReservoirSinglePhaseMSWells.cpp +++ b/src/coreComponents/integrationTests/wellsTests/testReservoirSinglePhaseMSWells.cpp @@ -583,6 +583,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/wellsTests/testReservoirThermalSinglePhaseMSWells.cpp b/src/coreComponents/integrationTests/wellsTests/testReservoirThermalSinglePhaseMSWells.cpp index d10f1da56f6..d076efde7f0 100644 --- a/src/coreComponents/integrationTests/wellsTests/testReservoirThermalSinglePhaseMSWells.cpp +++ b/src/coreComponents/integrationTests/wellsTests/testReservoirThermalSinglePhaseMSWells.cpp @@ -740,6 +740,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/wellsTests/testReservoirThermalSinglePhaseMSWells_RateInj.cpp b/src/coreComponents/integrationTests/wellsTests/testReservoirThermalSinglePhaseMSWells_RateInj.cpp index 255b0201692..49bc175b94f 100644 --- a/src/coreComponents/integrationTests/wellsTests/testReservoirThermalSinglePhaseMSWells_RateInj.cpp +++ b/src/coreComponents/integrationTests/wellsTests/testReservoirThermalSinglePhaseMSWells_RateInj.cpp @@ -730,6 +730,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/wellsTests/testThermalReservoirCompositionalMultiphaseMSWells.cpp b/src/coreComponents/integrationTests/wellsTests/testThermalReservoirCompositionalMultiphaseMSWells.cpp index 98aa57a5c84..1377b70040c 100644 --- a/src/coreComponents/integrationTests/wellsTests/testThermalReservoirCompositionalMultiphaseMSWells.cpp +++ b/src/coreComponents/integrationTests/wellsTests/testThermalReservoirCompositionalMultiphaseMSWells.cpp @@ -810,7 +810,7 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); removeFile( "co2flash.txt" ); removeFile( "pvtliquid.txt" ); removeFile( "pvtgas.txt" ); diff --git a/src/coreComponents/integrationTests/wellsTests/testThermalReservoirCompositionalMultiphaseSSWells.cpp b/src/coreComponents/integrationTests/wellsTests/testThermalReservoirCompositionalMultiphaseSSWells.cpp index 76fa20d4cea..6262c7516ca 100644 --- a/src/coreComponents/integrationTests/wellsTests/testThermalReservoirCompositionalMultiphaseSSWells.cpp +++ b/src/coreComponents/integrationTests/wellsTests/testThermalReservoirCompositionalMultiphaseSSWells.cpp @@ -799,7 +799,7 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); removeFile( "co2flash.txt" ); removeFile( "pvtliquid.txt" ); removeFile( "pvtgas.txt" ); diff --git a/src/coreComponents/integrationTests/xmlTests/testXML.cpp b/src/coreComponents/integrationTests/xmlTests/testXML.cpp index 7ca474d4ca2..1214e7b2d0f 100644 --- a/src/coreComponents/integrationTests/xmlTests/testXML.cpp +++ b/src/coreComponents/integrationTests/xmlTests/testXML.cpp @@ -102,7 +102,7 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/integrationTests/xmlTests/testXMLFile.cpp b/src/coreComponents/integrationTests/xmlTests/testXMLFile.cpp index 274a5d52e9b..241fb141c07 100644 --- a/src/coreComponents/integrationTests/xmlTests/testXMLFile.cpp +++ b/src/coreComponents/integrationTests/xmlTests/testXMLFile.cpp @@ -235,7 +235,7 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/linearAlgebra/unitTests/testLinearAlgebraUtils.hpp b/src/coreComponents/linearAlgebra/unitTests/testLinearAlgebraUtils.hpp index 19cd2754d33..938309b4600 100644 --- a/src/coreComponents/linearAlgebra/unitTests/testLinearAlgebraUtils.hpp +++ b/src/coreComponents/linearAlgebra/unitTests/testLinearAlgebraUtils.hpp @@ -52,7 +52,7 @@ class LinearAlgebraTestScope ~LinearAlgebraTestScope() { finalizeLAI(); - geos::cleanupEnvironment(); + geos::cleanupEnvironment( false ); } }; diff --git a/src/coreComponents/linearAlgebra/utilities/unitTests/testLAIHelperFunctions.cpp b/src/coreComponents/linearAlgebra/utilities/unitTests/testLAIHelperFunctions.cpp index 64eb5c027b5..e4d9437c6a7 100644 --- a/src/coreComponents/linearAlgebra/utilities/unitTests/testLAIHelperFunctions.cpp +++ b/src/coreComponents/linearAlgebra/utilities/unitTests/testLAIHelperFunctions.cpp @@ -222,6 +222,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/mainInterface/initialization.cpp b/src/coreComponents/mainInterface/initialization.cpp index 39367cbb263..d371259f990 100644 --- a/src/coreComponents/mainInterface/initialization.cpp +++ b/src/coreComponents/mainInterface/initialization.cpp @@ -309,10 +309,10 @@ std::unique_ptr< CommandLineOptions > basicSetup( int argc, char * argv[], bool } /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void basicCleanup() +void basicCleanup( bool inError ) { finalizeLAI(); - cleanupEnvironment(); + cleanupEnvironment( inError ); } diff --git a/src/coreComponents/mainInterface/initialization.hpp b/src/coreComponents/mainInterface/initialization.hpp index 85cd4331066..c4568cbaca7 100644 --- a/src/coreComponents/mainInterface/initialization.hpp +++ b/src/coreComponents/mainInterface/initialization.hpp @@ -42,8 +42,9 @@ std::unique_ptr< CommandLineOptions > basicSetup( int argc, char * argv[], bool /** * @brief Perform the basic GEOSX cleanup. + * @param inError indicate if an exception occured */ -void basicCleanup(); +void basicCleanup( bool inError ); diff --git a/src/coreComponents/mesh/unitTests/testGraphColoringMPI.cpp b/src/coreComponents/mesh/unitTests/testGraphColoringMPI.cpp index 65bdaf0aa77..43de5c608a7 100644 --- a/src/coreComponents/mesh/unitTests/testGraphColoringMPI.cpp +++ b/src/coreComponents/mesh/unitTests/testGraphColoringMPI.cpp @@ -163,7 +163,7 @@ int main( int argc, char * *argv ) // Finalize MPI MpiWrapper::commFree( MPI_COMM_GEOS ); - MpiWrapper::finalize(); + MpiWrapper::finalize( false ); return result; } diff --git a/src/coreComponents/physicsSolvers/fluidFlow/kernels/singlePhase/unitTests/testSinglePhaseMobilityKernel.cpp b/src/coreComponents/physicsSolvers/fluidFlow/kernels/singlePhase/unitTests/testSinglePhaseMobilityKernel.cpp index 62f73daf746..1d5922acd92 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/kernels/singlePhase/unitTests/testSinglePhaseMobilityKernel.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/kernels/singlePhase/unitTests/testSinglePhaseMobilityKernel.cpp @@ -64,7 +64,7 @@ int main( int argc, char * * argv ) int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/coreComponents/physicsSolvers/fluidFlow/unitTests/testFlowStatistics.cpp b/src/coreComponents/physicsSolvers/fluidFlow/unitTests/testFlowStatistics.cpp index 356661e434e..3a13736181f 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/unitTests/testFlowStatistics.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/unitTests/testFlowStatistics.cpp @@ -1157,6 +1157,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; } diff --git a/src/main/main.cpp b/src/main/main.cpp index 8b5a60cd662..5302455ca0e 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -16,6 +16,7 @@ // Source includes #include "common/logger/ErrorHandling.hpp" #include "common/logger/Logger.hpp" +#include "common/MemoryInfos.hpp" #include "common/TimingMacros.hpp" #include "common/Units.hpp" #include "mainInterface/initialization.hpp" @@ -56,7 +57,9 @@ int main( int argc, char *argv[] ) runTime = state.getRunTime(); } - basicCleanup(); + MemoryLogging::getInstance().memoryStatsReport(); + + basicCleanup( false ); std::chrono::system_clock::time_point endTime = std::chrono::system_clock::now(); std::chrono::system_clock::duration totalTime = endTime - startTime; @@ -71,14 +74,13 @@ int main( int argc, char *argv[] ) // A NotAnError is thrown if "-h" or "--help" option is used. catch( NotAnError const & ) { - basicCleanup(); + basicCleanup( false ); return 0; } catch( geos::Exception & e ) { // GEOS generated exceptions management ErrorLogger::global().flushCurrentExceptionMessage(); - // lvarray error handler is just program termination - LvArray::system::callErrorHandler(); + basicCleanup( true ); } catch( std::exception const & e ) { // native exceptions management @@ -87,8 +89,8 @@ int main( int argc, char *argv[] ) ::geos::logger::internal::g_rank ) .addCallStackInfo( LvArray::system::stackTrace( true ) ) .getDiagnosticMsg()); - // lvarray error handler is just program termination - LvArray::system::callErrorHandler(); + basicCleanup( true ); + std::abort(); } return 0; } diff --git a/src/pygeosx/pygeosx.cpp b/src/pygeosx/pygeosx.cpp index fff9d7aea9c..0e283217066 100644 --- a/src/pygeosx/pygeosx.cpp +++ b/src/pygeosx/pygeosx.cpp @@ -271,7 +271,7 @@ PyObject * finalize( PyObject * self, PyObject * args ) noexcept } g_state = nullptr; - basicCleanup(); + geos::basicCleanup( false ); Py_RETURN_NONE; } From 078a156bf446dc4e5c2c25da608de09e8f391bdb Mon Sep 17 00:00:00 2001 From: arng40 Date: Thu, 19 Mar 2026 11:15:11 +0100 Subject: [PATCH 3/3] :bug: mssing param --- .../codingUtilities/tests/testParallelTestUtilities.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreComponents/codingUtilities/tests/testParallelTestUtilities.cpp b/src/coreComponents/codingUtilities/tests/testParallelTestUtilities.cpp index 69872e0813a..d60c584647b 100644 --- a/src/coreComponents/codingUtilities/tests/testParallelTestUtilities.cpp +++ b/src/coreComponents/codingUtilities/tests/testParallelTestUtilities.cpp @@ -68,6 +68,6 @@ int main( int ac, char * av[] ) ::testing::InitGoogleTest( &ac, av ); geos::basicSetup( ac, av ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); + geos::basicCleanup( false ); return result; }