feat: Error reporting at the end of the simulatiuon #3929
feat: Error reporting at the end of the simulatiuon #3929
Conversation
…rser.h modifications since no longer useful
…y/create-yaml-file-and-structure
…ttps://github.com/amandinehry/GEOS into feature/amandinehry/create-yaml-file-and-structure
…mandinehry/create-yaml-file-and-structure
…t-test + testing GEOS_ERROR
…unit test separation for multiple EXPECT_EXIT
…upported by fmt for now)
…ASSERT and GEOS_THROW are now compatible with context parameters)
…y/create-yaml-file-and-structure
|
|
||
| m_enableOutput = enableOutput; | ||
|
|
||
| ErrorLogger::global().setCurrentLogPart( std::string(logpartName) ); |
There was a problem hiding this comment.
Storing this "current log part" information in the logger instance is the thing to do, but I don't think that is at the right moment.
I think it should be at the begin() moment, and the logger instance should be given as parameter OR the logger instance should be able to begin a given log part (and store it).
-> what do you choose?
There was a problem hiding this comment.
The 2nd option is better, it's up to the logger de decide.
I'll do this update in an another PR
There was a problem hiding this comment.
ok! I keep the comment open, keep it as reference in the ticket and future PR description.
MelReyCG
left a comment
There was a problem hiding this comment.
can we see a real case sample?
| } | ||
| else | ||
| { | ||
| it->second.m_count += 1; |
There was a problem hiding this comment.
Should this be?
| it->second.m_count += 1; | |
| it->second.m_count += logRecord.m_value.m_count; |
|
|
||
| GEOS_THROW_IF_NE( m_state, State::UNINITIALIZED, geos::LogicError ); | ||
|
|
||
| LogPart postProcessiveLog( "Parsing", MpiWrapper::commRank() == 0 ); |
There was a problem hiding this comment.
What do you think of
| LogPart postProcessiveLog( "Parsing", MpiWrapper::commRank() == 0 ); | |
| LogPart postProcessiveLog( "Input Files Processing", MpiWrapper::commRank() == 0 ); |
| if( MpiWrapper::commRank() == 1 ) | ||
| { | ||
| GEOS_WARNING( "labla" ); | ||
| } |
There was a problem hiding this comment.
Be careful, you tend to forget more and more of these in your recent works
| > | ||
| > | ||
| static GatherResult< CONTAINER > | ||
| gatherBufferRank0( CONTAINER const & localBuffer ) |
There was a problem hiding this comment.
I'm not sure which PR should go first... One should be based on the other one because you implement this in the two PRs. Taking into account any comment / change on the other PR
| #include "common/StdContainerWrappers.hpp" | ||
|
|
||
|
|
||
| // // TPL includes | ||
| #include <gtest/gtest.h> | ||
| #include <gtest/gtest-spi.h> | ||
| #include <memory> |
| { | ||
| 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); | ||
| } |
There was a problem hiding this comment.
-> CPP
Here and for all other >1 function, as usual.
| TableLayout tableLayout; | ||
| tableLayout.addColumn( "Types" ); | ||
|
|
||
| // fill header |
There was a problem hiding this comment.
you can maybe add some more "part" comments for this function I think.
| tableLayout.addColumn( "Types" ); | ||
|
|
||
| // fill header | ||
| for( size_t msgTypeIdx = (size_t) MsgType::Error; msgTypeIdx != (size_t)MsgType::Undefined; msgTypeIdx++ ) |
There was a problem hiding this comment.
Do as I did in my PR for the -d:
| for( size_t msgTypeIdx = (size_t) MsgType::Error; msgTypeIdx != (size_t)MsgType::Undefined; msgTypeIdx++ ) | |
| for( size_t msgTypeIdx = 0; msgTypeIdx < (size_t)MsgType::Count; msgTypeIdx++ ) |
Will be merged after : #3902
Located after MemoryStatsOutput :
Ex :