Skip to content

Force gstats tasks to run sequentially#120

Merged
wdeconinck merged 3 commits into
ecmwf-ifs:developfrom
DJDavies2:feature/119
Apr 28, 2026
Merged

Force gstats tasks to run sequentially#120
wdeconinck merged 3 commits into
ecmwf-ifs:developfrom
DJDavies2:feature/119

Conversation

@DJDavies2

Copy link
Copy Markdown
Contributor

Description

Force the gstats task to run sequentially to ensure they don't all try to write to the same output file.

Contributor Declaration

By opening this pull request, I affirm the following:

  • All authors agree to the Contributor License Agreement.
  • The code follows the project's coding standards.
  • I have performed self-review and added comments where needed.
  • I have added or updated tests to verify that my changes are effective and functional.
  • I have run all existing tests and confirmed they pass.

@DJDavies2

Copy link
Copy Markdown
Contributor Author

It would be better if the tasks all wrote to different files, but that would require code changes.

@wdeconinck

Copy link
Copy Markdown
Collaborator

Thanks for the proposal.
Rather than having tests depend on each other we can also use cmake's RESOURCE_LOCK test property, such as was also done for some dr_hook tests.

foreach( test fiat_test_gstats_csv_output_mpi0
              fiat_test_gstats_csv_output_mpi1
              fiat_test_gstats_csv_output_mpi2 )
  if( TEST ${test} )
    set_tests_properties(${test} PROPERTIES RESOURCE_LOCK gstats_csv_output )
  endif()
endforeach()

@DJDavies2

Copy link
Copy Markdown
Contributor Author

Thanks for the proposal. Rather than having tests depend on each other we can also use cmake's RESOURCE_LOCK test property, such as was also done for some dr_hook tests.

foreach( test fiat_test_gstats_csv_output_mpi0
              fiat_test_gstats_csv_output_mpi1
              fiat_test_gstats_csv_output_mpi2 )
  if( TEST ${test} )
    set_tests_properties(${test} PROPERTIES RESOURCE_LOCK gstats_csv_output )
  endif()
endforeach()

I've implemented this.

@wdeconinck wdeconinck left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @DJDavies2 for fixing and addressing review.

@wdeconinck wdeconinck merged commit d0981e7 into ecmwf-ifs:develop Apr 28, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants