Skip to content

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

Draft
arng40 wants to merge 268 commits intodevelopfrom
feat/dudes/warning-report
Draft

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

Conversation

@arng40
Copy link
Contributor

@arng40 arng40 commented Dec 23, 2025

Will be merged after : #3902

Located after MemoryStatsOutput :

Ex :


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

…y 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".
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.

Preliminary review.
It seems like you're not based on the right branch, you can base it on the "centralization" PR.
Can you comment or split your data processing code? (The one in initializeEnvironment.cpp)

Comment on lines +35 to +45
/**
* @enum Type
* Enum listing the different types of possibleLogPart
*/
enum class Type
{
MeshGeneration,
NumericalMethods,
ImportFields,
Timestep,
};
Copy link
Contributor

@MelReyCG MelReyCG Jan 28, 2026

Choose a reason for hiding this comment

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

I'm really not into having this at this level of the application.
Maybe a (bi-)map given at ProblemManager level would be better.

* Store contextual information about the error that occurred and assign it a priority
* default is 0
*/
struct ErrorContext
Copy link
Contributor

Choose a reason for hiding this comment

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

DiagnosticContext?

* @brief Hierarchical storage of message statistics
* Structure: LogPart -> MsgType -> SourceLocation -> Statistics
*/
stdMap< LogPart::Type, stdMap< MsgType, stdMap< MsgStatistics::LocationKey, MsgStatistics > > > m_messageCounts;
Copy link
Contributor

Choose a reason for hiding this comment

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

stdMap< std::tuple< LogPart::Type, MsgType, MsgStatistics::LocationKey >, MsgStatistics >?

Copy link
Contributor

Choose a reason for hiding this comment

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

A struct can be nice too! (better for lisibility)

}

// Allows to know how much data each rank will send
MpiWrapper::gather( &numValues, 1, recvCounts.data(), 1, 0, MPI_COMM_GEOS );
Copy link
Contributor

Choose a reason for hiding this comment

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

I have the feeling that all of that data processing should be kept in the LogHistory class, not here.

LogPart numericalMethodLog( EnumStrings< LogPart::Type >::toString( LogPart::Type::NumericalMethods ), MpiWrapper::commRank() == 0 );
numericalMethodLog.begin();
applyNumericalMethods();
GEOS_WARNING( "plouf" );
Copy link
Contributor

Choose a reason for hiding this comment

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

💦💦💦

struct MsgStatistics
{
/// Key identifying the source location
using LocationKey = std::pair< std::array< char, 200 >, integer >;
Copy link
Contributor

Choose a reason for hiding this comment

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

todo: change to variable size string

Comment on lines +415 to +416
buffer_unit_type * local_buffer_logPart = new buffer_unit_type[ sizeof(LogPart::Type) ]();
buffer_unit_type * local_buffer_logPart_cpy = local_buffer_logPart;
Copy link
Contributor

@MelReyCG MelReyCG Feb 2, 2026

Choose a reason for hiding this comment

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

Suggested change
buffer_unit_type * local_buffer_logPart = new buffer_unit_type[ sizeof(LogPart::Type) ]();
buffer_unit_type * local_buffer_logPart_cpy = local_buffer_logPart;
buffer_unit_type * local_buffer_logPart = new buffer_unit_type[ sizeof(LogPart::Type) ]();
buffer_unit_type * local_buffer_logPart_iter = local_buffer_logPart;

and reset iterator when needed

  • camel case

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