Skip to content

feat: Error reporting at the end of the simulatiuon #3929

Open
arng40 wants to merge 333 commits intodevelopfrom
feat/dudes/warning-report
Open

feat: Error reporting at the end of the simulatiuon #3929
arng40 wants to merge 333 commits intodevelopfrom
feat/dudes/warning-report

Conversation

@arng40
Copy link
Contributor

@arng40 arng40 commented Dec 23, 2025

Will be merged after : #3902

  • Introduce a logHistory to store all the log
  • Gathering logs between ranks

Located after MemoryStatsOutput :

Ex :


Types Error ExternalError Warning Exception
MeshGeneration 0 0 3 0
NumericalMethods 0 0 5 0
ImportFields 0 0 5 0

MelReyCG and others added 30 commits July 23, 2025 17:24
…ASSERT and GEOS_THROW are now compatible with context parameters)

m_enableOutput = enableOutput;

ErrorLogger::global().setCurrentLogPart( std::string(logpartName) );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor Author

@arng40 arng40 Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 2nd option is better, it's up to the logger de decide.
I'll do this update in an another PR

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok! I keep the comment open, keep it as reference in the ticket and future PR description.

Copy link
Contributor

@MelReyCG MelReyCG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we see a real case sample?

}
else
{
it->second.m_count += 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be?

Suggested change
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 );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think of

Suggested change
LogPart postProcessiveLog( "Parsing", MpiWrapper::commRank() == 0 );
LogPart postProcessiveLog( "Input Files Processing", MpiWrapper::commRank() == 0 );

Comment on lines +381 to +384
if( MpiWrapper::commRank() == 1 )
{
GEOS_WARNING( "labla" );
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be careful, you tend to forget more and more of these in your recent works

>
>
static GatherResult< CONTAINER >
gatherBufferRank0( CONTAINER const & localBuffer )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment on lines +19 to +25
#include "common/StdContainerWrappers.hpp"


// // TPL includes
#include <gtest/gtest.h>
#include <gtest/gtest-spi.h>
#include <memory>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can revert

Comment on lines +138 to +143
{
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);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-> CPP
Here and for all other >1 function, as usual.

TableLayout tableLayout;
tableLayout.addColumn( "Types" );

// fill header
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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++ )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do as I did in my PR for the -d:

Suggested change
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++ )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DO NOT MERGE ! flag: no rebaseline Does not require rebaseline type: feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants