From 9b89145b6d9248b9af0a5503dab71fa1f6c534e4 Mon Sep 17 00:00:00 2001 From: arng40 Date: Mon, 16 Mar 2026 17:15:39 +0100 Subject: [PATCH 1/3] :art: add local scope --- .../mainInterface/ProblemManager.cpp | 31 +++++++++++-------- .../physicsSolvers/PhysicsSolverBase.cpp | 30 +++++++++--------- 2 files changed, 34 insertions(+), 27 deletions(-) diff --git a/src/coreComponents/mainInterface/ProblemManager.cpp b/src/coreComponents/mainInterface/ProblemManager.cpp index 3c2718b1955..5d190f966e4 100644 --- a/src/coreComponents/mainInterface/ProblemManager.cpp +++ b/src/coreComponents/mainInterface/ProblemManager.cpp @@ -172,25 +172,30 @@ void ProblemManager::problemSetup() postInputInitializationRecursive(); - LogPart meshGenerationLog( "Mesh generation", MpiWrapper::commRank() == 0 ); - meshGenerationLog.begin(); - generateMesh(); - meshGenerationLog.end(); + { + LogPart meshGenerationLog( "Mesh generation", MpiWrapper::commRank() == 0 ); + meshGenerationLog.begin(); + generateMesh(); + meshGenerationLog.end(); + } // initialize_postMeshGeneration(); - LogPart numericalMethodLog( "Numerical Methods", MpiWrapper::commRank() == 0 ); - numericalMethodLog.begin(); - applyNumericalMethods(); - numericalMethodLog.end(); + { + LogPart numericalMethodLog( "Numerical Methods", MpiWrapper::commRank() == 0 ); + numericalMethodLog.begin(); + applyNumericalMethods(); + numericalMethodLog.end(); + } registerDataOnMeshRecursive( getDomainPartition().getMeshBodies() ); initialize(); - - LogPart importFieldsLog( "Import fields", MpiWrapper::commRank() == 0 ); - importFieldsLog.begin(); - importFields(); - importFieldsLog.end(); + { + LogPart importFieldsLog( "Import fields", MpiWrapper::commRank() == 0 ); + importFieldsLog.begin(); + importFields(); + importFieldsLog.end(); + } } diff --git a/src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp b/src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp index 942fa1ed041..51fab7226b7 100644 --- a/src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp +++ b/src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp @@ -374,25 +374,27 @@ void PhysicsSolverBase::logEndOfCycleInformation( integer const cycleNumber, integer const numOfSubSteps, stdVector< real64 > const & subStepDts ) const { - LogPart logpart( "TIMESTEP", MpiWrapper::commRank() == 0 ); - logpart.addEndDescription( "- Cycle ", cycleNumber ); - logpart.addEndDescription( "- N substeps ", numOfSubSteps ); - - std::stringstream logMessage; - for( integer i = 0; i < numOfSubSteps; ++i ) { - if( i > 0 ) + LogPart logpart( "TIMESTEP", MpiWrapper::commRank() == 0 ); + logpart.addEndDescription( "- Cycle ", cycleNumber ); + logpart.addEndDescription( "- N substeps ", numOfSubSteps ); + + std::stringstream logMessage; + for( integer i = 0; i < numOfSubSteps; ++i ) { - logMessage << ", "; + if( i > 0 ) + { + logMessage << ", "; + } + logMessage << subStepDts[i] << " " << units::getSymbol( units::Unit::Time ); } - logMessage << subStepDts[i] << " " << units::getSymbol( units::Unit::Time ); - } - if( logMessage.rdbuf()->in_avail() == 0 ) - logMessage << "/"; + if( logMessage.rdbuf()->in_avail() == 0 ) + logMessage << "/"; - logpart.addEndDescription( "- substep dts ", logMessage.str() ); - logpart.end(); + logpart.addEndDescription( "- substep dts ", logMessage.str() ); + logpart.end(); + } if( isLogLevelActive< logInfo::SolverExecutionDetails >( getLogLevel())) getIterationStats().outputStatistics(); From 7db99caa682358ed2c8239155531c442903d3e2b Mon Sep 17 00:00:00 2001 From: arng40 Date: Mon, 16 Mar 2026 17:17:49 +0100 Subject: [PATCH 2/3] Squashed commit of the following: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit db2ac8456733b23cb9b4d1e5196fcc97b777289d Merge: 6a010ae8b9 7cf45e89f2 Author: arng40 Date: Fri Mar 13 15:17:51 2026 +0100 Merge remote-tracking branch 'origin/develop' into feat/dudes/warning-report commit 6a010ae8b9a18cce120af469c7b6d0ca72781c86 Author: arng40 Date: Fri Mar 13 15:16:55 2026 +0100 add gatherBuffer to MPIWrapper commit de4c9e7f99fc38e1830f068a96991606263d41b3 Author: arng40 Date: Thu Mar 12 16:37:32 2026 +0100 doc commit 183e0fe06981b9f0922fb4fb52ee427541ac93da Author: arng40 Date: Thu Mar 12 16:16:17 2026 +0100 add operator and missing doc commit 1027ff2a3d2d93a9157cfed827eea2732b56a2cc Author: arng40 Date: Thu Mar 12 15:00:45 2026 +0100 adress review ( doc + logic ) commit 72c0bc7cb685a067ce187a67c200d5bac777c2be Author: arng40 Date: Wed Mar 11 14:51:31 2026 +0100 update addRow commit 7c89805d6906bdf9f743f402c72663d273ab8a3b Merge: 115a23eabe 40b88be553 Author: arng40 Date: Wed Mar 11 13:48:09 2026 +0100 Merge remote-tracking branch 'origin/develop' into feat/dudes/warning-report commit 115a23eabecf9792ec4c4ca762780bfd6746eac7 Author: arng40 Date: Wed Mar 11 11:51:04 2026 +0100 set logPart to diagnosticMsg commit c6177abd71c53753cea6adbac06fd0a14e7bf973 Author: arng40 Date: Wed Mar 11 11:50:37 2026 +0100 log record private & removed log part from argument commit 171b278349b7b24ce648b05fc041f262fb327876 Author: arng40 Date: Mon Mar 9 16:21:02 2026 +0100 fix reinterpret_cast commit d458668deb2328f0702e985a9a1d109555f29822 Author: arng40 Date: Mon Mar 9 15:15:30 2026 +0100 doxygen + some renaming commit 9f316123d3941c9915ace3c7a794e4eae8458c9b Author: arng40 Date: Mon Mar 9 14:34:58 2026 +0100 fix desrialization commit f966ebb6ccd9103f958556d5796a373266acaa81 Author: arng40 Date: Mon Mar 9 14:20:45 2026 +0100 improve readability commit edcf4f87801503479f84829ebd62b6542dee62fa Author: arng40 Date: Mon Mar 9 11:17:23 2026 +0100 address comment commit f9d250151385f76839347de62bae3b4472170914 Author: arng40 Date: Mon Mar 9 10:59:12 2026 +0100 some renaming and logical update commit aad10c4af8f0cb9d5a7f02adf7659e901954a822 Author: arng40 Date: Fri Mar 6 17:15:50 2026 +0100 wip create a logRecord commit 04817627e0947cf09c880180b7c4a33cab55792f Author: arng40 Date: Wed Mar 4 17:06:01 2026 +0100 remove pack functions commit 440becaf34e3124a3a2d7c44f061262faba7ee12 Author: arng40 Date: Wed Mar 4 10:40:50 2026 +0100 make add row template commit 98762f0c24e6809b8631dc90129a0639de09130f Author: arng40 Date: Wed Mar 4 10:20:06 2026 +0100 comment file commit fe76e629accc345637920eda08d3a2f1488ea30d Author: arng40 Date: Wed Mar 4 10:06:41 2026 +0100 remove circular dep commit 21ddd3b077c83723c244e66a7b77113e0383bb42 Author: arng40 Date: Tue Mar 3 10:16:41 2026 +0100 revert modif commit 872c04e7c70973874074ef08ff35b88f5c1cc4fa Author: arng40 Date: Tue Mar 3 15:04:51 2026 +0100 remove static_assart commit d112ef648e30f7b32039f28d2af79f7bc2bb31c8 Author: arng40 Date: Tue Mar 3 15:00:31 2026 +0100 remove default value from useboundchecking commit 564b8dc88f44e1fb1fed1e67a186b84ffb316505 Author: arng40 Date: Tue Mar 3 14:46:35 2026 +0100 add assert commit 1b724b1ea333f6920980226d90a4eb39c5ef19ea Author: arng40 Date: Tue Mar 3 14:01:01 2026 +0100 test commit f851adc413bde9b1efef0109daef69d8b461b491 Author: arng40 Date: Tue Mar 3 13:57:32 2026 +0100 remove using fromm cpp commit c7332ee1770a2f2ab20e851cdee161f95a324190 Author: arng40 Date: Tue Mar 3 12:09:55 2026 +0100 function def commit 73ccf6ac65583562e18e527e25ccbf99be59b257 Author: arng40 Date: Tue Mar 3 11:57:49 2026 +0100 comment suspect line commit edd7100f63fcb91b01eef79832d770650cd47716 Author: arng40 Date: Tue Mar 3 11:47:08 2026 +0100 reset default allocator commit d56319244230013dcc07ec29757935afbc48cc42 Author: arng40 Date: Tue Mar 3 11:37:32 2026 +0100 revert on stdVectorWrapper commit 3020d1b89442faa9aa54d9b8c15fbefdc1c4656c Author: arng40 Date: Tue Mar 3 11:15:55 2026 +0100 addRow template commit aed8db1d6a3899bc87aa3a0333b14dd5f92f6a1a Author: arng40 Date: Tue Mar 3 10:25:39 2026 +0100 remove files commit fa00c7d5f9502054f43c7cf85182e28d71da4c12 Author: arng40 Date: Tue Mar 3 10:16:41 2026 +0100 comment geos commit c0343faef8eab2d2c4d8b510c974606ba39d5190 Author: arng40 Date: Tue Mar 3 10:12:27 2026 +0100 same for fixedsizequeue commit 00865f49b44da9a1e6a19908d9fe34a11ddeaf39 Author: arng40 Date: Tue Mar 3 10:04:23 2026 +0100 include manually commit 7c4a2208b5c5ad638d81b2df03d767a2a514f206 Merge: 0cfb65ed26 3f88ac3709 Author: arng40 Date: Tue Mar 3 09:56:59 2026 +0100 Merge remote-tracking branch 'origin/develop' into feat/dudes/warning-report commit 0cfb65ed26c2f1b64f30ba4e890a3ccbe93b5fcd Author: arng40 Date: Tue Mar 3 09:52:32 2026 +0100 test debbuging commit 1ee6c7b45742670a2f40436c1f44b366e454cb40 Author: arng40 Date: Mon Mar 2 16:50:09 2026 +0100 revert ci and let realease to false commit 45753f0fea0ec461ab6eed8cb8eea87b23f8499a Author: arng40 Date: Mon Mar 2 16:22:23 2026 +0100 setbounds checking to off for realease commit 10df7ad46acefccb90aca0ae626730804d846939 Author: arng40 Date: Mon Mar 2 16:11:11 2026 +0100 uniformize test commit a923dfdac4330b48009cc39fdaf687b64f14216c Author: arng40 Date: Mon Mar 2 15:59:58 2026 +0100 fix logHistory hash + revert stdContainer default bound checking commit c32d8eb3efd09d7a349bf5370e727cf0d41b8b48 Author: arng40 Date: Mon Mar 2 15:41:12 2026 +0100 uniformize default allocator commit e55a4458d2f16ee5fad183deae24042402590cf7 Author: arng40 Date: Mon Mar 2 14:47:46 2026 +0100 remove uneccesary ";" commit ff38be6d9ffbf771c46053bc2be659c3210adfe3 Author: arng40 Date: Mon Mar 2 14:05:01 2026 +0100 uncrustify + doxygen commit 3bd0dfc5879d127303807f421006ae1405d53d83 Merge: c72cd764f5 b66c8db2d1 Author: arng40 Date: Mon Mar 2 11:33:04 2026 +0100 Merge remote-tracking branch 'origin/develop' into feat/dudes/warning-report commit c72cd764f5ba45bc1030dd195b6d222b2fa99f6e Author: arng40 Date: Mon Mar 2 11:31:50 2026 +0100 errorContext => diagnosticContext commit 054bef0c6b73996c30c6561c6ab147e4beafb1d0 Author: arng40 Date: Mon Mar 2 11:27:17 2026 +0100 add log part and remove import commit 28eedf4e57c8d3ac398f9043e7ffa8d9206be4b0 Author: arng40 Date: Mon Mar 2 11:01:46 2026 +0100 clean up & doxygen commit 313343598cdb14c95ba5f9717e691d65491d3e32 Author: arng40 Date: Fri Feb 27 17:20:20 2026 +0100 remove enumString from logPart commit 84fab9b666a480afe3063baad2183cf3d999eb56 Author: arng40 Date: Fri Feb 27 15:41:40 2026 +0100 remove unecessary code / include commit e157689a66c2da5ccf5e27992666894a81e89b05 Author: arng40 Date: Fri Feb 27 15:34:46 2026 +0100 MPI batched by tuple commit 8747eb48ee5896d78dde7b61bf26011f04dcff49 Author: arng40 Date: Fri Feb 27 11:39:08 2026 +0100 gather by tuple commit f0efb2a253ec1ba63e813bc30e4bd2a58f7636fe Author: arng40 Date: Fri Feb 27 10:39:53 2026 +0100 fix bug commit 5faba4c593377e8a32edd2a2a0cd91d7452294de Merge: e002df71dc 931a7f6f60 Author: arng40 Date: Thu Feb 26 15:18:22 2026 +0100 Merge remote-tracking branch 'origin/develop' into feat/dudes/warning-report commit e002df71dcdb5693a51f1d1beb9784eae6a5e48e Author: arng40 Date: Thu Feb 26 14:30:01 2026 +0100 update smart_ptr buffer to vector< buffer_unit_type > commit 09ceacc2cbf8c4a44d0c617f787e8b8170d814e5 Author: arng40 Date: Tue Feb 24 17:18:01 2026 +0100 update to unique_ptr commit ea9cd5f99a627d9990a9566a15d91f3053d92877 Author: arng40 Date: Mon Feb 23 15:46:13 2026 +0100 displaying correctly commit 5abd889fb0c57299a62ee8610ed498191bdbb228 Merge: 012c5a8204 2b691d50a1 Author: arng40 Date: Mon Feb 23 15:45:54 2026 +0100 Merge remote-tracking branch 'origin/develop' into feat/dudes/warning-report commit 012c5a82041a9742dc8601cb3f6605570183d1cb Author: arng40 Date: Mon Feb 23 11:06:23 2026 +0100 setup MPI (draft) commit aa925c7a1d9ac5d66930109c98c9943e02aa09d7 Merge: feaf4c0876 498d8e3387 Author: arng40 Date: Tue Feb 3 09:45:05 2026 +0100 Merge remote-tracking branch 'origin/develop' into feat/dudes/warning-report commit feaf4c0876c9486cfb37da417af36fac719675ea Author: arng40 Date: Mon Feb 2 15:47:51 2026 +0100 1st part packing commit 5932b5c27b73da07033843dbeceaf08dc58e21d9 Merge: fec93acb6e 4298b30bdd Author: arng40 Date: Wed Jan 28 15:33:02 2026 +0100 Merge remote-tracking branch 'origin/refactor/dudes/error-context' into feat/dudes/warning-report commit fec93acb6ebc690f78e20d0a6f19cddf548503e8 Author: arng40 Date: Wed Jan 28 15:31:58 2026 +0100 temporary log commit 4298b30bddd6644a6023be3a3600a7bbf965b57a Author: arng40 Date: Wed Jan 28 15:14:50 2026 +0100 uncr commit e6843d86a63e8b8232d2d6e6480d2ce98b768888 Author: arng40 Date: Wed Jan 28 15:12:09 2026 +0100 remove function commit 18bf5395d0502a6f2623cfc3df9e71048c15827a Author: arng40 Date: Wed Jan 28 15:10:49 2026 +0100 add MPI (draft) commit 57fb5bdc5bc6171b746e43965db6ed30ed512c50 Author: arng40 Date: Wed Jan 28 15:10:28 2026 +0100 structure for getting total errormsg commit c9d8e4415e1c6f21b086970d5a63c8c639cdabe0 Author: arng40 Date: Wed Jan 28 15:09:31 2026 +0100 update rv commit 59ad6597a82c986565675a11fff499143d36293e Author: arng40 Date: Wed Jan 28 15:07:59 2026 +0100 attempt clang bug commit 3a1983b02f2069e67d09603cdc308bf057f48171 Merge: d6f00acc27 05272590c5 Author: Arnaud DUDES <155963334+arng40@users.noreply.github.com> Date: Wed Jan 28 10:17:56 2026 +0100 Merge branch 'develop' into refactor/dudes/error-context commit d6f00acc279e1f032845c8443cc2e77704d39bef Merge: d8ef456270 1cda08b8f9 Author: arng40 Date: Tue Jan 27 10:30:24 2026 +0100 Merge branch 'refactor/dudes/error-context' of https://github.com/GEOS-DEV/GEOS into refactor/dudes/error-context commit d8ef456270416df8c1fc94d75254ef0795e671c7 Author: arng40 Date: Tue Jan 27 10:30:11 2026 +0100 uncrustify commit 1cda08b8f93a2fe0e2f69de8c39133bf9eeded9f Merge: f3c4bc7ce0 951cfc10ec Author: Arnaud DUDES <155963334+arng40@users.noreply.github.com> Date: Tue Jan 27 09:22:44 2026 +0100 Merge branch 'develop' into refactor/dudes/error-context commit f3c4bc7ce00782953d91ba26a4ca64a9d55ca03c Author: MelReyCG Date: Mon Jan 26 15:54:11 2026 +0100 πŸ’„small layout proposal commit dd11209dfed1554621d9ece3275a1ce3c32b9c02 Author: MelReyCG Date: Mon Jan 26 15:28:39 2026 +0100 πŸ’„adding forgotten space line at end of message commit 99849aa60dad12c12e23051b691ac100cd62c02d Author: MelReyCG Date: Mon Jan 26 15:23:39 2026 +0100 πŸ›simple compil fix commit c886b9e27c6a9ae50437fe7b0a47ffecdb9bed37 Merge: 7015589329 47bdf8b714 Author: MelReyCG <122801580+MelReyCG@users.noreply.github.com> Date: Mon Jan 26 11:17:48 2026 +0100 Merge branch 'develop' into refactor/dudes/error-context commit 9296d6d397e74a3c5c9a05b88f362dae2a658879 Author: arng40 Date: Thu Jan 22 11:14:53 2026 +0100 update table reporting test commit 0b0ef4d9e2a19d41b3a8c71b53cf380567749ebe Author: arng40 Date: Wed Jan 21 17:04:39 2026 +0100 doxygen commit 9f63f968c3a2272aff6f1e77950569c01134aace Author: arng40 Date: Wed Jan 21 16:57:24 2026 +0100 logHistory doxygen commit 686a73fb26b0835aa9fa17833af01b28b7771c53 Author: arng40 Date: Wed Jan 21 16:49:07 2026 +0100 Fix test commit 55e2f96dc96096697851aef76eacfecafdb3ac42 Merge: e15f3d91b2 7015589329 Author: arng40 Date: Wed Jan 21 16:36:16 2026 +0100 Merge remote-tracking branch 'origin/refactor/dudes/error-context' into feat/dudes/warning-report commit e15f3d91b2c5557c54ac60f4ab0c280e6b6ae280 Author: arng40 Date: Wed Jan 21 16:11:30 2026 +0100 fix test for now commit fc43a987b709e74bcd8fc08633570fab7d8af170 Author: arng40 Date: Wed Jan 21 11:29:54 2026 +0100 clean up header commit 2a377ea96020078ce9dcdd0e7659e86e037bbc63 Author: arng40 Date: Wed Jan 21 11:29:31 2026 +0100 add logHistory commit 70155893298d7f36b08ab687fa24ce8661d5f075 Author: arng40 Date: Tue Jan 20 16:34:48 2026 +0100 renaming commit 6f444d623f40b02a64b9c70a0bffcf56339b110b Author: arng40 Date: Tue Jan 20 16:31:30 2026 +0100 thread_local put back + renaming commit 44a54d8aec51bd76dfd4d76a2bc6bce53605a293 Author: arng40 Date: Tue Jan 20 14:19:23 2026 +0100 doxygen commit 456e767d2c6d82cb81a4d85d86586905b749d5c5 Author: arng40 Date: Tue Jan 20 10:49:11 2026 +0100 add yaml mutex commit da560e127995b5e43463c70728f954cbf94f4ea5 Author: MelReyCG Date: Mon Jan 19 15:52:04 2026 +0100 🎨 formating consistency commit ea56eb8c29cde2290c1d7076c7202b7d3918de58 Author: arng40 Date: Mon Jan 19 11:53:18 2026 +0100 doxygen commit 9a1f1b1805ce8a5d66b51a61136529ae19fd2b69 Author: arng40 Date: Mon Jan 19 11:47:08 2026 +0100 switch row/column commit 8e112aabe5c04662b0c162319f25ad91a7092832 Author: arng40 Date: Fri Jan 16 17:17:43 2026 +0100 add log part enum string commit 05e8a6ae4fade9271c84ff24ad929c8aaf0dae71 Author: arng40 Date: Fri Jan 16 16:15:35 2026 +0100 revert enum string commit a8e9633c8fe2d966b3ae74694cf6f5a2364e4894 Author: arng40 Date: Fri Jan 16 14:33:49 2026 +0100 Squashed commit of the following: commit 0a5af0022873df23c2a6e348dc6c8e2909250f0e Author: arng40 Date: Fri Jan 16 10:16:29 2026 +0100 add mutex commit 5eb71ce57f7d62889d74c0073b46a5bc7ea95731 Author: arng40 Date: Thu Jan 15 17:29:41 2026 +0100 format commit b52842710d47e8637edc9d3ea17439c551982d36 Author: arng40 Date: Thu Jan 15 17:19:41 2026 +0100 fix signal test commit a9421017f6cf7ca18fa1b402730d4a2a58b9b713 Author: arng40 Date: Thu Jan 15 17:19:12 2026 +0100 relocation commit 359f256c0711d55a1dbe7ad703d11b1b51d2f060 Author: arng40 Date: Thu Jan 15 17:13:38 2026 +0100 fix review commit ff2f3fa7b2adecad5d5e20ce8589685e11739811 Author: arng40 Date: Thu Jan 15 17:03:19 2026 +0100 alignment commit 535e87f5fab9c8b5e3a697e249d23c537dca86ed Author: arng40 Date: Thu Jan 15 16:59:41 2026 +0100 small refacto commit 588084da10341a1e313019d35ad63f00b620f336 Author: arng40 Date: Thu Jan 15 15:05:10 2026 +0100 uncristify commit b351784681265a7b8b2e361d911f0aaebe615d52 Author: arng40 Date: Thu Jan 15 15:02:19 2026 +0100 doxygen commit 6adbae1f59a679318eb1ecfdf62ed3e385bf8f19 Merge: aa9d539712 58178e4276 Author: arng40 Date: Thu Jan 15 14:53:29 2026 +0100 Merge remote-tracking branch 'origin/develop' into refactor/dudes/error-context commit aa9d53971279b01a3b6ed187f241a36cbbcee89b Author: arng40 Date: Thu Jan 15 14:38:08 2026 +0100 add signal test + last remarks commit cf1c00f35d8b160fd8615849d12732216e9f295c Author: arng40 Date: Wed Jan 14 17:23:59 2026 +0100 update initCurrentExcep + add GeosExcp msg + update test commit e8682c7123f95b3f5d6f871b2a287f1d139066da Author: arng40 Date: Wed Jan 14 16:43:48 2026 +0100 add signal test commit fbed3ed7a9142c25fcc6dd0e2f2e5e7d062599ff Author: arng40 Date: Fri Jan 9 17:32:36 2026 +0100 update format commit ec4703c729dca129027ad2562eaa4f1e6dc1ccf3 Author: arng40 Date: Fri Jan 9 15:52:39 2026 +0100 remove debug commit b529d7a882296114c2009068388403f8e304c104 Author: arng40 Date: Fri Jan 9 15:52:11 2026 +0100 rename get method & sort errorContext commit e40167f87b7a4426cda0615b63ff5b0bee700160 Author: arng40 Date: Fri Jan 9 14:35:40 2026 +0100 update builder commit 3ed52be0c4971a440eef970735c57e20729dd773 Author: arng40 Date: Fri Jan 9 14:35:18 2026 +0100 update prepareWhat commit 16057c18006e5e331ca1548e9efa758fbe05d683 Author: arng40 Date: Thu Jan 8 15:04:50 2026 +0100 remove debug log commit a4e69cde88f4e7f9fb0405d178295fe527a38cb2 Author: arng40 Date: Thu Jan 8 11:55:52 2026 +0100 modify yaml & renaming & fix commit 1495a68c0c79c650716d2c3cdf2cd69a5bc08f0a Author: arng40 Date: Wed Jan 7 15:54:56 2026 +0100 rename ErrorMsg & adapt errorLogger function called in catch commit 62fcf3184c57c44b7f43b2a1efa66f8f1db10a9c Author: arng40 Date: Wed Jan 7 11:37:49 2026 +0100 extract inerclass & refacto ErrorBuilder commit 38023c2ca3cf00c15dc5f1cc7f2da245023e34ba Author: arng40 Date: Mon Jan 5 14:22:25 2026 +0100 delete ErrorMsg method & remove unecessary method in Builder commit 35d8707f1bd274bfb2558934381f981dd406ba13 Author: arng40 Date: Wed Dec 24 16:52:50 2025 +0100 missing const commit 4a5b4feef01850ee195eea3e16251ce8c5504eeb Author: arng40 Date: Wed Dec 24 16:24:47 2025 +0100 remove redundant lmsg in case of multiple rank commit ec7ddc1f1060aff0aee44ff5cb47ca57056f6b3e Author: arng40 Date: Wed Dec 24 15:43:02 2025 +0100 uncrustify commit abc6d2a4cdc3b070417aba9403d74888f9d6a604 Author: arng40 Date: Wed Dec 24 15:33:35 2025 +0100 fix encapsulation in ErrorLogger by adding BuilderPattern + improve clarity commit 7df78fffd314ed07ad2419a530fb7a9c451112c3 Author: arng40 Date: Mon Dec 22 10:52:37 2025 +0100 add context to std::exception commit d4db78b7916b6eadea2a80d353e940c17052ca2d Author: arng40 Date: Mon Dec 22 10:50:34 2025 +0100 improve writeToAscii commit a2b31d1154374b2ccfb13706719ff4c830fca811 Merge: 2a639a7373 618c96ffa5 Author: Arnaud DUDES <155963334+arng40@users.noreply.github.com> Date: Mon Dec 22 09:51:10 2025 +0100 Merge branch 'develop' into refactor/dudes/error-context commit 048b141368714fbe253f8a42dfa0bc329e51c3c1 Merge: dfb0c8156f 58178e4276 Author: arng40 Date: Fri Jan 16 11:12:41 2026 +0100 Merge remote-tracking branch 'origin/develop' into feat/dudes/warning-report commit 0a5af0022873df23c2a6e348dc6c8e2909250f0e Author: arng40 Date: Fri Jan 16 10:16:29 2026 +0100 add mutex commit 5eb71ce57f7d62889d74c0073b46a5bc7ea95731 Author: arng40 Date: Thu Jan 15 17:29:41 2026 +0100 format commit b52842710d47e8637edc9d3ea17439c551982d36 Author: arng40 Date: Thu Jan 15 17:19:41 2026 +0100 fix signal test commit a9421017f6cf7ca18fa1b402730d4a2a58b9b713 Author: arng40 Date: Thu Jan 15 17:19:12 2026 +0100 relocation commit 359f256c0711d55a1dbe7ad703d11b1b51d2f060 Author: arng40 Date: Thu Jan 15 17:13:38 2026 +0100 fix review commit ff2f3fa7b2adecad5d5e20ce8589685e11739811 Author: arng40 Date: Thu Jan 15 17:03:19 2026 +0100 alignment commit 535e87f5fab9c8b5e3a697e249d23c537dca86ed Author: arng40 Date: Thu Jan 15 16:59:41 2026 +0100 small refacto commit 588084da10341a1e313019d35ad63f00b620f336 Author: arng40 Date: Thu Jan 15 15:05:10 2026 +0100 uncristify commit b351784681265a7b8b2e361d911f0aaebe615d52 Author: arng40 Date: Thu Jan 15 15:02:19 2026 +0100 doxygen commit 6adbae1f59a679318eb1ecfdf62ed3e385bf8f19 Merge: aa9d539712 58178e4276 Author: arng40 Date: Thu Jan 15 14:53:29 2026 +0100 Merge remote-tracking branch 'origin/develop' into refactor/dudes/error-context commit aa9d53971279b01a3b6ed187f241a36cbbcee89b Author: arng40 Date: Thu Jan 15 14:38:08 2026 +0100 add signal test + last remarks commit cf1c00f35d8b160fd8615849d12732216e9f295c Author: arng40 Date: Wed Jan 14 17:23:59 2026 +0100 update initCurrentExcep + add GeosExcp msg + update test commit e8682c7123f95b3f5d6f871b2a287f1d139066da Author: arng40 Date: Wed Jan 14 16:43:48 2026 +0100 add signal test commit fbed3ed7a9142c25fcc6dd0e2f2e5e7d062599ff Author: arng40 Date: Fri Jan 9 17:32:36 2026 +0100 update format commit ec4703c729dca129027ad2562eaa4f1e6dc1ccf3 Author: arng40 Date: Fri Jan 9 15:52:39 2026 +0100 remove debug commit b529d7a882296114c2009068388403f8e304c104 Author: arng40 Date: Fri Jan 9 15:52:11 2026 +0100 rename get method & sort errorContext commit e40167f87b7a4426cda0615b63ff5b0bee700160 Author: arng40 Date: Fri Jan 9 14:35:40 2026 +0100 update builder commit 3ed52be0c4971a440eef970735c57e20729dd773 Author: arng40 Date: Fri Jan 9 14:35:18 2026 +0100 update prepareWhat commit 16057c18006e5e331ca1548e9efa758fbe05d683 Author: arng40 Date: Thu Jan 8 15:04:50 2026 +0100 remove debug log commit a4e69cde88f4e7f9fb0405d178295fe527a38cb2 Author: arng40 Date: Thu Jan 8 11:55:52 2026 +0100 modify yaml & renaming & fix commit 1495a68c0c79c650716d2c3cdf2cd69a5bc08f0a Author: arng40 Date: Wed Jan 7 15:54:56 2026 +0100 rename ErrorMsg & adapt errorLogger function called in catch commit 62fcf3184c57c44b7f43b2a1efa66f8f1db10a9c Author: arng40 Date: Wed Jan 7 11:37:49 2026 +0100 extract inerclass & refacto ErrorBuilder commit 38023c2ca3cf00c15dc5f1cc7f2da245023e34ba Author: arng40 Date: Mon Jan 5 14:22:25 2026 +0100 delete ErrorMsg method & remove unecessary method in Builder commit dfb0c8156fb06975b7203295d636bdd96e131203 Merge: aa22991cfb 618c96ffa5 Author: arng40 Date: Wed Dec 24 17:18:44 2025 +0100 Merge remote-tracking branch 'origin/develop' into feat/dudes/warning-report commit aa22991cfbd6b0f1a04e9ce3c0b31229f58a9ff4 Author: arng40 Date: Wed Dec 24 17:05:55 2025 +0100 Squashed commit of the following: commit 35d8707f1bd274bfb2558934381f981dd406ba13 Author: arng40 Date: Wed Dec 24 16:52:50 2025 +0100 missing const commit 4a5b4feef01850ee195eea3e16251ce8c5504eeb Author: arng40 Date: Wed Dec 24 16:24:47 2025 +0100 remove redundant lmsg in case of multiple rank commit ec7ddc1f1060aff0aee44ff5cb47ca57056f6b3e Author: arng40 Date: Wed Dec 24 15:43:02 2025 +0100 uncrustify commit abc6d2a4cdc3b070417aba9403d74888f9d6a604 Author: arng40 Date: Wed Dec 24 15:33:35 2025 +0100 fix encapsulation in ErrorLogger by adding BuilderPattern + improve clarity commit 7df78fffd314ed07ad2419a530fb7a9c451112c3 Author: arng40 Date: Mon Dec 22 10:52:37 2025 +0100 add context to std::exception commit d4db78b7916b6eadea2a80d353e940c17052ca2d Author: arng40 Date: Mon Dec 22 10:50:34 2025 +0100 improve writeToAscii commit a2b31d1154374b2ccfb13706719ff4c830fca811 Merge: 2a639a7373 618c96ffa5 Author: Arnaud DUDES <155963334+arng40@users.noreply.github.com> Date: Mon Dec 22 09:51:10 2025 +0100 Merge branch 'develop' into refactor/dudes/error-context commit 618c96ffa55640448f3120418b2d9bfba5f252fd Author: sohailwaziri <90070246+sohailwaziri@users.noreply.github.com> Date: Fri Dec 19 12:50:50 2025 -0800 feat: Multiphase hydrostatic initialisation (#3795) Co-authored-by: Sohail WAZIRI Co-authored-by: Dickson Kachuma <81433670+dkachuma@users.noreply.github.com> Co-authored-by: Jian HUANG commit 35d8707f1bd274bfb2558934381f981dd406ba13 Author: arng40 Date: Wed Dec 24 16:52:50 2025 +0100 missing const commit 4a5b4feef01850ee195eea3e16251ce8c5504eeb Author: arng40 Date: Wed Dec 24 16:24:47 2025 +0100 remove redundant lmsg in case of multiple rank commit 417f3b300ce9fdbca0e2507b256f49d76283a9d1 Author: arng40 Date: Wed Dec 24 16:21:10 2025 +0100 fix after merge commit d511e1658bae46a7b14022c4ec5aee3885ab9f76 Author: arng40 Date: Wed Dec 24 15:51:59 2025 +0100 Squashed commit of the following: commit ec7ddc1f1060aff0aee44ff5cb47ca57056f6b3e Author: arng40 Date: Wed Dec 24 15:43:02 2025 +0100 uncrustify commit abc6d2a4cdc3b070417aba9403d74888f9d6a604 Author: arng40 Date: Wed Dec 24 15:33:35 2025 +0100 fix encapsulation in ErrorLogger by adding BuilderPattern + improve clarity commit 7df78fffd314ed07ad2419a530fb7a9c451112c3 Author: arng40 Date: Mon Dec 22 10:52:37 2025 +0100 add context to std::exception commit d4db78b7916b6eadea2a80d353e940c17052ca2d Author: arng40 Date: Mon Dec 22 10:50:34 2025 +0100 improve writeToAscii commit a2b31d1154374b2ccfb13706719ff4c830fca811 Merge: 2a639a7373 618c96ffa5 Author: Arnaud DUDES <155963334+arng40@users.noreply.github.com> Date: Mon Dec 22 09:51:10 2025 +0100 Merge branch 'develop' into refactor/dudes/error-context commit 618c96ffa55640448f3120418b2d9bfba5f252fd Author: sohailwaziri <90070246+sohailwaziri@users.noreply.github.com> Date: Fri Dec 19 12:50:50 2025 -0800 feat: Multiphase hydrostatic initialisation (#3795) Co-authored-by: Sohail WAZIRI Co-authored-by: Dickson Kachuma <81433670+dkachuma@users.noreply.github.com> Co-authored-by: Jian HUANG commit dd6082632e43aaa30c31dab74ee20a126eb3c545 Author: arng40 Date: Wed Dec 24 15:49:57 2025 +0100 clean and remove write access to private variable commit ec7ddc1f1060aff0aee44ff5cb47ca57056f6b3e Author: arng40 Date: Wed Dec 24 15:43:02 2025 +0100 uncrustify commit abc6d2a4cdc3b070417aba9403d74888f9d6a604 Author: arng40 Date: Wed Dec 24 15:33:35 2025 +0100 fix encapsulation in ErrorLogger by adding BuilderPattern + improve clarity commit ce6a7dd80a7ed42df262542f270b6deac87f7346 Author: arng40 Date: Tue Dec 23 17:22:18 2025 +0100 simplify toString commit 745c8839125c2f45e10ec8d04d502d4746174b9a Author: arng40 Date: Tue Dec 23 16:50:04 2025 +0100 first output still draft commit ac46643cadea47f0a9e56128a9e55a0dfb2d330a Author: arng40 Date: Tue Dec 23 15:51:38 2025 +0100 add loggerReport + separate EnumString commit 7df78fffd314ed07ad2419a530fb7a9c451112c3 Author: arng40 Date: Mon Dec 22 10:52:37 2025 +0100 add context to std::exception commit d4db78b7916b6eadea2a80d353e940c17052ca2d Author: arng40 Date: Mon Dec 22 10:50:34 2025 +0100 improve writeToAscii commit a2b31d1154374b2ccfb13706719ff4c830fca811 Merge: 2a639a7373 618c96ffa5 Author: Arnaud DUDES <155963334+arng40@users.noreply.github.com> Date: Mon Dec 22 09:51:10 2025 +0100 Merge branch 'develop' into refactor/dudes/error-context commit 2a639a7373ca119c9f12f4d39e8d6a77aab13975 Merge: cee0059eb4 e9982030d5 Author: Arnaud DUDES <155963334+arng40@users.noreply.github.com> Date: Fri Dec 19 16:21:50 2025 +0100 Merge branch 'develop' into refactor/dudes/error-context commit cee0059eb4ae4fe640f67fcd4af556423ebe5214 Author: arng40 Date: Fri Dec 19 16:20:41 2025 +0100 uncrustify & doxygen commit 08973a350899a57ff4ab36ad15b8943da178a59b Author: arng40 Date: Fri Dec 19 15:42:58 2025 +0100 reorder function + add constructor to ErrorContext commit 4e74b00242c5724ef20e1b67416a168dc241920f Merge: 60a1f3acdd 6d2b61f9c9 Author: Arnaud DUDES <155963334+arng40@users.noreply.github.com> Date: Wed Dec 17 10:12:33 2025 +0100 Merge branch 'develop' into refactor/dudes/error-context commit 60a1f3acdd7408ef17da287e7f3a028cbb272884 Merge: ab9895b6f0 5b4bcb8e2d Author: Arnaud DUDES <155963334+arng40@users.noreply.github.com> Date: Wed Dec 10 17:59:45 2025 +0100 Merge branch 'develop' into refactor/dudes/error-context commit ab9895b6f039bad0f857dc78535c8a84df3433de Author: arng40 Date: Wed Dec 10 17:57:20 2025 +0100 Uncrustify commit daec00634d64d98e6b7632f883ac30db930d9a1f Author: arng40 Date: Wed Dec 10 17:56:45 2025 +0100 fix test commit 855cf80455049e275e097b98eb782ef4af494974 Author: arng40 Date: Wed Dec 10 17:48:02 2025 +0100 update log formatting & output commit bbb72ff09d8d4cd07c4b65d4305d379fb80a01d9 Author: arng40 Date: Wed Dec 10 17:47:42 2025 +0100 fix log wrong formatting commit c48c52da7467ace6e107a13e76924c3f7b9649f8 Author: arng40 Date: Wed Dec 10 17:47:03 2025 +0100 add log test commit 5a52a75754c48303a0bdbda5228f73fd8956edef Author: arng40 Date: Mon Dec 8 16:53:54 2025 +0100 doxygen commit ae60c25cd188d821fc2e090f3190ca5ffc5041d4 Author: arng40 Date: Mon Dec 8 16:44:18 2025 +0100 move writeToAscii to cpp commit 0aeddcfbd62b3bb0ba676d6c2b218b6a2c45086a Author: arng40 Date: Mon Dec 8 16:02:22 2025 +0100 fix cuda compil commit 30baf23f91ee541057fb394e49b2a31bda6f84be Author: arng40 Date: Fri Dec 5 14:04:22 2025 +0100 remove include, + some clean commit 16c9e77d84f86bad8c266f5d6c3eb1b262c3d846 Author: arng40 Date: Thu Dec 4 17:22:25 2025 +0100 update doxy commit 42c53b970f427e7d024926730cf3565bdf7a6995 Author: arng40 Date: Thu Dec 4 17:19:52 2025 +0100 doxygen commit 976aab54e44874ad7d2cfdc3530d8c6baf7edef9 Author: arng40 Date: Thu Dec 4 17:05:43 2025 +0100 include error commit e1b45f49bf4ec02fcc7459380d08ed39e0db6162 Author: arng40 Date: Mon Dec 1 15:36:23 2025 +0100 missong doc for GeosException commit b13149d10a6372b7ab4221570313aa48ff3ab17b Merge: b083853703 1e617be861 Author: arng40 Date: Mon Dec 1 15:27:59 2025 +0100 Merge remote-tracking branch 'origin/develop' into refactor/dudes/error-context commit b0838537036e03bef6f541255d15ef67734f1e52 Author: arng40 Date: Mon Dec 1 15:26:09 2025 +0100 remove unecessary include + some doc commit 694e64ea5f45da9d550668800ae5562b6d5bf30f Author: arng40 Date: Mon Dec 1 15:10:40 2025 +0100 clean up commit 9289b8259899698f401736c3cc237ab30e47af50 Author: arng40 Date: Mon Dec 1 11:45:10 2025 +0100 add GeosExceptions commit f47e62e189eac4f1936c0aa565c21eac79e636f6 Author: arng40 Date: Mon Dec 1 09:50:48 2025 +0100 renaming and remove try catch from main commit 96bab37cc79ee6a135857712cc3278ce5a8e473f Author: arng40 Date: Mon Dec 1 09:49:46 2025 +0100 remove unecessary cond commit ae0b73c6169f7ce948a86fd74b74e358610114ac Author: arng40 Date: Fri Nov 28 16:06:38 2025 +0100 update what() method commit 3842caa4ce96659f758f7ba219f30ec60a0b55ca Author: arng40 Date: Fri Nov 28 11:30:37 2025 +0100 update exception inGEOS_THROW to geos::Exception commit 8708f2d6250a82612a7a1953f34c3d958dc24e28 Author: arng40 Date: Fri Nov 28 11:29:55 2025 +0100 add geos::exception + refacto flushErrorMsg commit 2c9d6ce3b27ba997d7f796735c10c9923b122d1d Merge: 9d5db85cee 419ba182d4 Author: arng40 Date: Thu Nov 27 10:00:25 2025 +0100 Merge branch 'refactor/dudes/error-context' of https://github.com/GEOS-DEV/GEOS into refactor/dudes/error-context commit 9d5db85cee43992513c5f765fe27a958b2642873 Author: arng40 Date: Thu Nov 27 10:00:05 2025 +0100 fix test commit 419ba182d48f5b4b37f9d2c36b605399460e9fbf Merge: ec1feab3ee e68e1bc882 Author: Arnaud DUDES <155963334+arng40@users.noreply.github.com> Date: Wed Nov 26 10:07:21 2025 +0100 Merge branch 'develop' into refactor/dudes/error-context commit ec1feab3ee747a40d5d7a6b0cd7e9013078afa64 Author: arng40 Date: Tue Nov 25 17:40:13 2025 +0100 remove unecassery dep commit f09d45fafd50986afd26915aa1ecd8d0b7c2d387 Author: arng40 Date: Tue Nov 25 17:34:20 2025 +0100 fix test & cleanup commit 628e49c908fd9a02b370d0dd566ab894e5afbc54 Author: arng40 Date: Tue Nov 25 15:02:16 2025 +0100 reove debug log commit d0ff49db4e2193f32ec07d1206b773ee1c049482 Author: arng40 Date: Tue Nov 25 15:00:16 2025 +0100 add stream to errorlogger + rename macro in logger commit 450c3b04bcff94050420ee3d560902a23229f808 Author: arng40 Date: Mon Nov 24 15:03:39 2025 +0100 add line number commit 061f5025cda6e64ec84da18126d727bc493c9177 Author: arng40 Date: Mon Nov 24 14:02:34 2025 +0100 fix format commit 17a394a723baddd8daebdb9c419bc258a56d547a Author: arng40 Date: Mon Nov 24 11:13:01 2025 +0100 remove var duplication commit d5408c974cd28377f0dca79cae563fff289cae02 Author: arng40 Date: Mon Nov 24 11:02:51 2025 +0100 doxygen commit e430ae841205dccc9e05f07ba10854f403747169 Author: arng40 Date: Mon Nov 24 11:01:18 2025 +0100 add "__" prefix commit 93594af5b8bec9e1a3cca92c9b9c1b1cad2c7cd8 Author: arng40 Date: Mon Nov 24 10:59:56 2025 +0100 output only once commit 2fee6bf4f3159c87b494ad4e0f58636e7592c52a Author: arng40 Date: Fri Nov 21 15:54:17 2025 +0100 clean commit 07b649a87604ad93d971187dae30c5bbc5ffd7f5 Author: arng40 Date: Fri Nov 21 15:27:26 2025 +0100 doxygen commit df926d5561c08fb807ff82989a5811baefa981ac Author: arng40 Date: Fri Nov 21 15:24:13 2025 +0100 remove unecessary var commit 95f631e3fc673b5e2230a677043d5a41eaac55a0 Author: arng40 Date: Fri Nov 21 10:39:12 2025 +0100 uncrust commit 5f9c74c4fbaae729c2f28bcaead4b7f401943047 Merge: 62fa7ecdf7 2c0879d199 Author: arng40 Date: Thu Nov 20 17:30:44 2025 +0100 Merge remote-tracking branch 'origin/develop' into refactor/dudes/error-context commit 62fa7ecdf7ce58c060e6427d81c8166ef420fda2 Merge: 6be688ccf9 2ac7bd3371 Author: arng40 Date: Thu Nov 13 11:15:00 2025 +0100 Merge remote-tracking branch 'origin/develop' into refactor/dudes/error-context commit 6be688ccf9ba7299579a2b9f9d8cc54d4a0c05db Author: arng40 Date: Thu Nov 13 11:14:46 2025 +0100 missing std::cout commit 29dec2683f6e92b0843cd27af5fb078bcf123bbc Author: arng40 Date: Wed Nov 12 11:38:16 2025 +0100 add main for testUnits commit d951a16dc48103f1bd8bc965a47163f1cdb2d7f4 Author: arng40 Date: Wed Nov 12 11:19:16 2025 +0100 initialize m_time commit 79b97918cc3c8e196cb630f0c744961017f7c7a4 Author: arng40 Date: Wed Nov 12 11:03:26 2025 +0100 test error commit efcc52d74e24e3c41d0a69238c83e1898815147d Author: arng40 Date: Fri Nov 7 15:30:55 2025 +0100 fix test commit cf0afc5cbdd91d41c59ecd9b41219bcf6df185bf Author: arng40 Date: Wed Nov 5 11:26:05 2025 +0100 doc & fix commit 3253a0bc21fd28ba33eee6b37759d3411b21b4c1 Author: arng40 Date: Wed Nov 5 10:47:20 2025 +0100 fix after merge commit 276606c1e12ada2966169001f63a0d724055b030 Merge: 355e765d74 889ea4e797 Author: arng40 Date: Wed Nov 5 10:21:18 2025 +0100 Merge remote-tracking branch 'origin/develop' into refactor/dudes/error-context commit 355e765d74bce8c9d06ae77649a2215c56d52fd3 Author: arng40 Date: Tue Oct 7 10:54:47 2025 +0200 remove rank from arg commit dc13b33e225f99bc44aa4a9bf35249ddffe01004 Merge: c743e15404 a07810fb9f Author: arng40 Date: Tue Sep 30 15:52:41 2025 +0200 Merge remote-tracking branch 'origin/feature/amandinehry/create-yaml-file-and-structure-2' into refactor/dudes/error-context commit c743e15404da2781dc40778e4e5605a46ae76ee8 Author: arng40 Date: Tue Sep 30 15:12:58 2025 +0200 remvove deplucated log commit cbb53223628ae2eff3fb8aa6cb344587dfc2f2ed Author: arng40 Date: Mon Sep 29 17:39:34 2025 +0200 centralize error output commit a07810fb9f5412f062395a04fea53d2389c02aa3 Merge: c501a0f1df 27003264ee Author: MelReyCG <122801580+MelReyCG@users.noreply.github.com> Date: Mon Sep 29 10:39:51 2025 +0200 Merge branch 'develop' into feature/amandinehry/create-yaml-file-and-structure-2 commit c501a0f1df5a9ee0695a10bd0d2849af1e5c33f0 Author: MelReyCG Date: Mon Sep 29 10:38:39 2025 +0200 πŸ› wrong conversion on GPU commit a29510bfef0677d6920d377ccdcd516fec59b328 Merge: fa8fa542bf 500bbfdcc9 Author: MelReyCG Date: Fri Sep 26 16:26:00 2025 +0200 Merge branch 'feature/amandinehry/create-yaml-file-and-structure-2' of https://github.com/GEOS-DEV/GEOS into feature/amandinehry/create-yaml-file-and-structure-2 commit fa8fa542bf3636b79f36ce6a3d3abd1610715218 Author: MelReyCG Date: Fri Sep 26 16:25:56 2025 +0200 πŸ› added pragmas to manual shadow global logger instance commit 500bbfdcc950e1fb89cb889d8104a430fb5d7fbc Author: MelReyCG Date: Fri Sep 26 13:51:30 2025 +0200 πŸ› GPU forgotten instruction commit 14eefee7f94fe11a7c9bbb0c961035a571f61430 Merge: 7915205bdd d86e13f8b6 Author: MelReyCG <122801580+MelReyCG@users.noreply.github.com> Date: Fri Sep 26 09:33:18 2025 +0200 Merge branch 'develop' into feature/amandinehry/create-yaml-file-and-structure-2 commit 7915205bdd807deb416459e0ae553e0ea61a42e3 Author: MelReyCG Date: Fri Sep 26 09:31:42 2025 +0200 🎨 uncrustify commit efa89d804316378f882f5dddd80439e13671b939 Author: MelReyCG Date: Thu Sep 25 17:54:38 2025 +0200 πŸ› GPU Macros Support commit 3786db46038eefa13ce09936163b304a8b7c9e12 Author: MelReyCG Date: Thu Sep 25 17:40:01 2025 +0200 βœ… adapting test with error cause addition commit 1b755b577014b18b5e91a493e0e5b0c9a429db19 Author: MelReyCG Date: Thu Sep 25 17:31:49 2025 +0200 ✨ removing last LVARRAY_* error logging macros commit 759e9bb3d032720207748240643aa5f07ce88ed3 Merge: d17972f1b2 1310d2c0c1 Author: MelReyCG Date: Thu Sep 25 11:50:45 2025 +0200 Merge remote-tracking branch 'origin/develop' into feature/amandinehry/create-yaml-file-and-structure-2 commit d17972f1b2fa20c529e9c890b36322963a26d1e7 Author: MelReyCG Date: Thu Sep 25 11:43:59 2025 +0200 ✨ removing last LVARRAY_* error logging macros commit 29f6fbee4bafd6fe6d8416fff6e0422a38d05dc4 Author: MelReyCG Date: Thu Sep 25 11:35:25 2025 +0200 ⚰️ unused variable commit 6692dd23422d7548dbbfd88f6829bb3437145128 Author: MelReyCG Date: Thu Sep 25 11:32:49 2025 +0200 πŸ› fix stream reset commit 191305908e348c545288c8a4cd05bec9b22e09ea Author: MelReyCG Date: Thu Sep 25 11:18:47 2025 +0200 🎨 uncrustify commit d5d8615a47e8341950d2527a167985201b13f0f8 Merge: 83d0c0ff08 e07ab7278c Author: arng40 Date: Wed Sep 24 16:49:45 2025 +0200 Merge remote-tracking branch 'origin/feature/amandinehry/create-yaml-file-and-structure-2' into refactor/dudes/error-context commit 83d0c0ff0803e90b890b521c7ce59f59f7a46c94 Author: arng40 Date: Wed Sep 24 16:47:45 2025 +0200 xsd commit 754ed03e02eb858813710f5f22f7685997e4c7bd Merge: e6ecba4643 9f86e449f2 Author: arng40 Date: Wed Sep 24 14:57:08 2025 +0200 Merge remote-tracking branch 'origin/develop' into refactor/dudes/error-context commit e07ab7278cee579f20bf6ee8a561d48d7742867d Author: MelReyCG Date: Tue Sep 23 17:16:13 2025 +0200 ♻️ removing unintended BASE:: commit db75e45ac9c6d4be48f218dd196683d56cac631c Author: MelReyCG Date: Tue Sep 23 17:15:23 2025 +0200 πŸ“¦ shema commit 5781a78c2de2a04190eb22ffd8440344ea662dc5 Author: MelReyCG Date: Tue Sep 23 17:15:00 2025 +0200 ✨ allowing to re-throw with GEOS_THROW* macros commit b3cbb99f21516182141476079e7fbe88f30f923b Merge: d1642e6b8a 9f86e449f2 Author: MelReyCG Date: Tue Sep 23 10:34:49 2025 +0200 Merge remote-tracking branch 'origin/develop' into feature/amandinehry/create-yaml-file-and-structure commit d1642e6b8a7f72447ee63738eb326ac848a709e3 Merge: 2c5c5f552f 96356b00ba Author: MelReyCG Date: Tue Sep 23 10:05:47 2025 +0200 Merge remote-tracking branch 'origin/develop' into feature/amandinehry/create-yaml-file-and-structure commit 2c5c5f552f9d34666d5a462d6ed3c0673b45c817 Author: MelReyCG Date: Tue Sep 23 09:11:28 2025 +0200 🎨 UNCRUSTIFY commit 10eb96944d71bb35206c84b2e28e57c673c695a6 Author: MelReyCG Date: Mon Sep 22 16:35:32 2025 +0200 ♻️ removing all GEOS_*_CTX macros (as GEOS_ERROR, GEOS_WARNING, GEOS_ASSERT and GEOS_THROW are now compatible with context parameters) commit 5747e7f4d0d8ec5785705481d1dffe8b910561fb Author: MelReyCG Date: Mon Sep 22 16:14:52 2025 +0200 πŸ› last mistake? commit 77f9fcb405f105b78dd4b576c550c5d924142e0c Author: MelReyCG Date: Mon Sep 22 15:37:06 2025 +0200 πŸ› use streamed cause string to support mpi pointers formatting (not supported by fmt for now) commit 6fc4b3005b62548da3e67ba2787adaf4c157b292 Author: MelReyCG Date: Mon Sep 22 11:04:52 2025 +0200 βœ… removing _CTX macros from unit test commit 589fcfefe7d65c53c4ec960add552fd4bfebc1ea Author: MelReyCG Date: Fri Sep 19 17:58:01 2025 +0200 ♻️ βœ… uniformized throw macros commit e6135b1417c4595434c4e97c9193bbf74abacd8e Author: MelReyCG Date: Fri Sep 19 17:20:03 2025 +0200 βœ… πŸ› ⚑️ bugfix when callstack is empty + disable callstack for perfs commit 66ab5cb5162145d3744c6ad90df31881df632ddf Author: MelReyCG Date: Fri Sep 19 16:21:50 2025 +0200 ♻️ βœ… uniformized warning macros commit d708cac377b1d5451c3defb9775c23a8b4aa6668 Author: MelReyCG Date: Thu Sep 18 17:52:03 2025 +0200 ♻️ reordered error & throw macro to group them commit dd97f0e53f1548f18d3681128814c4b508a01252 Author: MelReyCG Date: Thu Sep 18 17:34:26 2025 +0200 ✨ βœ… adding error cause in unit test commit faa84faf9159626fa074ca3cf041729c25de28d4 Author: MelReyCG Date: Thu Sep 18 14:36:59 2025 +0200 πŸ“ adding macro docs commit ab40edc5bb474f0349ddc5e21b2b1afeb0b2ef35 Author: MelReyCG Date: Thu Sep 18 14:23:07 2025 +0200 βœ… ♻️ Simplifying + testing macros (GEOS_ERROR_* and GEOS_ASSERT_*) + unit test separation for multiple EXPECT_EXIT commit e0bad67d8b4a4cf05d9a4c7368406f8daf21d411 Author: MelReyCG Date: Mon Sep 15 11:46:22 2025 +0200 ♻️ βœ… New GEOS_ERROR macros with context included + new unit macro unit-test + testing GEOS_ERROR commit dd3b8443843f777f02aae29d1dd9346e9d7ecbdb Merge: 785636b34b 73c931aea5 Author: MelReyCG Date: Tue Aug 26 16:48:01 2025 +0200 Merge remote-tracking branch 'amandinehryFork/develop' into feature/amandinehry/create-yaml-file-and-structure commit 785636b34b5b97ee8a1140786a3580dfa3a99b93 Author: amandinehry Date: Thu Aug 21 15:13:02 2025 +0200 stack trace management commit e07d0b72b1ee9d65296d6ed880361afd98b9d519 Author: amandinehry Date: Thu Aug 21 15:07:34 2025 +0200 uncomment the rmoveFile() function commit c7031bf8a9da74e82daaf0bcd868ab5d57d5d951 Merge: e9cd64c1fd 6d10e3aad6 Author: amandinehry Date: Thu Aug 7 14:08:54 2025 +0200 Merge branch 'feature/amandinehry/create-yaml-file-and-structure' of https://github.com/amandinehry/GEOS into feature/amandinehry/create-yaml-file-and-structure commit e9cd64c1fd24347a0428bdca8cc1e58c7809718e Author: amandinehry Date: Thu Aug 7 14:08:40 2025 +0200 test commit 6d10e3aad688c2166ef75addc04936d4bd417c62 Author: MelReyCG Date: Fri Aug 1 13:16:14 2025 +0200 βͺ restored "Rank N:" if error messages commit 1e32d650fbd7d43ddf53122f0b041636e27a7af8 Merge: d4c465b990 3c8cc72c7d Author: MelReyCG Date: Fri Aug 1 12:34:26 2025 +0200 Merge remote-tracking branch 'origin/develop' into feature/amandinehry/create-yaml-file-and-structure commit d4c465b99070e2d80a305f7cc0ce0961b0bb65df Author: MelReyCG Date: Fri Aug 1 12:23:29 2025 +0200 🎨 format commit a01d8acb896ee26ed4719ab5a3d4dd316b8c27ca Author: MelReyCG Date: Fri Aug 1 12:23:10 2025 +0200 πŸ› bugfix for test, wrong global instance impacting commit 7b4ec52a05e5e8cf501888b15f00dc3df07ba3b5 Author: MelReyCG Date: Fri Aug 1 12:22:03 2025 +0200 ♻️ refactor of the test: keeping only necessary testing, separated tests by feature commit 507ac66a684a1089496039e2014981e2d838cf68 Author: MelReyCG Date: Fri Aug 1 11:11:10 2025 +0200 builder pattern for addContextInfo commit 4215fad033e57d7805758395033542105d98cdc6 Author: MelReyCG Date: Fri Aug 1 11:09:24 2025 +0200 🎨 format commit c118dd4dcc21ca3d2575aab519c3bc8d1acd7853 Author: MelReyCG Date: Fri Aug 1 10:10:49 2025 +0200 🎨 docs alignement commit a1105e43a5fe2b89c05256d85f361d5b4091eb27 Author: MelReyCG Date: Fri Aug 1 10:03:53 2025 +0200 🎨 uncrustify commit 31842a5319f8cc0daf56d2488853c0109f202047 Author: MelReyCG Date: Fri Jul 25 16:54:11 2025 +0200 ✏️ typo commit 35f7686be59eb2e0b29f1dd0fd2f93b6701728b6 Author: MelReyCG Date: Wed Jul 23 17:24:50 2025 +0200 πŸ› βͺ set the --errorsOutput mandatory because of bug + revert optionparser.h modifications since no longer useful commit 7fc0ced2f58761291efe57d62b83d07d9aeed7fd Author: MelReyCG Date: Mon Jul 21 16:58:04 2025 +0200 πŸ”Š warn the deveveloppers that a yamlFile should not be written if not created first commit e9508f516bb808f9e9151f4381315f04926285f1 Merge: 127f38eabb b05541b588 Author: amandinehry Date: Mon Jul 21 11:43:33 2025 +0200 Merge remote-tracking branch 'upstream/develop' into feature/amandinehry/create-yaml-file-and-structure commit 127f38eabb946458d5b1a7392d2d39ca12762926 Merge: 4a8ea5bbe0 2b38577aac Author: amandinehry Date: Mon Jul 21 11:00:49 2025 +0200 Merge branch 'feature/amandinehry/create-yaml-file-and-structure' of https://github.com/amandinehry/GEOS into feature/amandinehry/create-yaml-file-and-structure commit 2b38577aacfd6c8b916b0a3fd1489461279809ff Merge: 4811b6cf74 7e85e747ec Author: MelReyCG Date: Tue Jul 8 15:50:15 2025 +0200 Merge commit '7e85e747ec65cd498ba0e9e4730f79d2692ed0bd' into feature/amandinehry/create-yaml-file-and-structure commit 4a8ea5bbe0699d03da0a8f65d008858ca22664a4 Author: amandinehry Date: Fri Jul 4 15:10:04 2025 +0200 evaluate MSG only one time in macros commit 4811b6cf742730517c530b9464080fa9e7dde6fe Author: amandinehry Date: Wed Jun 25 16:37:56 2025 +0200 Unit test implemented commit e1a21286a9a04b733f786b9d2af1ef244510633a Author: amandinehry Date: Wed Jun 25 13:55:06 2025 +0200 Changes following comments received on my PR commit e0c876f933a4c88ce665f389c8938925ba220d3c Author: amandinehry Date: Tue Jun 24 15:35:26 2025 +0200 Simplification of the for loop which write context information commit 260133ee91c79c1ea32c80a572903ffa23ff1c86 Author: amandinehry Date: Tue Jun 24 13:56:57 2025 +0200 Sort contextual information by decreasing priority commit da7dc824b980b2094df136dbd2006aacd7323de9 Author: amandinehry Date: Tue Jun 24 09:26:37 2025 +0200 Comments added commit 9fe289a639020af4d9eccd165513e193e47cd981 Author: amandinehry Date: Tue Jun 24 09:15:07 2025 +0200 Doxygen comments commit a83a3a130d3efa917b42f109031f4aff964a1e89 Author: amandinehry Date: Thu Jun 19 14:28:42 2025 +0200 initialize the error message line by default commit 2e0e39617991c2327eba75adf4c1a080c6bcdc07 Author: amandinehry Date: Wed Jun 18 09:31:26 2025 +0200 Change GEOS_LOG() to GEOS_LOG_RANK() commit 517782b081e1434cd78ec8a411f7667424a65e8a Author: amandinehry Date: Mon Jun 16 11:40:36 2025 +0200 Renaming: flushCurrentErrorMsg() into flushErrorMsg() commit 051e85b0240a4f2facc0ad69b71c7c620c1d6153 Author: amandinehry Date: Mon Jun 16 11:33:15 2025 +0200 Remove try/catch in the createFile() and the flushCurrentErrorMsg() method because this code is already exception-free commit 709d8a49a2ea45ee93b3f465f4492330c2c3f337 Author: amandinehry Date: Mon Jun 16 10:50:18 2025 +0200 Minor changes: string to string_view when it was possible + add an addToMsg method which takes an std::exception + add a boolean toEnd in the addToMsg methods commit f929f979001069b269e2f7f1fe024fce253f16ee Author: amandinehry Date: Fri Jun 13 17:01:20 2025 +0200 minor changes syntax + remove isValidStackTrace() method and replace it by a boolean commit 99d9b5bcc45b242b98a1370e6bf2585b96e590eb Author: amandinehry Date: Fri Jun 13 13:55:46 2025 +0200 reverse the change from GEOS_LOG to GEOS_LOG_RANK +empty the object after writing commit d2884905519c7b092093693c839c7851d1eaf491 Author: amandinehry Date: Fri Jun 13 10:48:35 2025 +0200 Improved code comments commit 6c762e748f58af82565792b6e670e9a8e4afe856 Author: amandinehry Date: Thu Jun 12 15:53:17 2025 +0200 Add an enumeration to secure the keys that can be entered for the map + methods reanming + switch the streamMultilineYamlAttribute() method to private commit 8de9060cdf98bead87f5afebbfef031407815cf2 Author: amandinehry Date: Thu Jun 12 12:05:29 2025 +0200 Using GEOS_LOG_RANK instead of GEOS_LOG commit e22e53834363ecf6772b178177831151e063c4b8 Author: amandinehry Date: Thu Jun 12 12:00:17 2025 +0200 Minor modifications on the GEOS_THROW_IF_GT_MSG message commit 343b8301de7eca1d7adfef80f1eaf5788c8d081c Author: amandinehry Date: Thu Jun 12 11:38:41 2025 +0200 Renaming ContextInfo in ErrorContext + minor correction on the formatting of the yaml commit 3318d8536d3d7fd07c5b562221d9fdb350447c2e Author: amandinehry Date: Thu Jun 12 10:20:21 2025 +0200 Minor syntax modification commit cbc5102984b1e772caef20820c232b86bda198bb Author: amandinehry Date: Thu Jun 12 10:10:22 2025 +0200 Removed the pointer to an Error Logger object (this is no longer useful at this time) + ensure that opening and writing to the file is exception-free commit c4a002e1ff3ce361c1ff2e8f7137a022506ec299 Author: amandinehry Date: Wed Jun 11 15:41:18 2025 +0200 Just silently kill GEOS when a NotAnError is raised commit 0a952966017e45e9e3496a077ead7dc48deb428f Author: amandinehry Date: Wed Jun 11 15:19:49 2025 +0200 Add comments commit dab2da50c1084bba193ed98a4228a9359a0d25ff Author: amandinehry Date: Wed Jun 11 15:05:09 2025 +0200 Fix null pointer access on parent by using instance field instead commit 75eff2743bf61e14e090e38c10ff414c676ae1be Author: amandinehry Date: Wed Jun 11 13:39:57 2025 +0200 Modification of the streamMultilineYamlAttribute() method: take the indentation as parameter commit 5c4fbcb57df3ced134ea22de0f80fc53062699c4 Author: amandinehry Date: Wed Jun 11 12:06:12 2025 +0200 Modification of the streamMultilineYamlAttribute() function: no longer delete the first line over and over again but loop over the lines commit e34c90d6bdae0f3f51fa5a30b500c390f1fed7d3 Author: amandinehry Date: Wed Jun 11 11:48:50 2025 +0200 Add comment in the write() function commit 5c801a5ec81a63586f7b4ee1102beaf429aa80e9 Author: amandinehry Date: Wed Jun 11 11:35:39 2025 +0200 Add an error msg when the call stack is not formatted as expected + remove break; in the streamMultilineYamlAttribute() method commit 387687d7ba1da0d675ed4cb74f0f95b825a69768 Merge: 67fce43f89 a75758c8ef Author: amandinehry Date: Wed Jun 11 10:26:07 2025 +0200 Merge remote-tracking branch 'origin/develop' into feature/amandinehry/create-yaml-file-and-structure commit 67fce43f896f91f4aa6d69fc2660778b05569eed Author: amandinehry Date: Wed Jun 11 10:20:10 2025 +0200 Fix in writing the stack trace in the yaml commit f910d0e4a9c236b4ed5d3bea788145296c0ef233 Author: amandinehry Date: Tue Jun 10 16:23:41 2025 +0200 add g_ before global variables + add comment to the addToMsg() method commit 92e6854384b5590d4db63ec09ea1a1877892238a Author: amandinehry Date: Tue Jun 10 15:47:21 2025 +0200 Reorganization of declarations commit 74de273066b32cccee5f1875eb06b3e31d227c22 Author: amandinehry Date: Tue Jun 10 13:51:44 2025 +0200 Add comments commit 149789e74f5227ae00b2ffc405ef1eb6ba683930 Author: amandinehry Date: Tue Jun 10 13:39:07 2025 +0200 Change the loop syntax ito a for-each syntax to solve the issue of insufficient id usage commit 80bb07bc0e593b9a5ffcfa43c48a5f13ed448cd0 Author: amandinehry Date: Tue Jun 10 13:08:11 2025 +0200 Changes in macros names commit 7aee0c6b36cff365fac9c0d36ed66520d82b9879 Author: amandinehry Date: Tue Jun 10 13:01:19 2025 +0200 Remove empty comment lines and commented code commit 5caa099eaa43107dd7f762461c160cf9e9a9454e Author: amandinehry Date: Thu Jun 5 13:35:08 2025 +0200 Remove vscode config files commit a0eefd29dc898daefce3f824f474eaf208d80365 Author: amandinehry Date: Thu Jun 5 11:33:34 2025 +0200 Compilation error fix commit e31f17cd624869a3d6dfe034a1d593004dfe2aab Merge: c1e001ef52 c2768e6ecd Author: amandinehry Date: Wed Jun 4 16:57:56 2025 +0200 Merge remote-tracking branch 'upstream/develop' into feature/amandinehry/create-yaml-file-and-structure commit c1e001ef52ea0148103f7ccddabfa68a1d086f23 Author: amandinehry Date: Wed Jun 4 16:13:16 2025 +0200 xsd + check includes commit 8a9ff297fac9230ad62c479163ecf07ddcae464e Author: amandinehry Date: Wed Jun 4 13:36:26 2025 +0200 xsd + revert comment commit 7fa2b74fabf7bf2e86a46c699c0606df21176b89 Author: amandinehry Date: Wed Jun 4 11:52:05 2025 +0200 Syntax fixes commit c9fea309e2436a075748973a767195aa3892f2e0 Author: amandinehry Date: Wed Jun 4 11:24:00 2025 +0200 Syntax fixes commit 9bd9f3015afcb06d7c7212862bb1b6f24ae7e0a6 Author: amandinehry Date: Wed Jun 4 11:23:43 2025 +0200 Delete additionnal spaces commit 10a26277e8e83e9c18552c8abb20be23279ad3f1 Author: amandinehry Date: Wed Jun 4 11:23:17 2025 +0200 Restore to its original state an input file that I used for my tests commit 835e444f1c39d01d07a9e8d1f2dae6162cc87e97 Author: amandinehry Date: Wed Jun 4 10:55:14 2025 +0200 Remove GEOS_THROW_(...) and GEOS_ERROR_(...) dependency on LvArray commit 59ac94dc1e328684f815f3aabbfe43c0ba67b0de Author: amandinehry Date: Wed Jun 4 09:30:46 2025 +0200 Remove ASSERT dependency on LvArray commit 02dcf503c61546c1b1d9192e3029f02c7900dd5d Author: amandinehry Date: Wed Jun 4 09:29:15 2025 +0200 Modify the macros corresponding to throw to allow the exception to be an exception and not an error commit 4928dcd8dafd57244553ff4217f186c9425d7ab3 Author: amandinehry Date: Wed Jun 4 09:26:14 2025 +0200 Add the "Exception" field into the message type enumeration commit 5a6c1a0c06c43d8a25791bf50bad6b32627d1071 Author: amandinehry Date: Tue Jun 3 11:36:56 2025 +0200 Unit test to check if the contents of the yaml file match exactly what is expected. commit d08a30f7c08747ec8482b6258e940d997a61361c Author: amandinehry Date: Tue Jun 3 11:34:28 2025 +0200 Add the rank on which the error is catch for error and warning outputs commit 670ddfab6a3328df92209bedce368065f1d6ac3b Author: amandinehry Date: Mon Jun 2 13:21:59 2025 +0200 Reacting with the command line option -e / --errors-output commit c07b5024b0f98726ca7f74b9ad0e10490adc7376 Author: amandinehry Date: Mon Jun 2 11:41:52 2025 +0200 Modification of the Optional function to accept arguments separated by spaces. The previous condition checked whether an argument was present and whether the option was immediately followed by a value like -test"value", which excluded valid cases like -test "value" et -test "value". commit 7b5f293f0c9aefa505032ab7e57e38dba0699f3f Author: amandinehry Date: Tue May 27 17:58:27 2025 +0200 Correction: replace original macros commit eb2f691863c992eb3325f7c87c3ec2be1bfa60e2 Author: amandinehry Date: Tue May 27 17:09:02 2025 +0200 Replace original macros commit 2c0f5aafcfd3b40adf011fdd0b100680852fcd8a Author: amandinehry Date: Tue May 27 14:20:51 2025 +0200 errors cli modification: add --errors-output commit 8a8117efeb60fb0a1e5161f3c58bd17b7354d5ef Author: amandinehry Date: Tue May 27 14:20:51 2025 +0200 errors cli modification: add --errors-output commit 86f793ed53c5d705031aff49385463c5314c90b8 Author: amandinehry Date: Tue May 27 09:47:09 2025 +0200 set priority commit 2b27c41e429fce4f182e52fafe0200ab9940b02f Author: amandinehry Date: Tue May 27 09:30:07 2025 +0200 Update of the commit named "latest update for exception handling (try/catch in main)": remove useless try/catch commit 5830aeea9287ddc527b2e4e9f7f7255953e32796 Author: amandinehry Date: Tue May 27 09:27:23 2025 +0200 Add priority to the error message into the yaml file commit 6de2c6abc5cc84dc440e96561f658a8130749bed Author: amandinehry Date: Tue May 27 09:21:15 2025 +0200 Latest update for exception handling (try/catch in main) commit b13f0a6d77c4402b82e287d0b437bf4e4c0f75da Author: amandinehry Date: Wed May 21 18:01:37 2025 +0200 Apply the output error functionality in yaml to all geos errors commit 9b65581abfda673ca9dab985f1bcde1434dc54d2 Author: amandinehry Date: Wed May 21 17:59:44 2025 +0200 Reorganization after operational tests commit 589270fb33042b3fcb46cfb5333a305e8ee3532f Author: amandinehry Date: Wed May 21 17:58:29 2025 +0200 Add variadic parameters to GEOS_THROW_CTX_IF commit 32a0237c4d3d6688fe457b742f7390d52c307bc5 Author: amandinehry Date: Mon May 19 14:52:13 2025 +0200 Fix duplication error commit ee588846379099f7c5d1ce7ee5fb5210d68906b2 Author: amandinehry Date: Mon May 19 14:29:58 2025 +0200 YAML error message well formatted commit acf4d99111565679b8b665ad32644e54f8d562e3 Author: amandinehry Date: Fri May 16 13:34:19 2025 +0200 Complete: yaml output for PVT tables error commit 1a434bca65445695f4f8ade7e7355bf71c7695f6 Author: amandinehry Date: Wed May 14 15:20:54 2025 +0200 First attempt: Handling the text contained in the potential exception in try/catch statements Problem: Retrieves everything that was thrown, so not just the message. commit bc953beb0365b7baa3c21372f8347f099a81e400 Author: amandinehry Date: Mon May 12 15:56:46 2025 +0200 Manage the text contained in the potential exception commit e1aed935d02ef4a78641d765cf15dc042fbb8dfc Author: amandinehry Date: Fri May 9 17:03:45 2025 +0200 Complete: code for outputting errors into yaml commit 46b4904a57fce4ec6abd4cfbb5556fe9d495be15 Author: amandinehry Date: Wed May 7 14:43:47 2025 +0200 First attempt at outputting exceptions commit 60365510595ce946db8f54a0cc1b8cab68653e65 Author: amandinehry Date: Mon May 5 17:06:35 2025 +0200 Added additional information in the yaml - not functional missing the link between GEOS_THROW_CTX_IF and LVARRAY_THROW_IF_TEST( EXP, MSG, TYPE ) commit 2f7660c7566786b99c1ea12b68905c0a1b514d9a Author: amandinehry Date: Mon May 5 15:17:13 2025 +0200 draft: retrieve data contexts info commit 9d5e16aecbb2310c3a6eec06dc531e4117140259 Author: amandinehry Date: Fri May 2 15:08:34 2025 +0200 Test to add variadic arguments commit 1cb8aa3a28eec070992ac202a5bcc92ec5dd2bb8 Author: amandinehry Date: Wed Apr 30 14:29:36 2025 +0200 Modification to properly format the yaml so that it can be parsed if necessary commit 94b775c682837403659a1b8abd2c1a55f91c9ec8 Author: amandinehry Date: Wed Apr 30 10:53:10 2025 +0200 Set up test commit 4e5250f26d0bac082a31eb032f68f43bf2b853a2 Author: amandinehry Date: Wed Apr 30 10:53:00 2025 +0200 traits errors commented (to treat) commit f1713fa1d9539a30cac88b0ac24ec6414f5fc00f Author: amandinehry Date: Wed Apr 30 10:50:47 2025 +0200 Set up ErrorHandling commit c846586c624b7c3fdaf97a9333856cabbecb6a6f Author: amandinehry Date: Fri Apr 25 17:05:43 2025 +0200 creation of an object header that logs errors and warnings in a yaml file --- .github/workflows/ci_tests.yml | 82 ++--- src/coreComponents/common/CMakeLists.txt | 5 + src/coreComponents/common/MpiWrapper.hpp | 70 +++++ .../common/StdContainerWrappers.hpp | 13 +- .../common/format/EnumStrings.cpp | 42 +++ .../common/format/EnumStrings.hpp | 40 ++- src/coreComponents/common/format/LogPart.cpp | 10 +- src/coreComponents/common/format/LogPart.hpp | 3 +- .../common/format/table/TableData.cpp | 7 - .../common/format/table/TableData.hpp | 4 +- .../common/initializeEnvironment.cpp | 8 + .../common/logger/DiagnosticMessage.hpp | 292 ++++++++++++++++++ .../common/logger/ErrorHandling.cpp | 60 ++-- .../common/logger/ErrorHandling.hpp | 289 +++-------------- .../common/logger/LogHistory.cpp | 238 ++++++++++++++ .../common/logger/LogHistory.hpp | 199 ++++++++++++ src/coreComponents/common/logger/Logger.hpp | 5 +- .../common/unitTests/CMakeLists.txt | 2 +- .../common/unitTests/testDataTypes.cpp | 9 +- .../compositional/parameters/PhaseType.cpp | 1 + .../dataRepository/DataContext.cpp | 8 +- .../dataRepository/DataContext.hpp | 14 +- .../dataRepository/GroupContext.cpp | 6 +- .../dataRepository/GroupContext.hpp | 4 +- .../dataRepository/WrapperContext.cpp | 6 +- .../dataRepository/WrapperContext.hpp | 4 +- src/coreComponents/events/EventManager.cpp | 2 +- .../mesh/coarsening/MetisInterface.cpp | 1 + .../mainInterface/GeosxState.cpp | 4 +- src/coreComponents/mesh/ElementType.hpp | 1 + .../physicsSolvers/PhysicsSolverBase.cpp | 3 +- 31 files changed, 1044 insertions(+), 388 deletions(-) create mode 100644 src/coreComponents/common/format/EnumStrings.cpp create mode 100644 src/coreComponents/common/logger/DiagnosticMessage.hpp create mode 100644 src/coreComponents/common/logger/LogHistory.cpp create mode 100644 src/coreComponents/common/logger/LogHistory.hpp diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 658d106095c..16526dd79b8 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -150,47 +150,47 @@ jobs: fail-fast : false matrix: include: - - name: Ubuntu (20.04, gcc 9.4.0, open-mpi 4.0.3) - CMAKE_BUILD_TYPE: Release - DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc9 - BUILD_SHARED_LIBS: ON - ENABLE_HYPRE: OFF - ENABLE_TRILINOS: ON - GEOS_ENABLE_BOUNDS_CHECK: ON - HOST_CONFIG: /spack-generated.cmake - - - name: Ubuntu debug (20.04, gcc 10.5.0, open-mpi 4.0.3) - github codespaces - BUILD_AND_TEST_CLI_ARGS: "--no-run-unit-tests" - CMAKE_BUILD_TYPE: Debug - DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc10 - BUILD_SHARED_LIBS: ON - ENABLE_HYPRE: OFF - ENABLE_TRILINOS: ON - GEOS_ENABLE_BOUNDS_CHECK: ON - RUNS_ON: streak2 - NPROC: 8 - DOCKER_RUN_ARGS: "--cpus=8 --memory=256g --runtime=nvidia -v /etc/pki/tls/certs/ca-bundle.crt:/etc/pki/tls/certs/ca-bundle.crt:ro -v /etc/pki/tls/certs/ca-bundle.crt:/certs/ca-bundle.crt:ro" - - HOST_CONFIG: /spack-generated.cmake - - - name: Ubuntu (20.04, gcc 10.5.0, open-mpi 4.0.3) - github codespaces - CMAKE_BUILD_TYPE: Release - DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc10 - BUILD_SHARED_LIBS: ON - ENABLE_HYPRE: OFF - ENABLE_TRILINOS: ON - GEOS_ENABLE_BOUNDS_CHECK: ON - HOST_CONFIG: /spack-generated.cmake - - - name: Ubuntu (22.04, gcc 11.4.0, open-mpi 4.1.2) - CMAKE_BUILD_TYPE: Release - DOCKER_REPOSITORY: geosx/ubuntu22.04-gcc11 - ENABLE_HYPRE: ON - ENABLE_TRILINOS: OFF - BUILD_SHARED_LIBS: ON - GEOS_ENABLE_BOUNDS_CHECK: OFF - GCP_BUCKET: geosx/ubuntu22.04-gcc11 - HOST_CONFIG: /spack-generated.cmake + # - name: Ubuntu (20.04, gcc 9.4.0, open-mpi 4.0.3) + # CMAKE_BUILD_TYPE: Release + # DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc9 + # BUILD_SHARED_LIBS: ON + # ENABLE_HYPRE: OFF + # ENABLE_TRILINOS: ON + # GEOS_ENABLE_BOUNDS_CHECK: ON + # HOST_CONFIG: /spack-generated.cmake + + # - name: Ubuntu debug (20.04, gcc 10.5.0, open-mpi 4.0.3) - github codespaces + # BUILD_AND_TEST_CLI_ARGS: "--no-run-unit-tests" + # CMAKE_BUILD_TYPE: Debug + # DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc10 + # BUILD_SHARED_LIBS: ON + # ENABLE_HYPRE: OFF + # ENABLE_TRILINOS: ON + # GEOS_ENABLE_BOUNDS_CHECK: ON + # RUNS_ON: streak2 + # NPROC: 8 + # DOCKER_RUN_ARGS: "--cpus=8 --memory=256g --runtime=nvidia -v /etc/pki/tls/certs/ca-bundle.crt:/etc/pki/tls/certs/ca-bundle.crt:ro -v /etc/pki/tls/certs/ca-bundle.crt:/certs/ca-bundle.crt:ro" + + # HOST_CONFIG: /spack-generated.cmake + + # - name: Ubuntu (20.04, gcc 10.5.0, open-mpi 4.0.3) - github codespaces + # CMAKE_BUILD_TYPE: Release + # DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc10 + # BUILD_SHARED_LIBS: ON + # ENABLE_HYPRE: OFF + # ENABLE_TRILINOS: ON + # GEOS_ENABLE_BOUNDS_CHECK: OFF + # HOST_CONFIG: /spack-generated.cmake + + # - name: Ubuntu (22.04, gcc 11.4.0, open-mpi 4.1.2) + # CMAKE_BUILD_TYPE: Release + # DOCKER_REPOSITORY: geosx/ubuntu22.04-gcc11 + # ENABLE_HYPRE: ON + # ENABLE_TRILINOS: OFF + # BUILD_SHARED_LIBS: ON + # GEOS_ENABLE_BOUNDS_CHECK: OFF + # GCP_BUCKET: geosx/ubuntu22.04-gcc11 + # HOST_CONFIG: /spack-generated.cmake - name: Ubuntu (22.04, gcc 12.3.0, open-mpi 4.1.2) CMAKE_BUILD_TYPE: Release diff --git a/src/coreComponents/common/CMakeLists.txt b/src/coreComponents/common/CMakeLists.txt index d0143b9564b..083085113a8 100644 --- a/src/coreComponents/common/CMakeLists.txt +++ b/src/coreComponents/common/CMakeLists.txt @@ -39,10 +39,13 @@ set( common_headers GEOS_RAJA_Interface.hpp GeosxMacros.hpp MemoryInfos.hpp + logger/DiagnosticMessage.hpp + logger/GeosExceptions.hpp logger/GeosExceptions.hpp logger/Logger.hpp logger/ErrorHandling.hpp logger/ExternalErrorHandler.hpp + logger/LogHistory.hpp MpiWrapper.hpp Path.hpp Span.hpp @@ -72,6 +75,7 @@ endif( ) # Specify all sources # set( common_sources + format/EnumStrings.cpp format/table/TableData.cpp format/table/TableFormatter.cpp format/table/TableLayout.cpp @@ -82,6 +86,7 @@ set( common_sources logger/Logger.cpp logger/ErrorHandling.cpp logger/ExternalErrorHandler.cpp + logger/LogHistory.cpp BufferAllocator.cpp MemoryInfos.cpp MpiWrapper.cpp diff --git a/src/coreComponents/common/MpiWrapper.hpp b/src/coreComponents/common/MpiWrapper.hpp index fd3264a5317..8bf206e05ae 100644 --- a/src/coreComponents/common/MpiWrapper.hpp +++ b/src/coreComponents/common/MpiWrapper.hpp @@ -784,6 +784,76 @@ struct MpiWrapper template< typename T > static void max( Span< T const > src, Span< T > dst, MPI_Comm comm = MPI_COMM_GEOS ); + /** + * @brief Structure holding the result of a gather operation from all MPI ranks to rank 0. + * @tparam CONTAINER The container type holding the data. Must provide `data()`, `size()`, and `value_type`. + */ + template< typename CONTAINER > + struct GatherResult + { + CONTAINER data; // Collected data accross all rank + stdVector< integer > counts; // Number of elements per rank + stdVector< integer > offsets; // Starting index for each rank in 'data' + }; + +/** + * @brief Gather buffers of varying sizes from all ranks to rank 0. + * @tparam CONTAINER The container type holding the data. + * Must provide `data()`, `size()`, and a trivially copyable `value_type`. + * @tparam VALUE_T The trivially copyable underlying data type (deduced automatically). + * @param localBuffer The local buffer to be gathered on rank 0. + * @return A struct containing: + * - 'data': all the gathered data on rank 0 + * - 'counts': number of elements for each rank + * - 'offsets': starting index for each rank in 'data' + */ + template< + typename CONTAINER, + typename VALUE_T = typename CONTAINER::value_type, + typename = std::enable_if_t< + std::is_trivially_copyable_v< VALUE_T > && + std::is_same_v< decltype(std::declval< CONTAINER >().data()), VALUE_T * > && + std::is_same_v< decltype(std::declval< CONTAINER >().size()), std::size_t > + > + > + static GatherResult< CONTAINER > + gatherBufferRank0( CONTAINER const & localBuffer ) + { + integer const numRanks = MpiWrapper::commSize(); + integer const numValues = static_cast< integer >(localBuffer.size()); + + GatherResult< CONTAINER > gatherResult; + + if( MpiWrapper::commRank() == 0 ) + { + gatherResult.counts.resize( numRanks ); + gatherResult.offsets.resize( numRanks ); + } + + + MpiWrapper::gather( &numValues, 1, gatherResult.counts.data(), 1, 0 ); + + if( MpiWrapper::commRank() == 0 ) + { + integer totalSize = 0; + for( integer i = 0; i < numRanks; ++i ) + { + gatherResult.offsets[i] = totalSize; + totalSize += gatherResult.counts[i]; + } + gatherResult.data.resize( totalSize ); + } + + MpiWrapper::gatherv( localBuffer.data(), + numValues, + gatherResult.data.data(), + gatherResult.counts.data(), + gatherResult.offsets.data(), + 0 ); + + return gatherResult; + } + /** * @brief Convenience function for a MPI_Allreduce using a max-pair operation. * @param[in] value the value to send into the reduction. diff --git a/src/coreComponents/common/StdContainerWrappers.hpp b/src/coreComponents/common/StdContainerWrappers.hpp index afb7506daab..51ce9af6025 100644 --- a/src/coreComponents/common/StdContainerWrappers.hpp +++ b/src/coreComponents/common/StdContainerWrappers.hpp @@ -43,17 +43,6 @@ namespace geos namespace internal { - - -/** - * Default allocator type for std::vector. - * This can be specialized if a different allocator is needed. - * Required to avoid recursive evaluation in StdVectorWrapper. - * @tparam T Type of elements in the vector. - */ -template< typename T > -using DefaultAllocator = std::allocator< T >; - /** * Wrapper for std::vector that allows toggling between bounds-checked access * (using at()) and unchecked access (using operator[]). @@ -63,7 +52,7 @@ using DefaultAllocator = std::allocator< T >; * If false, uses operator[] for unchecked access. */ template< typename T, - typename Allocator = DefaultAllocator< T >, + typename Allocator = std::allocator< T >, bool USE_BOUNDS_CHECKING = false > class StdVectorWrapper : public std::vector< T, Allocator > { diff --git a/src/coreComponents/common/format/EnumStrings.cpp b/src/coreComponents/common/format/EnumStrings.cpp new file mode 100644 index 00000000000..97d8614eef0 --- /dev/null +++ b/src/coreComponents/common/format/EnumStrings.cpp @@ -0,0 +1,42 @@ +/* + * ------------------------------------------------------------------------------------------------------------ + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC + * Copyright (c) 2018-2024 TotalEnergies + * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University + * Copyright (c) 2023-2024 Chevron + * Copyright (c) 2019- GEOS/GEOSX Contributors + * All rights reserved + * + * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. + * ------------------------------------------------------------------------------------------------------------ + */ + +/** + * @file EnumStrings.cpp + */ + + #include "common/format/EnumStrings.hpp" + #include "common/logger/Logger.hpp" + +namespace geos +{ + +void internal::EnumErrorMessageToString( size_t index, + string_view typeName, + std::size_t size ) +{ + GEOS_THROW( "Invalid value " << index << " of type " << typeName<< ". Valid range is 0.." << size - 1, + InputError ); +} + +void internal::EnumErrorMessageFromString( string_view s, + string_view typeName, + string_view concat ) +{ + GEOS_THROW( "Invalid value '" << s << "' of type " << typeName << ". Valid options are: " << concat, + InputError ); +} + +} diff --git a/src/coreComponents/common/format/EnumStrings.hpp b/src/coreComponents/common/format/EnumStrings.hpp index 0bedb0f0081..7984156ac56 100644 --- a/src/coreComponents/common/format/EnumStrings.hpp +++ b/src/coreComponents/common/format/EnumStrings.hpp @@ -28,7 +28,6 @@ #include "common/format/StringUtilities.hpp" // #include "codingUtilities/RTTypes.hpp" #include "common/DataTypes.hpp" -#include "common/logger/Logger.hpp" #include "common/format/Format.hpp" #include @@ -40,6 +39,25 @@ namespace geos namespace internal { + +/** + * @brief Raise a throw error in case of bad use of enum::toString + * @param index The index of the enum causing the error + * @param typeName The enum name + * @param size The size of the enum + */ +void EnumErrorMessageToString( size_t index, string_view typeName, std::size_t size ); + +/** + * @brief Raise a throw error in case of bad use of enum::FromString + * @param s The string that not belonging to the enum + * @param typeName The enum name + * @param size The string concatenation of the enum + */ +void EnumErrorMessageFromString( string_view s, + string_view typeName, + string_view concat ); + /** * @brief Simple compile-time variadic function that counts its arguments. * @tparam ARGS variadic pack of argument types @@ -152,12 +170,10 @@ struct EnumStrings auto const & strings = get(); std::size_t size = std::distance( std::begin( strings ), std::end( strings ) ); base_type const index = static_cast< base_type >( e ); - GEOS_THROW_IF( index >= LvArray::integerConversion< base_type >( size ), - GEOS_FMT( "Invalid value {} of type {}. Valid range is 0..{}", - index, - getEnumTypeNameString( enum_type{} ), - size - 1 ), - InputError ); + if( index >= LvArray::integerConversion< base_type >( size )) + { + internal::EnumErrorMessageToString( index, getEnumTypeNameString( enum_type{} ), size - 1 ); + } return strings[ index ]; } @@ -170,12 +186,10 @@ struct EnumStrings { auto const & strings = get(); auto const it = std::find( std::begin( strings ), std::end( strings ), s ); - GEOS_THROW_IF( it == std::end( strings ), - GEOS_FMT( "Invalid value '{}' of type {}. Valid options are: {}", - s, - getEnumTypeNameString( enum_type{} ), - concat( ", " ) ), - InputError ); + if( it == std::end( strings )) + { + internal::EnumErrorMessageFromString( s, getEnumTypeNameString( enum_type{} ), EnumStrings::concat( ", " )); + } enum_type const e = static_cast< enum_type >( LvArray::integerConversion< base_type >( std::distance( std::begin( strings ), it ) ) ); return e; } diff --git a/src/coreComponents/common/format/LogPart.cpp b/src/coreComponents/common/format/LogPart.cpp index a9ce3c69da6..54ccc8df941 100644 --- a/src/coreComponents/common/format/LogPart.cpp +++ b/src/coreComponents/common/format/LogPart.cpp @@ -18,18 +18,22 @@ #include "LogPart.hpp" #include "common/format/StringUtilities.hpp" +#include "common/logger/ErrorHandling.hpp" #include using namespace geos::stringutilities; namespace geos { -LogPart::LogPart( string_view logPartTitle, bool enableOutput ) +LogPart::LogPart( string_view logpartName, bool enableOutput ) { - m_formattedStartDescription.m_title = logPartTitle; - m_formattedEndDescription.m_title = GEOS_FMT( "{}{}", m_prefixEndTitle, logPartTitle ); + m_formattedStartDescription.m_title = logpartName; + m_formattedEndDescription.m_title = GEOS_FMT( "{}{}", m_prefixEndTitle, logpartName ); m_enableOutput = enableOutput; + + ErrorLogger::global().setCurrentLogPart( std::string(logpartName) ); + } void LogPart::addDescription( string_view description ) diff --git a/src/coreComponents/common/format/LogPart.hpp b/src/coreComponents/common/format/LogPart.hpp index d4223c008b0..d996c03b40b 100644 --- a/src/coreComponents/common/format/LogPart.hpp +++ b/src/coreComponents/common/format/LogPart.hpp @@ -19,9 +19,8 @@ #ifndef GEOS_COMMON_FORMAT_LOGPART_HPP #define GEOS_COMMON_FORMAT_LOGPART_HPP -#include "common/DataTypes.hpp" -#include "common/format/Format.hpp" #include "common/format/StringUtilities.hpp" +#include "common/format/Format.hpp" namespace geos { diff --git a/src/coreComponents/common/format/table/TableData.cpp b/src/coreComponents/common/format/table/TableData.cpp index b9bfc885584..5286af6c0dc 100644 --- a/src/coreComponents/common/format/table/TableData.cpp +++ b/src/coreComponents/common/format/table/TableData.cpp @@ -62,13 +62,6 @@ bool TableData::operator<( TableData const & other ) const return m_rows < other.m_rows; } - - -void TableData::addRow( stdVector< TableData::CellData > const & row ) -{ - m_rows.push_back( row ); -} - void TableData::addSeparator() { if( m_rows.empty()) diff --git a/src/coreComponents/common/format/table/TableData.hpp b/src/coreComponents/common/format/table/TableData.hpp index e36afb037c5..8baa4f442c1 100644 --- a/src/coreComponents/common/format/table/TableData.hpp +++ b/src/coreComponents/common/format/table/TableData.hpp @@ -92,7 +92,8 @@ class TableData * @brief Add a row to the table * @param row A vector of string representing a row */ - void addRow( stdVector< CellData > const & row ); + void addRow( stdVector< CellData > const & row ) + { m_rows.push_back( row ); } /** * @brief Add a line separator to the table @@ -262,6 +263,7 @@ class TableData2D template< typename T > constexpr bool isCellType = std::is_same_v< T, CellType >; + template< typename ... Args > void TableData::addRow( Args const &... args ) { diff --git a/src/coreComponents/common/initializeEnvironment.cpp b/src/coreComponents/common/initializeEnvironment.cpp index f08ad7582c2..a4d45dc5e0a 100644 --- a/src/coreComponents/common/initializeEnvironment.cpp +++ b/src/coreComponents/common/initializeEnvironment.cpp @@ -333,6 +333,14 @@ void setupEnvironment( int argc, char * argv[] ) void cleanupEnvironment() { MemoryLogging::getInstance().memoryStatsReport(); + + ErrorLogger::global().getLoggerReportData().gatherRecordsRank0(); + if( MpiWrapper::commRank() == 0 ) + { + TableTextFormatter tableReportFormatter; + GEOS_LOG( tableReportFormatter.toString< LogHistory >( ErrorLogger::global().getLoggerReportData() )); + } + LvArray::system::resetSignalHandling(); finalizeLogger(); finalizeCaliper(); diff --git a/src/coreComponents/common/logger/DiagnosticMessage.hpp b/src/coreComponents/common/logger/DiagnosticMessage.hpp new file mode 100644 index 00000000000..5719d4422ac --- /dev/null +++ b/src/coreComponents/common/logger/DiagnosticMessage.hpp @@ -0,0 +1,292 @@ +/* + * ------------------------------------------------------------------------------------------------------------ + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC + * Copyright (c) 2018-2024 TotalEnergies + * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University + * Copyright (c) 2023-2024 Chevron + * Copyright (c) 2019- GEOS/GEOSX Contributors + * All rights reserved + * + * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. + * ------------------------------------------------------------------------------------------------------------ + */ + +/** + * @file DiagnosticMessage.hpp + */ + +#include "common/format/EnumStrings.hpp" + +namespace geos +{ + +/** + * @enum MsgType + * Enum listing the different types of possible errors + */ +enum class MsgType +{ + Error, + ExternalError, + Warning, + Exception, + Undefined +}; + +/// Declare strings associated with output MsgType values. +ENUM_STRINGS( MsgType, + "Error", + "ExternalError", + "Warning", + "Exception", + "Undefined" ); + + +/** + * @struct DiagnosticContext + * Store contextual information about the error that occurred and assign it a priority + * default is 0 + */ +struct DiagnosticContext +{ + + /** + * @enum Attribute + * Enumeration used to secure potential map keys + */ + enum class Attribute + { + InputFile, + InputLine, + DataPath, + DetectionLoc, + Signal, + }; + + /// String containing the target object name followed by the the file and line declaring it. + string m_formattedContext; + + /** + * @brief The map contains contextual information about the error + * It could be something like + * "file" = "/path/to/file.xml" + * "line" = "24" + * or something like + * "dataPath" = "/Functions/co2brine_philipsDensityTable + * The key is a field of the Attribute enumeration and is converted to a string for writing in the YAML + */ + map< Attribute, std::string > m_attributes; + + /** + * @brief Priority level assigned to an error context. + * @details Used to prioritize contexts (higher values = more relevant). Default is 0. + */ + integer m_priority = 0; + + /** + * @brief Construct to initialize DiagnosticContext + * @param formattedContext String containing the target object name followed by the the file and line declaring it. + * @param attributes Map containing contextual information about the error + */ + DiagnosticContext( string formattedContext, map< Attribute, std::string > attributes ): + m_formattedContext( formattedContext ), + m_attributes( attributes ) {}; + + /** + * @brief Construct to initialize DiagnosticContext given a string containing the context and his priority + * @param formattedContext String containing the target object name followed by the the file and line declaring it. + * @param attributes Map containing contextual information about the error + * @param priority Priority level assigned to an error context. + */ + DiagnosticContext( string formattedContext, map< Attribute, std::string > attributes, integer priority ): + m_formattedContext( formattedContext ), + m_attributes( attributes ), + m_priority( priority ) {}; + + /** + * @brief Set the priority value of the current error context information + * This way the different context information will appear in descending order during the error log output + * @param priority the new value to asign + * @return the reference to the corresponding error + */ + DiagnosticContext & setPriority( integer priority ) + { m_priority = priority; return *this; } + + /** + * @brief Convert a value from the Attribute enumeration to a string + * @param attribute the value of the enumeration to be converted + * @return a string representation of the enumeration value + */ + static std::string attributeToString( Attribute attribute ); +}; + + +/** + * @brief Struct to construct the diagnostic message object + */ +struct DiagnosticMsg +{ + /// Type of diagnostic (Warning, Error or Exception) + MsgType m_type = MsgType::Undefined; + /// the message that can be completed + std::string m_msg; + /// the cause of the error (erroneous condition, failed assertion...) if identified (optional) + std::string m_cause; + /// the rank(s) on which the diagnostic occured + std::set< int > m_ranksInfo; + /// the path of the source location file + std::string m_file; + /// the source location line (default is 0) + integer m_line = 0; + /// The log part where the diagnostic occured + string m_logPart; + /// Additional information about the diagnostic in the input file + std::vector< DiagnosticContext > m_contextsInfo; + /// the stack trace + std::vector< std::string > m_sourceCallStack; + /// Indicates whether the stored call stack trace is valid and usable. + bool m_isValidStackTrace = false; +}; + +/** + * @brief Builder class for constructing DiagnosticMsg objects + */ +class DiagnosticMsgBuilder +{ +public: + +/** + * @brief Initialize a new DiagnosticMsg + * @param msg The DiagnosticMsg being built + * @param msgType Type of the diagnostic + * @param msgContent The message of the diagnostic. It can be completed afterward + * @param rank The rank on which the diagnostic occured + * @return DiagnosticMsgBuilder + */ + static DiagnosticMsgBuilder init( DiagnosticMsg & msg, + MsgType msgType, + std::string_view msgContent, + integer rank ); + + /** + * @brief Modify an existing DiagnosticMsg + * @param errorMsg The existing DiagnosticMsg + * @return DiagnosticMsgBuilder + */ + static DiagnosticMsgBuilder modify( DiagnosticMsg & errorMsg ); + + /** + * @brief Append exception text to the message + * @param e The exception containing text to add + * @param toEnd If true, append at end; otherwise prepend + * @return Reference to the current instance for method chaining. + */ + DiagnosticMsgBuilder & addToMsg( std::exception const & e, bool toEnd = false ); + + /** + * @brief Append text to the message + * @param msg The text to add + * @param toEnd If true, append at end; otherwise prepend + * @return Reference to the current instance for method chaining. + */ + DiagnosticMsgBuilder & addToMsg( std::string_view msg, bool toEnd = false ); + /** + * @brief Adds one or more context elements to the error + * @tparam Args Variadic pack of compatible types (DiagnosticContext / DataContext) + * @param args List of context data structures. + * @return Reference to the current instance for method chaining. + */ + template< typename ... Args > + DiagnosticMsgBuilder & addContextInfo( Args && ... args ) + { + ( this->addContextInfoImpl( DiagnosticContext( args ) ), ... ); + return *this; + } + + /** + * @brief Add the detection location the DiagnosticMsg + * @param detectionLocation The context where the diagnostic happoned + * @return The instance, for builder pattern. + */ + DiagnosticMsgBuilder & addDetectionLocation( string_view detectionLocation ); + + /** + * @brief Add the signal to the DiagnosticMsg. + * - the signal can be one of the main error signals. + * - if the signal is SIGFPE, the nature of floating point error will be interpreted. + * @param sig The signal, from ISO C99 or POSIX standard. + * @param toEnd adds the message to the end if true, at the start otherwise. + * @return The instance, for builder pattern. + */ + DiagnosticMsgBuilder & addSignal( integer sig, bool toEnd = false ); + + /** + * @brief Set the source code location values (file and line where the error is detected) + * @param msgFile Name of the source file location to add + * @param msgLine Line of the source file location to add + * @return Reference to the current instance for method chaining. + */ + DiagnosticMsgBuilder & setCodeLocation( std::string_view msgFile, integer msgLine ); + /** + * @brief Set the type of the error + * @param msgType The type can be error, warning or exception + * @return Reference to the current instance for method chaining. + */ + DiagnosticMsgBuilder & setType( MsgType msgType ); + + /** + * @brief Set the cause of the error + * @param cause See documentation of m_cause. + * @return Reference to the current instance for method chaining. + */ + DiagnosticMsgBuilder & setCause( std::string_view cause ); + + /** + * @brief Add a rank on which the error has been raised + * @param rank The value to add + * @return Reference to the current instance for method chaining. + */ + DiagnosticMsgBuilder & addRank( integer rank ); + + /** + * @brief Add stack trace information about the error + * @param ossStackTrace stack trace information to add + * @return Reference to the current instance for method chaining. + */ + DiagnosticMsgBuilder & addCallStackInfo( std::string_view stacktrace ); + + /** + * @brief Set log part where the disgnostic occured + * @param logPart The targetted log part + * @return Reference to the current instance for method chaining. + */ + DiagnosticMsgBuilder & setLogPart( std::string_view logPart ); + + + + /** + * @return Get the DiagnosticMsg + */ + DiagnosticMsg & getDiagnosticMsg(); + +private: + + /** + * @brief Private constructor - use init() or modify() instead + * @param msg Reference to the DiagnosticMsg to build/modify + */ + DiagnosticMsgBuilder( DiagnosticMsg & msg ): + m_errorMsg( msg ){} + + /** + * @brief Add contextual information about the error/warning + * @param ctxInfo rvalue of the DiagnosticContext class + */ + DiagnosticMsgBuilder & addContextInfoImpl( DiagnosticContext && ctxInfo ); + + /// The diagnosticMsg being constructed + DiagnosticMsg & m_errorMsg; +}; +} diff --git a/src/coreComponents/common/logger/ErrorHandling.cpp b/src/coreComponents/common/logger/ErrorHandling.cpp index 6881e11259a..9e2aed108ff 100644 --- a/src/coreComponents/common/logger/ErrorHandling.cpp +++ b/src/coreComponents/common/logger/ErrorHandling.cpp @@ -20,11 +20,6 @@ #include "ErrorHandling.hpp" #include "common/DataTypes.hpp" #include "common/logger/Logger.hpp" -#include "common/format/StringUtilities.hpp" - -#include -#include -#include // signal management #include @@ -45,15 +40,15 @@ ErrorLogger g_errorLogger{}; ErrorLogger & ErrorLogger::global() { return g_errorLogger; } -std::string ErrorContext::attributeToString( ErrorContext::Attribute attribute ) +std::string DiagnosticContext::attributeToString( DiagnosticContext::Attribute attribute ) { switch( attribute ) { - case ErrorContext::Attribute::InputFile: return "inputFile"; - case ErrorContext::Attribute::InputLine: return "inputLine"; - case ErrorContext::Attribute::DataPath: return "dataPath"; - case ErrorContext::Attribute::DetectionLoc: return "detectionLocation"; - case ErrorContext::Attribute::Signal: return "signal"; + case DiagnosticContext::Attribute::InputFile: return "inputFile"; + case DiagnosticContext::Attribute::InputLine: return "inputLine"; + case DiagnosticContext::Attribute::DataPath: return "dataPath"; + case DiagnosticContext::Attribute::DetectionLoc: return "detectionLocation"; + case DiagnosticContext::Attribute::Signal: return "signal"; default: return "unknown"; } } @@ -87,11 +82,11 @@ DiagnosticMsgBuilder DiagnosticMsgBuilder::modify( DiagnosticMsg & errorMsg ) return DiagnosticMsgBuilder( errorMsg ); } -DiagnosticMsgBuilder & DiagnosticMsgBuilder::addContextInfoImpl( ErrorContext && ctxInfo ) +DiagnosticMsgBuilder & DiagnosticMsgBuilder::addContextInfoImpl( DiagnosticContext && ctxInfo ) { auto lowerBoundPos = std::lower_bound( m_errorMsg.m_contextsInfo.begin(), m_errorMsg.m_contextsInfo.end(), ctxInfo.m_priority, - []( ErrorContext const & ctx, integer priority ) + []( DiagnosticContext const & ctx, integer priority ) { return ctx.m_priority >= priority; } ); m_errorMsg.m_contextsInfo.insert( lowerBoundPos, std::move( ctxInfo ) ); return *this; @@ -99,9 +94,9 @@ DiagnosticMsgBuilder & DiagnosticMsgBuilder::addContextInfoImpl( ErrorContext && DiagnosticMsgBuilder & DiagnosticMsgBuilder::addDetectionLocation( string_view detectionLocation ) { - addContextInfo( ErrorContext{ string( detectionLocation ), - { { ErrorContext::Attribute::DetectionLoc, - string( detectionLocation ) } } } ); + addContextInfo( DiagnosticContext{ string( detectionLocation ), + { { DiagnosticContext::Attribute::DetectionLoc, + string( detectionLocation ) } } } ); return *this; } @@ -166,12 +161,12 @@ DiagnosticMsgBuilder & DiagnosticMsgBuilder::addSignal( integer const sig, bool // standard messages addToMsg( errorMsg, toEnd ); - this->addContextInfo( ErrorContext{ "Signal (detected from Signal Handler)", - { { ErrorContext::Attribute::Signal, - std::to_string( sig ) }, - { ErrorContext::Attribute::DetectionLoc, - string( "Signal handler" ) } - } } ); + this->addContextInfo( DiagnosticContext{ "Signal (detected from Signal Handler)", + { { DiagnosticContext::Attribute::Signal, + std::to_string( sig ) }, + { DiagnosticContext::Attribute::DetectionLoc, + string( "Signal handler" ) } + } } ); return *this; } @@ -201,6 +196,12 @@ DiagnosticMsgBuilder & DiagnosticMsgBuilder::addRank( integer const rank ) return *this; } +DiagnosticMsgBuilder & DiagnosticMsgBuilder::setLogPart( std::string_view logPart ) +{ + m_errorMsg.m_logPart = logPart; + return *this; +} + DiagnosticMsgBuilder & DiagnosticMsgBuilder::addCallStackInfo( std::string_view ossStackTrace ) { std::string str = std::string( ossStackTrace ); @@ -309,7 +310,7 @@ void ErrorLogger::formatMsgForLog( DiagnosticMsg const & errMsg, std::ostream & } os << PREFIX << "Rank " << stringutilities::join( errMsg.m_ranksInfo, ", " ) << "\n"; // --- ERROR CONTEXT & MESSAGE --- - std::vector< ErrorContext > const & contexts = errMsg.m_contextsInfo; + std::vector< DiagnosticContext > const & contexts = errMsg.m_contextsInfo; if( contexts.empty() || contexts.front().m_formattedContext.empty()) { os << PREFIX << "Message :\n"; @@ -374,15 +375,15 @@ void ErrorLogger::writeToYamlStream( DiagnosticMsg & errMsg ) // context information if( !errMsg.m_contextsInfo.empty() ) { - std::vector< ErrorContext > contextInfo = errMsg.m_contextsInfo; + std::vector< DiagnosticContext > contextInfo = errMsg.m_contextsInfo; // Sort contextual information by decreasing priority std::sort( contextInfo.begin(), contextInfo.end(), - []( const ErrorContext & a, const ErrorContext & b ) { + []( const DiagnosticContext & a, const DiagnosticContext & b ) { return a.m_priority > b.m_priority; } ); // Additional informations about the context of the error and priority information of each context yamlFile << g_level1Next << "contexts:\n"; - for( ErrorContext const & ctxInfo : contextInfo ) + for( DiagnosticContext const & ctxInfo : contextInfo ) { yamlFile << g_level3Start << "priority: " << ctxInfo.m_priority << "\n"; if( !ctxInfo.m_formattedContext.empty()) @@ -391,7 +392,7 @@ void ErrorLogger::writeToYamlStream( DiagnosticMsg & errMsg ) } for( auto const & [key, value] : ctxInfo.m_attributes ) { - yamlFile << g_level3Next << ErrorContext::attributeToString( key ) << ": " << value << "\n"; + yamlFile << g_level3Next << DiagnosticContext::attributeToString( key ) << ": " << value << "\n"; } } } @@ -435,8 +436,11 @@ void ErrorLogger::writeToYamlStream( DiagnosticMsg & errMsg ) } } + + void ErrorLogger::flushErrorMsg( DiagnosticMsg & errMsg ) { + loggerMsgReportData.recordDiagnostic( errMsg ); writeToLogStream( errMsg ); if( isOutputFileEnabled() ) { @@ -446,6 +450,8 @@ void ErrorLogger::flushErrorMsg( DiagnosticMsg & errMsg ) void ErrorLogger::flushCurrentExceptionMessage() { + loggerMsgReportData.recordDiagnostic( m_getCurrentExceptionMsg ); + writeToLogStream( m_getCurrentExceptionMsg ); if( isOutputFileEnabled() ) { diff --git a/src/coreComponents/common/logger/ErrorHandling.hpp b/src/coreComponents/common/logger/ErrorHandling.hpp index 38df2a2566c..e0821228a6a 100644 --- a/src/coreComponents/common/logger/ErrorHandling.hpp +++ b/src/coreComponents/common/logger/ErrorHandling.hpp @@ -21,263 +21,13 @@ #define INITIALIZATION_ERROR_LOGGER_HPP #include "common/DataTypes.hpp" -#include "common/format/Format.hpp" -#include "common/format/StringUtilities.hpp" +#include "common/format/LogPart.hpp" +#include "common/logger/LogHistory.hpp" #include namespace geos { -/** - * @struct ErrorContext - * Store contextual information about the error that occurred and assign it a priority - * default is 0 - */ -struct ErrorContext -{ - - /** - * @enum Attribute - * Enumeration used to secure potential map keys - */ - enum class Attribute - { - InputFile, - InputLine, - DataPath, - DetectionLoc, - Signal, - }; - - /// String containing the target object name followed by the the file and line declaring it. - string m_formattedContext; - - /** - * @brief The map contains contextual information about the error - * It could be something like - * "file" = "/path/to/file.xml" - * "line" = "24" - * or something like - * "dataPath" = "/Functions/co2brine_philipsDensityTable - * The key is a field of the Attribute enumeration and is converted to a string for writing in the YAML - */ - map< Attribute, std::string > m_attributes; - - /** - * @brief Priority level assigned to an error context. - * @details Used to prioritize contexts (higher values = more relevant). Default is 0. - */ - integer m_priority = 0; - - /** - * @brief Construct to initialize ErrorContext - * @param formattedContext String containing the target object name followed by the the file and line declaring it. - * @param attributes Map containing contextual information about the error - */ - ErrorContext( string formattedContext, map< Attribute, std::string > attributes ): - m_formattedContext( formattedContext ), - m_attributes( attributes ) {}; - - /** - * @brief Construct to initialize ErrorContext given a string containing the context and his priority - * @param formattedContext String containing the target object name followed by the the file and line declaring it. - * @param attributes Map containing contextual information about the error - * @param priority Priority level assigned to an error context. - */ - ErrorContext( string formattedContext, map< Attribute, std::string > attributes, integer priority ): - m_formattedContext( formattedContext ), - m_attributes( attributes ), - m_priority( priority ) {}; - - /** - * @brief Set the priority value of the current error context information. - * This way the different context information will appear in descending order during the error log output. - * @param priority the new value to asign - * @return the reference to the corresponding error - */ - ErrorContext & setPriority( integer priority ) - { m_priority = priority; return *this; } - - /** - * @brief Convert a value from the Attribute enumeration to a string - * @param attribute the value of the enumeration to be converted - * @return a string representation of the enumeration value - */ - static std::string attributeToString( Attribute attribute ); - -}; - -/** - * @enum MsgType - * Enum listing the different types of possible diagnostics - */ -enum class MsgType -{ - Error, - ExternalError, - Warning, - Exception, - Undefined -}; - -/** - * @brief Struct to construct the diagnostic message object - */ -struct DiagnosticMsg -{ - /// Type of diagnostic (Warning, Error or Exception) - MsgType m_type = MsgType::Undefined; - /// the message that can be completed - std::string m_msg; - /// the cause of the error (erroneous condition, failed assertion...) if identified (optional) - std::string m_cause; - /// the rank(s) on which the diagnostic occured - std::set< int > m_ranksInfo; - /// the source location file - std::string m_file; - /// the source location line (default is 0) - integer m_line = 0; - /// Additional information about the diagnostic in the input file - std::vector< ErrorContext > m_contextsInfo; - /// the stack trace - std::vector< std::string > m_sourceCallStack; - /// Indicates whether the stored call stack trace is valid and usable. - bool m_isValidStackTrace = false; -}; - -/** - * @brief Builder class for constructing DiagnosticMsg objects - */ -class DiagnosticMsgBuilder -{ -public: - -/** - * @brief Initialize a new DiagnosticMsg - * @param msg The DiagnosticMsg being built - * @param msgType Type of the diagnostic - * @param msgContent The message of the diagnostic. It can be completed afterward - * @param rank The rank on which the diagnostic occured - * @return DiagnosticMsgBuilder - */ - static DiagnosticMsgBuilder init( DiagnosticMsg & msg, - MsgType msgType, - std::string_view msgContent, - integer rank ); - - /** - * @brief Modify an existing DiagnosticMsg - * @param errorMsg The existing DiagnosticMsg - * @return DiagnosticMsgBuilder - */ - static DiagnosticMsgBuilder modify( DiagnosticMsg & errorMsg ); - - /** - * @brief Append exception text to the message - * @param e The exception containing text to add - * @param toEnd If true, append at end; otherwise prepend - * @return Reference to the current instance for method chaining. - */ - DiagnosticMsgBuilder & addToMsg( std::exception const & e, bool toEnd = false ); - - /** - * @brief Append text to the message - * @param msg The text to add - * @param toEnd If true, append at end; otherwise prepend - * @return Reference to the current instance for method chaining. - */ - DiagnosticMsgBuilder & addToMsg( std::string_view msg, bool toEnd = false ); - - /** - * @brief Adds one or more context elements to the error - * @tparam Args Variadic pack of compatible types (ErrorContext / DataContext) - * @param args List of context data structures. - * @return Reference to the current instance for method chaining. - */ - template< typename ... Args > - DiagnosticMsgBuilder & addContextInfo( Args && ... args ) - { - ( this->addContextInfoImpl( ErrorContext( args ) ), ... ); - return *this; - } - - /** - * @brief Add where the detection occured - * @param detectionLocation The context where the diagnostic happoned - * @return The instance, for builder pattern. - */ - DiagnosticMsgBuilder & addDetectionLocation( string_view detectionLocation ); - - /** - * @brief Add the signal to the DiagnosticMsg. - * - the signal can be one of the main error signals. - * - if the signal is SIGFPE, the nature of floating point error will be interpreted. - * @param sig The signal, from ISO C99 or POSIX standard. - * @param toEnd adds the message to the end if true, at the start otherwise. - * @return The instance, for builder pattern. - */ - DiagnosticMsgBuilder & addSignal( integer sig, bool toEnd = false ); - - /** - * @brief Set the source code location values (file and line where the error is detected) - * @param msgFile Name of the source file location to add - * @param msgLine Line of the source file location to add - * @return Reference to the current instance for method chaining. - */ - DiagnosticMsgBuilder & setCodeLocation( std::string_view msgFile, integer msgLine ); - - /** - * @brief Set the type of the error, (amoung one of the MsgType) - * @param msgType The type can be error, warning or exception - * @return Reference to the current instance for method chaining. - */ - DiagnosticMsgBuilder & setType( MsgType msgType ); - - /** - * @brief Set the cause of the error - * @param cause See documentation of m_cause. - * @return Reference to the current instance for method chaining. - */ - DiagnosticMsgBuilder & setCause( std::string_view cause ); - - /** - * @brief Add a rank on which the error has been raised - * @param rank The rank value - * @return Reference to the current instance for method chaining. - */ - DiagnosticMsgBuilder & addRank( integer rank ); - - /** - * @brief Add the stack trace information about the error - * @param stacktrace stack trace information to add - * @return Reference to the current instance for method chaining. - */ - DiagnosticMsgBuilder & addCallStackInfo( std::string_view stacktrace ); - - /** - * @return Get the DiagnosticMsg - */ - DiagnosticMsg & getDiagnosticMsg(); - -private: - - /** - * @brief Private constructor - use init() or modify() instead - * @param msg Reference to the DiagnosticMsg to build/modify - */ - DiagnosticMsgBuilder( DiagnosticMsg & msg ): - m_errorMsg( msg ){} - - /** - * @brief Add contextual information about the error/warning - * @param ctxInfo rvalue of the ErrorContext class - */ - DiagnosticMsgBuilder & addContextInfoImpl( ErrorContext && ctxInfo ); - - /// The diagnosticMsg being constructed - DiagnosticMsg & m_errorMsg; -}; - /** * @brief Logger for formatting and outputting diagnostics */ @@ -374,7 +124,7 @@ class ErrorLogger /** * @brief Write all the information retrieved about the diagnostic message into the instance - * outputs (stream specified, std::cout by default + optional yaml file) + * outputs (stream specified + optional yaml file) * @param errMsg a reference to the ErrorMsg to output, and will be re-initialized * @note Used for warnings and non-exception errors */ @@ -393,16 +143,49 @@ class ErrorLogger */ void writeToLogStream( DiagnosticMsg & errMsg ); + /** + * @brief Gets the current logger report data. + * @return The current log part as a string. + */ + LogHistory const & getLoggerReportData() const + {return loggerMsgReportData;} + + /** + * @brief Gets the current logger report data. + * @return The current log part as a string. + */ + LogHistory & getLoggerReportData() + {return loggerMsgReportData;} + + /** + * @brief Gets the current log part. + * @return The current log part as a string. + */ + string_view getCurrentLogPart() const + {return m_currentLogPart;} + +/** + * @brief Sets the current log part. + * @param currentLogPart The new log part to set. + */ + void setCurrentLogPart( string_view currentLogPart ) + { m_currentLogPart = currentLogPart; } + private: /// The error constructed via exceptions DiagnosticMsg m_getCurrentExceptionMsg; + /// The log history associated + LogHistory loggerMsgReportData = {}; + /// Indicate whether the write to YAML command line option is enabled bool m_writeYaml = false; /// YAML file name std::string_view m_filename = "errors.yaml"; /// The stream used for the log output. By default used std::cout std::ostream & m_stream = std::cout; + /// The current log part being executed + string m_currentLogPart; /// Avoid concurrent access between threads for log outputs std::mutex m_errorHandlerAsciiMutex; /// Avoid concurrent access between threads for yaml outputs diff --git a/src/coreComponents/common/logger/LogHistory.cpp b/src/coreComponents/common/logger/LogHistory.cpp new file mode 100644 index 00000000000..e1c2d268205 --- /dev/null +++ b/src/coreComponents/common/logger/LogHistory.cpp @@ -0,0 +1,238 @@ +/* + * ------------------------------------------------------------------------------------------------------------ + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC + * Copyright (c) 2018-2024 TotalEnergies + * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University + * Copyright (c) 2023-2024 Chevron + * Copyright (c) 2019- GEOS/GEOSX Contributors + * All rights reserved + * + * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. + * ------------------------------------------------------------------------------------------------------------ + */ + +/** + * @file LogHistory.cpp + */ + +#include "LogHistory.hpp" +#include "common/DataTypes.hpp" +#include "common/StdContainerWrappers.hpp" +#include "common/format/EnumStrings.hpp" +#include "common/format/table/TableData.hpp" +#include "common/format/table/TableLayout.hpp" +#include "common/format/table/TableTypes.hpp" +#include "common/MpiWrapper.hpp" +#include +#include +#include + +namespace geos +{ + +string_view extractAfterLastOccurrence( string_view str, char delimiter ) +{ + size_t pos = str.find_last_of( delimiter ); + + if( pos == std::string::npos ) + { + return str; + } + + return str.substr( pos + 1 ); +} + +LogHistory::LogRecord::LogRecord(): + m_key( {} ), + m_value( {} ) +{} +LogHistory::LogRecord::LogRecord( Key const & key, Values const & values ): + m_key( key ), + m_value( values ) +{} + +bool LogHistory::LogRecord::Key::operator==( Key const & rhs ) const +{ + return this->m_filename == rhs.m_filename && + this->m_lineId == rhs.m_lineId; +} + +void LogHistory::LogRecord::deserialize( buffer_unit_type const * & logRecordBytes, buffer_unit_type const * end ) +{ + deserializeField( m_key.m_filename, logRecordBytes, end ); + deserializeField( m_key.m_lineId, logRecordBytes, end ); + deserializeField( m_value.m_logPart, logRecordBytes, end ); + deserializeField( m_value.m_msgType, logRecordBytes, end ); + + m_value.m_count = 0; +} + +void LogHistory::LogRecord::serialize( stdVector< buffer_unit_type > & out ) const +{ + auto const serializePrimitive = [&]( auto const data ) + { + buffer_unit_type const * begin = reinterpret_cast< buffer_unit_type const * >( &data ); + buffer_unit_type const * end = begin + sizeof(data); + out.insert( out.end(), begin, end ); + }; + + auto const serializeString = [&]( string const & data ) + { + serializePrimitive( data.size()); + auto * begin = data.data(); + auto * end = begin + data.size(); + out.insert( out.end(), begin, end ); + }; + + serializeString( m_key.m_filename ); + serializePrimitive( m_key.m_lineId ); + serializeString( m_value.m_logPart ); + serializePrimitive( m_value.m_msgType ); +} + +void LogHistory::recordDiagnostic( DiagnosticMsg const & msgType ) +{ + string_view fileName = extractAfterLastOccurrence( msgType.m_file, '/' ); + integer lineCount = msgType.m_line; + insertDiagnosticReport( { + /*.m_key = */ { + /* .m_filename = */ string( fileName ), + /* .m_lineId = */ lineCount + }, + /*.m_value =*/ { + /* .m_logPart = */ string( msgType.m_logPart ), + /* .m_msgType = */ msgType.m_type, + /* .m_count = */ 1 + } + } ); +} + +void LogHistory::insertDiagnosticReport( LogRecord const & logRecord ) +{ + auto it = m_diagnosticHistory.find( {logRecord.m_key} ); + if( it == m_diagnosticHistory.end()) + { + m_diagnosticHistory.emplace( logRecord.m_key, logRecord.m_value ); + } + else + { + it->second.m_count += 1; + } +} + + + +size_t LogHistory::LogRecord::getSerializedSize() const +{ + return + sizeOfField( m_key.m_filename ) + + sizeOfField( m_key.m_lineId ) + + sizeOfField( m_value.m_logPart ) + + sizeOfField( m_value.m_msgType ); +} + +void LogHistory::gatherRecordsRank0() +{ + LogHistory & history = ErrorLogger::global().getLoggerReportData(); + stdVector< buffer_unit_type > localLogRecords( 0 ); + integer totalSize = 0; + + { // allocation + for( auto const & [key, value] : getDiagnosticHistory() ) + { + LogRecord record( key, value ); + totalSize += record.getSerializedSize(); + } + localLogRecords.reserve( totalSize ); + } + + + { // Packing + if( getDiagnosticHistory().size() > 0 ) + { + for( auto const & [key, value] : getDiagnosticHistory() ) + { + LogRecord record( key, value ); + record.serialize( localLogRecords ); + } + } + } + + auto [globalLogRecords, counts, offsets] = + MpiWrapper::gatherBufferRank0< stdVector< buffer_unit_type > >( localLogRecords ); + + { // Unpacking + if( MpiWrapper::commRank() == 0 ) + { + buffer_unit_type const * startGlobalRecord = globalLogRecords.data(); + for( size_t idxRank = 0; idxRank < (size_t)MpiWrapper::commSize(); ++idxRank ) + { + integer byteFromThisRank = counts[idxRank]; + buffer_unit_type const * rankEnd= startGlobalRecord + byteFromThisRank; + while( startGlobalRecord < rankEnd ) + { + LogRecord unpackRecord; + unpackRecord.deserialize( startGlobalRecord, rankEnd ); + history.insertDiagnosticReport( unpackRecord ); + } + } + } + } +} + +template<> +string TableTextFormatter::toString< LogHistory >( LogHistory const & logHistory ) const +{ + TableLayout tableLayout; + tableLayout.addColumn( "Types" ); + + // fill header + for( size_t msgTypeIdx = (size_t) MsgType::Error; msgTypeIdx != (size_t)MsgType::Undefined; msgTypeIdx++ ) + { + tableLayout.addColumn( EnumStrings< MsgType >::toString( (MsgType) msgTypeIdx ) ); + } + + stdMap< std::pair< string, MsgType >, integer > countPerPartAndType; + using CellRow = stdArray< TableData::CellData, (size_t) MsgType::Undefined >; + CellRow emptyCellRow; + emptyCellRow.fill( TableData::CellData{CellType::Value, "0"} ); + + stdMap< string, CellRow > rowByPart; + + for( const auto & [key, values] : logHistory.getDiagnosticHistory()) + { + auto logPart = values.m_logPart; + MsgType msgType = values.m_msgType; + + countPerPartAndType.get_inserted( std::make_pair( logPart, msgType ))++; + + if( rowByPart.find( logPart ) == rowByPart.end()) + rowByPart.get_inserted( logPart ) = emptyCellRow; + } + + for( auto & [keyPair, count] : countPerPartAndType ) + { + auto logPart = std::get< 0 >( keyPair ); + auto msgType = std::get< 1 >( keyPair ); + rowByPart.get_inserted( logPart ).at((size_t)msgType ).value = std::to_string( count ); + } + + TableData data; + for( auto const & [logPart, cells] : rowByPart ) + { + stdVector< TableData::CellData >row ( { + TableData::CellData{ CellType::Value, logPart } + } ); + + row.insert( row.end(), cells.begin(), cells.end()); + data.addRow( row ); + } + + TableTextFormatter textFormatter( tableLayout ); + return textFormatter.toString( data ) + "\n"; +} + + +} diff --git a/src/coreComponents/common/logger/LogHistory.hpp b/src/coreComponents/common/logger/LogHistory.hpp new file mode 100644 index 00000000000..34b9109dea8 --- /dev/null +++ b/src/coreComponents/common/logger/LogHistory.hpp @@ -0,0 +1,199 @@ +/* + * ------------------------------------------------------------------------------------------------------------ + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC + * Copyright (c) 2018-2024 TotalEnergies + * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University + * Copyright (c) 2023-2024 Chevron + * Copyright (c) 2019- GEOS/GEOSX Contributors + * All rights reserved + * + * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. + * ------------------------------------------------------------------------------------------------------------ + */ + +/** + * @file LogHistory.hpp + */ + +#ifndef GEOS_COMMON_LOGGER_MSG_REPORT_DATA_HPP +#define GEOS_COMMON_LOGGER_MSG_REPORT_DATA_HPP + +#include "common/DataTypes.hpp" +#include "common/StdContainerWrappers.hpp" +#include "common/format/LogPart.hpp" +#include "common/format/table/TableFormatter.hpp" +#include "DiagnosticMessage.hpp" +#include + + +namespace geos +{ + +/** + * @brief Keep track of all diagnostic message occured during the simulation + */ +class LogHistory +{ +public: + + /** + * @brief Records a diagnostic message occurrence in the history. + * @param diagMsg The diagnostic message associated + */ + void recordDiagnostic( DiagnosticMsg const & diagMsg ); + + /** + * @return The const historical diagnostic + */ + auto const & getDiagnosticHistory() const + { return m_diagnosticHistory; } + + /** + * @brief Gather all the records to the rank 0 + * @note Store all records to an unordered_map, non unique records will increment the LogRecord::m_count + */ + void gatherRecordsRank0(); + +private: + + /** + * @brief Contains the essential information of a DiagnosticMsg and can be serialized. + */ + struct LogRecord + { + /** @brief Identifier for a diagnostic message (source localization). */ + struct Key + { + string m_filename; ///< Source file name + integer m_lineId; ///< Line number in the file. + + bool operator==( Key const & lhs ) const; ///< operator == + } m_key; + + /** @brief Content and metadata of the diagnostic message. */ + struct Values + { + string m_logPart; ///< The string logPart. + MsgType m_msgType; ///< Message type. + integer m_count; ///< Number of occurrences detected. + } m_value; + + /** @brief Calculates the total size required for the serialization. + * @return Size in bytes. + */ + size_t getSerializedSize() const; + + /** + * @brief Construct an empty Log Record object + */ + LogRecord(); + + /** + * @brief Construct a new Log Record object + * @param key The log record key + * @param values The log record values + */ + LogRecord( Key const & key, Values const & values ); + + /** @brief Serializes the record fields into a binary buffer. + * @param out Destination vector for the serialized data. + */ + void serialize( stdVector< buffer_unit_type > & out ) const; + + /** + * @brief Deserializes a complete record and advances the read pointer. + * @param logRecordBytes Reference to the read pointer. + * @param end Upper limit of readable memory. + */ + void deserialize( buffer_unit_type const * & logRecordBytes, buffer_unit_type const * end ); + + /** + * @tparam T The trivial type + * @return Returns the size occupied by a trivial type in memory. + */ + template< typename T > + unsigned long sizeOfField( T ) const + { return sizeof(T); } + + /** + * @brief Returns the size of a string (header size + content). + * @param str The target string + * @return Size in bytes. + */ + unsigned long sizeOfField( string_view str ) const + { return sizeof(string::size_type) + str.size(); } + + /** @brief Reads a trivial value from the buffer and advances the pointer. + * @param data Destination variable. + * @param ptr Current read pointer (advanced by sizeof(T)). + * @param end Safety: maximum buffer limit. + */ + template< typename T > + void deserializeField( T & data, buffer_unit_type const * & ptr, buffer_unit_type const * end ) + { + static_assert( std::is_trivially_copyable_v< T > ); + if( ptr + sizeof(T)> end ) throw std::runtime_error( "Buffer truncated" ); + memcpy( &data, ptr, sizeof(T) ); + ptr += sizeof(T); + } + + /** @brief Reads a string value from the buffer and advances the pointer. + * @param data Destination variable. + * @param ptr Current read pointer (advanced by sizeof(string)). + * @param end Safety: maximum buffer limit. + */ + void deserializeField( string & str, buffer_unit_type const * & ptr, buffer_unit_type const * end ) + { + string::size_type strSize = 0; + deserializeField( strSize, ptr, end ); + if( std::distance( ptr, end ) < (long) strSize ) + { + throw std::runtime_error( "Buffer truncated reading string" ); + } + str.assign( ptr, ptr + strSize ); + ptr += str.size(); + } + + }; + + /** + * @brief Insert a LogRepord in the m_diagnosticHistory + * @param log The logRecord with all the information + */ + void insertDiagnosticReport( LogRecord const & log ); + + /// @cond DO_NOT_DOCUMENT + struct LocationKeyHash + { + + size_t operator()( LogRecord::Key const & key ) const noexcept + { + size_t h1 = std::hash< string >{} (key.m_filename); + size_t h2 = std::hash< integer >{} (key.m_lineId); + + return h1 ^ (h2 << 1); + } + + }; + /// @endcond + + /** + * @brief Diagnostic history happened during the simulation + */ + stdUnorderedMap< LogRecord::Key, LogRecord::Values, + LocationKeyHash > m_diagnosticHistory; +}; + +/** + * @brief Template specialisation to convert a LogHistory to a table string. + * @param logHistory The LogHistory object to convert. + * @return The CSV string representation of the logHistory. + */ +template<> +string TableTextFormatter::toString< LogHistory >( LogHistory const & logHistory ) const; + +} + +#endif diff --git a/src/coreComponents/common/logger/Logger.hpp b/src/coreComponents/common/logger/Logger.hpp index b23ba87a39d..f9760f57278 100644 --- a/src/coreComponents/common/logger/Logger.hpp +++ b/src/coreComponents/common/logger/Logger.hpp @@ -162,7 +162,8 @@ .setCodeLocation( __FILE__, __LINE__ ) \ .setCause( __causemsgsoss.str() ) \ .addCallStackInfo( LvArray::system::stackTrace( true ) ) \ - .addContextInfo( GEOS_DETAIL_REST_ARGS( __VA_ARGS__ )); \ + .addContextInfo( GEOS_DETAIL_REST_ARGS( __VA_ARGS__ )) \ + .setLogPart( GEOS_GLOBAL_LOGGER.getCurrentLogPart()); \ GEOS_GLOBAL_LOGGER.flushCurrentExceptionMessage(); \ LvArray::system::callErrorHandler(); \ } \ @@ -250,6 +251,7 @@ .setCause( __causemsgsoss.str() ) \ .addCallStackInfo( LvArray::system::stackTrace( true ) ) \ .addContextInfo( GEOS_DETAIL_REST_ARGS( __VA_ARGS__ )) \ + .setLogPart( GEOS_GLOBAL_LOGGER.getCurrentLogPart()) \ .getDiagnosticMsg(); \ auto ex = GEOS_DETAIL_FIRST_ARG( __VA_ARGS__ )(); \ ex.prepareWhat( exceptionMsg ); \ @@ -343,6 +345,7 @@ .setCause( __causemsgsoss.str() ) \ .addCallStackInfo( LvArray::system::stackTrace( true ) ) \ .addContextInfo( GEOS_DETAIL_REST_ARGS( __VA_ARGS__ )) \ + .setLogPart( GEOS_GLOBAL_LOGGER.getCurrentLogPart()) \ .getDiagnosticMsg() ); \ } \ }while( false ) diff --git a/src/coreComponents/common/unitTests/CMakeLists.txt b/src/coreComponents/common/unitTests/CMakeLists.txt index 2f6966bf487..8ef1ba9beaf 100644 --- a/src/coreComponents/common/unitTests/CMakeLists.txt +++ b/src/coreComponents/common/unitTests/CMakeLists.txt @@ -1,7 +1,7 @@ # Specify list of tests set( gtest_geosx_tests - testDataTypes.cpp testFixedSizeDeque.cpp + testDataTypes.cpp testMacros.cpp testMpiWrapper.cpp testTypeDispatch.cpp diff --git a/src/coreComponents/common/unitTests/testDataTypes.cpp b/src/coreComponents/common/unitTests/testDataTypes.cpp index 58ebc681cae..5a47d4f7b63 100644 --- a/src/coreComponents/common/unitTests/testDataTypes.cpp +++ b/src/coreComponents/common/unitTests/testDataTypes.cpp @@ -16,16 +16,19 @@ // Source includes #include "common/DataTypes.hpp" -// TPL includes +#include "common/StdContainerWrappers.hpp" + + +// // TPL includes #include #include +#include using namespace geos; TEST( testDataTypes, testBoundChecking ) { - internal::StdVectorWrapper< std::string, - std::allocator< std::string >, + internal::StdVectorWrapper< std::string, std::allocator< std::string >, true > vectorBoundsChecking = {"test"}; EXPECT_THROW( { try diff --git a/src/coreComponents/constitutive/fluid/multifluid/compositional/parameters/PhaseType.cpp b/src/coreComponents/constitutive/fluid/multifluid/compositional/parameters/PhaseType.cpp index a86de714834..f9dcb183408 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/compositional/parameters/PhaseType.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/compositional/parameters/PhaseType.cpp @@ -19,6 +19,7 @@ #include "PhaseType.hpp" #include "common/format/StringUtilities.hpp" +#include "common/logger/Logger.hpp" namespace geos { diff --git a/src/coreComponents/dataRepository/DataContext.cpp b/src/coreComponents/dataRepository/DataContext.cpp index 8ce7f1c7b55..c7d1e1bd77b 100644 --- a/src/coreComponents/dataRepository/DataContext.cpp +++ b/src/coreComponents/dataRepository/DataContext.cpp @@ -108,12 +108,12 @@ string DataFileContext::toString() const } } -ErrorContext DataFileContext::getContextInfo() const +DiagnosticContext DataFileContext::getContextInfo() const { - ErrorContext ctxInfo{ + DiagnosticContext ctxInfo{ toString(), - { { ErrorContext::Attribute::InputFile, m_filePath }, - { ErrorContext::Attribute::InputLine, std::to_string( m_line )} } + { { DiagnosticContext::Attribute::InputFile, m_filePath }, + { DiagnosticContext::Attribute::InputLine, std::to_string( m_line )} } }; return ctxInfo; } diff --git a/src/coreComponents/dataRepository/DataContext.hpp b/src/coreComponents/dataRepository/DataContext.hpp index 8a43381b438..7ab4685ed95 100644 --- a/src/coreComponents/dataRepository/DataContext.hpp +++ b/src/coreComponents/dataRepository/DataContext.hpp @@ -63,15 +63,15 @@ class DataContext /** * @brief Returns contextual information, including the file name and the line number - * @return ErrorContext + * @return DiagnosticContext */ - virtual ErrorContext getContextInfo() const = 0; + virtual DiagnosticContext getContextInfo() const = 0; /** - * @brief Conversion operator to ErrorContext - * @return ErrorContext + * @brief Conversion operator to DiagnosticContext + * @return DiagnosticContext */ - explicit operator ErrorContext() const { + explicit operator DiagnosticContext() const { return getContextInfo(); } @@ -172,9 +172,9 @@ class DataFileContext final : public DataContext /** * @brief Return contextual information (file and line of the input file where the error occured) - * @return ErrorContext ErrorLogger instance updated with context information + * @return DiagnosticContext ErrorLogger instance updated with context information */ - ErrorContext getContextInfo() const override; + DiagnosticContext getContextInfo() const override; /** * @return the type name in the source file (XML node tag name / attribute name). diff --git a/src/coreComponents/dataRepository/GroupContext.cpp b/src/coreComponents/dataRepository/GroupContext.cpp index 04e1fa1f2a3..9c3e3dbb6fb 100644 --- a/src/coreComponents/dataRepository/GroupContext.cpp +++ b/src/coreComponents/dataRepository/GroupContext.cpp @@ -54,11 +54,11 @@ string GroupContext::toString() const return path.str(); } -ErrorContext GroupContext::getContextInfo() const +DiagnosticContext GroupContext::getContextInfo() const { - ErrorContext ctxInfo{ + DiagnosticContext ctxInfo{ toString(), - { { ErrorContext::Attribute::DataPath, GEOS_FMT( "{}/{}", m_group.getPath(), m_targetName )} } + { { DiagnosticContext::Attribute::DataPath, GEOS_FMT( "{}/{}", m_group.getPath(), m_targetName )} } }; return ctxInfo; } diff --git a/src/coreComponents/dataRepository/GroupContext.hpp b/src/coreComponents/dataRepository/GroupContext.hpp index abdc1199e7d..698fa02a301 100644 --- a/src/coreComponents/dataRepository/GroupContext.hpp +++ b/src/coreComponents/dataRepository/GroupContext.hpp @@ -71,9 +71,9 @@ class GroupContext : public DataContext /** * @brief Return contextual information here it is a data path - * @return ErrorContext ErrorLogger instance updated with context information + * @return DiagnosticContext ErrorLogger instance updated with context information */ - ErrorContext getContextInfo() const override; + DiagnosticContext getContextInfo() const override; /** * @copydoc DataContext::getToStringInfo() diff --git a/src/coreComponents/dataRepository/WrapperContext.cpp b/src/coreComponents/dataRepository/WrapperContext.cpp index 3d689ade254..323acdc3e83 100644 --- a/src/coreComponents/dataRepository/WrapperContext.cpp +++ b/src/coreComponents/dataRepository/WrapperContext.cpp @@ -38,11 +38,11 @@ string WrapperContext::toString() const GEOS_FMT( "{}/{}", m_group.getDataContext().toString(), m_typeName ); } -ErrorContext WrapperContext::getContextInfo() const +DiagnosticContext WrapperContext::getContextInfo() const { - ErrorContext ctxInfo{ + DiagnosticContext ctxInfo{ toString(), - {{ ErrorContext::Attribute::DataPath, GEOS_FMT( "{}/{}", m_group.getPath(), m_typeName ) } }, + {{ DiagnosticContext::Attribute::DataPath, GEOS_FMT( "{}/{}", m_group.getPath(), m_typeName ) } }, }; return ctxInfo; } diff --git a/src/coreComponents/dataRepository/WrapperContext.hpp b/src/coreComponents/dataRepository/WrapperContext.hpp index b136a66862c..1cab552e581 100644 --- a/src/coreComponents/dataRepository/WrapperContext.hpp +++ b/src/coreComponents/dataRepository/WrapperContext.hpp @@ -56,9 +56,9 @@ class WrapperContext final : public GroupContext /** * @brief Return contextual information here it is a data path - * @return ErrorContext ErrorLogger instance updated with context information + * @return DiagnosticContext ErrorLogger instance updated with context information */ - ErrorContext getContextInfo() const override; + DiagnosticContext getContextInfo() const override; }; diff --git a/src/coreComponents/events/EventManager.cpp b/src/coreComponents/events/EventManager.cpp index 5e24698b008..261542cf52f 100644 --- a/src/coreComponents/events/EventManager.cpp +++ b/src/coreComponents/events/EventManager.cpp @@ -176,7 +176,7 @@ bool EventManager::run( DomainPartition & domain ) m_dt = dt_global; #endif } - LogPart logPart( "TIMESTEP", MpiWrapper::commRank() == 0 ); + LogPart logPart( "Timestep", MpiWrapper::commRank() == 0 ); outputTime( logPart ); logPart.begin(); diff --git a/src/coreComponents/linearAlgebra/multiscale/mesh/coarsening/MetisInterface.cpp b/src/coreComponents/linearAlgebra/multiscale/mesh/coarsening/MetisInterface.cpp index f4d48c82b9a..817bef0c015 100644 --- a/src/coreComponents/linearAlgebra/multiscale/mesh/coarsening/MetisInterface.cpp +++ b/src/coreComponents/linearAlgebra/multiscale/mesh/coarsening/MetisInterface.cpp @@ -19,6 +19,7 @@ #include "MetisInterface.hpp" #include "common/TimingMacros.hpp" +#include "common/logger/Logger.hpp" #include diff --git a/src/coreComponents/mainInterface/GeosxState.cpp b/src/coreComponents/mainInterface/GeosxState.cpp index 1fcb001bc18..daed9d999f4 100644 --- a/src/coreComponents/mainInterface/GeosxState.cpp +++ b/src/coreComponents/mainInterface/GeosxState.cpp @@ -127,7 +127,8 @@ bool GeosxState::initializeDataRepository() Timer timer( m_initTime ); GEOS_THROW_IF_NE( m_state, State::UNINITIALIZED, geos::LogicError ); - + LogPart postProcessiveLog( "Parsing", MpiWrapper::commRank() == 0 ); + postProcessiveLog.begin(); getProblemManager().parseCommandLineInput(); if( !getProblemManager().getSchemaFileName().empty() ) @@ -138,6 +139,7 @@ bool GeosxState::initializeDataRepository() } getProblemManager().parseInputFile(); + postProcessiveLog.end(); getProblemManager().problemSetup(); m_state = State::INITIALIZED; diff --git a/src/coreComponents/mesh/ElementType.hpp b/src/coreComponents/mesh/ElementType.hpp index 76df6db0754..056cae6f010 100644 --- a/src/coreComponents/mesh/ElementType.hpp +++ b/src/coreComponents/mesh/ElementType.hpp @@ -21,6 +21,7 @@ #define GEOS_MESH_ELEMENTTYPE_HPP #include "common/format/EnumStrings.hpp" +#include "common/logger/Logger.hpp" namespace geos { diff --git a/src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp b/src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp index 51fab7226b7..16328a5b5e5 100644 --- a/src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp +++ b/src/coreComponents/physicsSolvers/PhysicsSolverBase.cpp @@ -19,6 +19,7 @@ #include "common/MpiWrapper.hpp" #include "codingUtilities/RTTypes.hpp" #include "common/format/EnumStrings.hpp" +#include "common/logger/Logger.hpp" #include "dataRepository/Group.hpp" #include "physicsSolvers/LogLevelsInfo.hpp" #include "common/format/LogPart.hpp" @@ -375,7 +376,7 @@ void PhysicsSolverBase::logEndOfCycleInformation( integer const cycleNumber, stdVector< real64 > const & subStepDts ) const { { - LogPart logpart( "TIMESTEP", MpiWrapper::commRank() == 0 ); + LogPart logpart( "Time step", MpiWrapper::commRank() == 0 ); logpart.addEndDescription( "- Cycle ", cycleNumber ); logpart.addEndDescription( "- N substeps ", numOfSubSteps ); From f68970b2a71abce9b955e52113f3fa943c13901b Mon Sep 17 00:00:00 2001 From: arng40 Date: Tue, 17 Mar 2026 11:42:45 +0100 Subject: [PATCH 3/3] :art: assign logPart for logger in begin --- src/coreComponents/common/format/LogPart.cpp | 3 ++- src/coreComponents/common/logger/Logger.hpp | 5 +---- src/coreComponents/mainInterface/ProblemManager.cpp | 3 ++- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/coreComponents/common/format/LogPart.cpp b/src/coreComponents/common/format/LogPart.cpp index 54ccc8df941..e2f83132c19 100644 --- a/src/coreComponents/common/format/LogPart.cpp +++ b/src/coreComponents/common/format/LogPart.cpp @@ -32,7 +32,7 @@ LogPart::LogPart( string_view logpartName, bool enableOutput ) m_enableOutput = enableOutput; - ErrorLogger::global().setCurrentLogPart( std::string(logpartName) ); + ErrorLogger::global().setCurrentLogPart( std::string( logpartName ) ); } @@ -194,6 +194,7 @@ void LogPart::begin( std::ostream & os ) if( !m_enableOutput ) return; + ErrorLogger::global().setCurrentLogPart( m_formattedStartDescription.m_title ); if( !m_startDescription.m_names.empty()) { diff --git a/src/coreComponents/common/logger/Logger.hpp b/src/coreComponents/common/logger/Logger.hpp index f9760f57278..b23ba87a39d 100644 --- a/src/coreComponents/common/logger/Logger.hpp +++ b/src/coreComponents/common/logger/Logger.hpp @@ -162,8 +162,7 @@ .setCodeLocation( __FILE__, __LINE__ ) \ .setCause( __causemsgsoss.str() ) \ .addCallStackInfo( LvArray::system::stackTrace( true ) ) \ - .addContextInfo( GEOS_DETAIL_REST_ARGS( __VA_ARGS__ )) \ - .setLogPart( GEOS_GLOBAL_LOGGER.getCurrentLogPart()); \ + .addContextInfo( GEOS_DETAIL_REST_ARGS( __VA_ARGS__ )); \ GEOS_GLOBAL_LOGGER.flushCurrentExceptionMessage(); \ LvArray::system::callErrorHandler(); \ } \ @@ -251,7 +250,6 @@ .setCause( __causemsgsoss.str() ) \ .addCallStackInfo( LvArray::system::stackTrace( true ) ) \ .addContextInfo( GEOS_DETAIL_REST_ARGS( __VA_ARGS__ )) \ - .setLogPart( GEOS_GLOBAL_LOGGER.getCurrentLogPart()) \ .getDiagnosticMsg(); \ auto ex = GEOS_DETAIL_FIRST_ARG( __VA_ARGS__ )(); \ ex.prepareWhat( exceptionMsg ); \ @@ -345,7 +343,6 @@ .setCause( __causemsgsoss.str() ) \ .addCallStackInfo( LvArray::system::stackTrace( true ) ) \ .addContextInfo( GEOS_DETAIL_REST_ARGS( __VA_ARGS__ )) \ - .setLogPart( GEOS_GLOBAL_LOGGER.getCurrentLogPart()) \ .getDiagnosticMsg() ); \ } \ }while( false ) diff --git a/src/coreComponents/mainInterface/ProblemManager.cpp b/src/coreComponents/mainInterface/ProblemManager.cpp index 5d190f966e4..320f7148ec4 100644 --- a/src/coreComponents/mainInterface/ProblemManager.cpp +++ b/src/coreComponents/mainInterface/ProblemManager.cpp @@ -179,7 +179,7 @@ void ProblemManager::problemSetup() meshGenerationLog.end(); } -// initialize_postMeshGeneration(); + // initialize_postMeshGeneration(); { LogPart numericalMethodLog( "Numerical Methods", MpiWrapper::commRank() == 0 ); numericalMethodLog.begin(); @@ -190,6 +190,7 @@ void ProblemManager::problemSetup() registerDataOnMeshRecursive( getDomainPartition().getMeshBodies() ); initialize(); + { LogPart importFieldsLog( "Import fields", MpiWrapper::commRank() == 0 ); importFieldsLog.begin();