Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #3146 - Error in stat reduction for Function triggered PeriodicEvent #3147

Merged
merged 11 commits into from
Jun 28, 2024

Conversation

jafranc
Copy link
Contributor

@jafranc jafranc commented May 29, 2024

Fix #3146 - Error in stat reduction for Function triggered PeriodicEvent

Using such a XML block as

    <PeriodicEvent
      name="ConditionalDump"
            logLevel="2"
      maxEventDt="0.1"
            function="sg"
            threshold="0.1"
            object="/Problem/.../mesh/.../c2"
            stat="0"
            target="/Outputs/vtkOutput"/>

Attempting to use function attribute of Periodic event and its related attribute stat to trigger periodic event if min (0 is for min, 1 is for average, 2 is for max) of the function is above threshold was not working properly:

  • in parallel
  • if stat=2, i.e. for maximum

indeed,

  • reduction for parallel runs other than max were not implemented.
  • a typo in FunctionBase.cpp was comparing min to max.

Moreover, for partitions not intersecting (N=0 in FunctionBase.cpp)
with object the workflow was returning 1e10 for min and -1e10 for max in parallel reductions.

@paveltomin
Copy link
Contributor

@jafranc can you explain a little bit what was the issue and how you got it fixed?

@jafranc
Copy link
Contributor Author

jafranc commented Jun 4, 2024

@jafranc can you explain a little bit what was the issue and how you got it fixed?

I updated the description above. I am reporting Oleg experience and fix there.

@jafranc jafranc marked this pull request as ready for review June 5, 2024 13:57
@jafranc jafranc added the flag: no rebaseline Does not require rebaseline label Jun 5, 2024
Copy link

codecov bot commented Jun 5, 2024

Codecov Report

Attention: Patch coverage is 0% with 14 lines in your changes missing coverage. Please review.

Project coverage is 55.88%. Comparing base (399ec9d) to head (1d488d8).

Files Patch % Lines
src/coreComponents/events/PeriodicEvent.cpp 0.00% 13 Missing ⚠️
src/coreComponents/functions/FunctionBase.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3147      +/-   ##
===========================================
- Coverage    55.89%   55.88%   -0.01%     
===========================================
  Files         1037     1037              
  Lines        88148    88159      +11     
===========================================
- Hits         49271    49269       -2     
- Misses       38877    38890      +13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jafranc jafranc added the ci: run CUDA builds Allows to triggers (costly) CUDA jobs label Jun 11, 2024
@jafranc jafranc added the ci: run integrated tests Allows to run the integrated tests in GEOS CI label Jun 13, 2024
@jafranc jafranc removed the ci: run integrated tests Allows to run the integrated tests in GEOS CI label Jun 26, 2024
@jafranc jafranc added the ci: run integrated tests Allows to run the integrated tests in GEOS CI label Jun 26, 2024
@paveltomin paveltomin merged commit e5d8d92 into develop Jun 28, 2024
24 of 26 checks passed
@paveltomin paveltomin deleted the fix/PeriodicEvent-FctTrigger branch June 28, 2024 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci: run CUDA builds Allows to triggers (costly) CUDA jobs ci: run integrated tests Allows to run the integrated tests in GEOS CI flag: no rebaseline Does not require rebaseline
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Function triggered PeriodicEvent does not work properly in parallel
2 participants