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

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from

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.76%. Comparing base (f05008b) to head (7d018a0).

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.77%   55.76%   -0.01%     
===========================================
  Files         1035     1035              
  Lines        87914    87925      +11     
===========================================
  Hits         49035    49035              
- Misses       38879    38890      +11     

☔ 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
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