Skip to content

Conversation

PaulineVidal
Copy link
Collaborator

@PaulineVidal PaulineVidal commented Aug 6, 2025

Add a test_diocotron.sh to check if the growth rate of the perturbation of the diocotron instability test case follow the expected slope. It allows us to test the different predictor corrector in the geometryRTheta folder.
Add a time_solver folder and a time_solver/growth_rate_test-py in the tests/geometryRTheta folder.

Remove "Add a periodic_strips_non_uniform_2d_9patches geometry." in the CHANGELOG.md.


Please complete the checklist to ensure that all tasks are completed before marking your pull request as ready for review.

All Submissions

  • Have you ensured that all lines changed in this PR are justified by a comment found in the description ?
  • Have you updated the CHANGELOG.md ?
  • Have you linked any issues that should be closed when this PR is merged (using closing keywords) ?
  • Have you checked that the AUTHORS file is up to date ?
  • Have you checked that the copyright information in the LICENCE file is up to date (including dates) ?
  • Do you follow the conventions specified in our coding standards ?

New Feature Submissions

  • Have you added tests for the new functionalities ?
  • Have you documented the new functionalities:
    • API documentation describing the available methods, when each should be used and how to use them ?
    • User-friendly documentation in README files (which may link to the API documentation).
    • If the new functionality is non-trivial to use, provide a tutorial or example ? (optional)

Changes to Existing Features

  • Have you checked that existing tests cover all code after the changes ?
  • Have you checked that existing tests are still passing ?
  • Have you checked that the existing documentation is still accurate (API and README files) ?

Changes to the CI

  • Have you made the same changes to both the GitHub CI and the GitLab CI (for the private fork) ?

@EmilyBourne EmilyBourne marked this pull request as draft August 6, 2025 15:07
@PaulineVidal PaulineVidal marked this pull request as ready for review August 6, 2025 21:05
Copy link

github-actions bot commented Aug 6, 2025

This PR is failing tests so it has been put back into draft. Please remove the draft status when the tests pass.

@github-actions github-actions bot marked this pull request as draft August 6, 2025 21:06
@PaulineVidal PaulineVidal marked this pull request as ready for review August 6, 2025 21:07
Copy link

github-actions bot commented Aug 6, 2025

This PR is failing tests so it has been put back into draft. Please remove the draft status when the tests pass.

@github-actions github-actions bot marked this pull request as draft August 6, 2025 21:32
@PaulineVidal PaulineVidal marked this pull request as ready for review August 7, 2025 09:38
Copy link

github-actions bot commented Aug 7, 2025

This PR is failing tests so it has been put back into draft. Please remove the draft status when the tests pass.

@github-actions github-actions bot marked this pull request as draft August 7, 2025 10:03
@PaulineVidal PaulineVidal marked this pull request as ready for review August 7, 2025 10:05
Copy link

github-actions bot commented Aug 7, 2025

This PR is failing tests so it has been put back into draft. Please remove the draft status when the tests pass.

@github-actions github-actions bot marked this pull request as draft August 7, 2025 13:33
@PaulineVidal PaulineVidal marked this pull request as ready for review August 7, 2025 14:21
@PaulineVidal PaulineVidal marked this pull request as draft August 8, 2025 07:51
@PaulineVidal PaulineVidal marked this pull request as ready for review August 8, 2025 10:22
@PaulineVidal PaulineVidal temporarily deployed to GitLab GPU trigger August 8, 2025 10:22 — with GitHub Actions Inactive
"$<TARGET_FILE:Python3::Interpreter>")

# The test should take less than 15 min.
set_property(TEST "${test_name}" PROPERTY TIMEOUT 900000)
Copy link
Member

@EmilyBourne EmilyBourne Aug 8, 2025

Choose a reason for hiding this comment

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

On the CI the timings are:

Serial Debug GNU

  • TestSimulationDiocotron_PREDCORR_EULER_METHOD (582.507s)
  • TestSimulationDiocotron_EXPLICIT_PREDCORR_EULER_METHOD (409.768s)
  • TestSimulationDiocotron_IMPLICIT_PREDCORR_EULER_METHOD (314.197s)

Serial Debug Clang

  • TestSimulationDiocotron_PREDCORR_EULER_METHOD (267.755s)
  • TestSimulationDiocotron_EXPLICIT_PREDCORR_EULER_METHOD (199.956s)
  • TestSimulationDiocotron_IMPLICIT_PREDCORR_EULER_METHOD (162.804s)

Serial Release GNU

  • TestSimulationDiocotron_PREDCORR_EULER_METHOD (179.175s)
  • TestSimulationDiocotron_EXPLICIT_PREDCORR_EULER_METHOD (141.35s)
  • TestSimulationDiocotron_IMPLICIT_PREDCORR_EULER_METHOD (93.0959s)

Serial Release Clang

  • TestSimulationDiocotron_PREDCORR_EULER_METHOD (216.769s)
  • TestSimulationDiocotron_EXPLICIT_PREDCORR_EULER_METHOD (163.87s)
  • TestSimulationDiocotron_IMPLICIT_PREDCORR_EULER_METHOD (130.083s)

OpenMP Release GNU

  • TestSimulationDiocotron_PREDCORR_EULER_METHOD (245.865s)
  • TestSimulationDiocotron_EXPLICIT_PREDCORR_EULER_METHOD (202.417s)
  • TestSimulationDiocotron_IMPLICIT_PREDCORR_EULER_METHOD (149.567s)

Coverage Flags GNU

  • TestSimulationDiocotron_PREDCORR_EULER_METHOD (5687.16s)
  • TestSimulationDiocotron_EXPLICIT_PREDCORR_EULER_METHOD (3960.98s)
  • TestSimulationDiocotron_IMPLICIT_PREDCORR_EULER_METHOD (2883.25s)

Unacceptably slow

GPU

  • TestSimulationDiocotron_PREDCORR_EULER_METHOD (68.71s)
  • TestSimulationDiocotron_EXPLICIT_PREDCORR_EULER_METHOD (73.10s)
  • TestSimulationDiocotron_IMPLICIT_PREDCORR_EULER_METHOD (519.86s)

Copy link
Member

Choose a reason for hiding this comment

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

Maybe we can choose the parameters based on the CI. Run with 1 step for the coverage just to show there is a test 🤔

Copy link
Member

Choose a reason for hiding this comment

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

It is also probably sufficient to run in Release only if we can work out a clean way to do it


# The test should take less than 15 min.
set_property(TEST "${test_name}" PROPERTY TIMEOUT 900000)
set_property(TEST "${test_name}" PROPERTY COST 100)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
set_property(TEST "${test_name}" PROPERTY COST 100)
set_property(TEST "${test_name}" PROPERTY COST 100)
set_property(TEST "${test_name}" PROPERY LABEL Release_only)

Copy link
Member

Choose a reason for hiding this comment

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

This would require -L Release_only to be passed to ctest though.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe they could just be activated with an environment variable?

Copy link
Collaborator Author

@PaulineVidal PaulineVidal Aug 8, 2025

Choose a reason for hiding this comment

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

I dont know what is the best solution. The release only is better because indeed we dont need to test in debug.

Comment on lines 20 to 22
diocotron_test_executable(PREDCORR EULER_METHOD)
diocotron_test_executable(EXPLICIT_PREDCORR EULER_METHOD)
diocotron_test_executable(IMPLICIT_PREDCORR EULER_METHOD)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
diocotron_test_executable(PREDCORR EULER_METHOD)
diocotron_test_executable(EXPLICIT_PREDCORR EULER_METHOD)
diocotron_test_executable(IMPLICIT_PREDCORR EULER_METHOD)
if(defined ENV{BUILD_END_TO_END_TESTS})
diocotron_test_executable(PREDCORR EULER_METHOD)
diocotron_test_executable(EXPLICIT_PREDCORR EULER_METHOD)
diocotron_test_executable(IMPLICIT_PREDCORR EULER_METHOD)
endif()

Copy link

github-actions bot commented Aug 8, 2025

This PR is failing tests so it has been put back into draft. Please remove the draft status when the tests pass.

@github-actions github-actions bot marked this pull request as draft August 8, 2025 12:37
@PaulineVidal
Copy link
Collaborator Author

It seems that something is not working with gcov: https://github.com/gyselax/gyselalibxx/actions/runs/16828029669/job/47668971621?pr=406
(but I dont know what it is and the link they give is not working)

@EmilyBourne
Copy link
Member

It seems that something is not working with gcov: https://github.com/gyselax/gyselalibxx/actions/runs/16828029669/job/47668971621?pr=406 (but I dont know what it is and the link they give is not working)

I'm not certain but it looks like it goes through a section of code so many times (due to the large number of iterations) that it assumes that they forgot to initialise something

@EmilyBourne
Copy link
Member

Got suspicious hit value in gcov line 8691731840

means it hit this line 8691731840 times. I get the impression that it thinks that if a line of code is run 10^9 times during testing it probably means they measured it wrong.

@PaulineVidal
Copy link
Collaborator Author

Got suspicious hit value in gcov line 8691731840

means it hit this line 8691731840 times. I get the impression that it thinks that if a line of code is run 10^9 times during testing it probably means they measured it wrong.

Oh, wow it is a pretty big number 😮
And true, I dont know that kind of part of the code could be hit so many time 🤔

@EmilyBourne
Copy link
Member

Got suspicious hit value in gcov line 8691731840

means it hit this line 8691731840 times. I get the impression that it thinks that if a line of code is run 10^9 times during testing it probably means they measured it wrong.

Oh, wow it is a pretty big number 😮 And true, I dont know that kind of part of the code could be hit so many time 🤔

It is line 723 of some file. The line contains for (std::size_t j(0); j < ntheta; ++j) {' maybe spline evaluation?

@EmilyBourne
Copy link
Member

for (std::size_t j(0); j < ntheta; ++j) {

@PaulineVidal
Copy link
Collaborator Author

PaulineVidal commented Aug 8, 2025

for (std::size_t j(0); j < ntheta; ++j) {

polar_bsplines.hpp

It could be the resolution with Ginkgo? I know that to invert the matrix it iterate several times. With not a well refined gird, maybe it is more difficult to invert?

@EmilyBourne
Copy link
Member

for (std::size_t j(0); j < ntheta; ++j) {

polar_bsplines.hpp

It could be the resolution with Ginkgo?

Ginkgo can't call this function. In the Poisson solver it is used (a lot but not 10^9 a lot) for the assembly and it is used to build the RHS (NQuadPts * Nr * Ntheta * 4(cells) * 2(func and basis in weak formulation) max per call to Poisson::operator())

@EmilyBourne
Copy link
Member

for (std::size_t j(0); j < ntheta; ++j) {

polar_bsplines.hpp
It could be the resolution with Ginkgo?

Ginkgo can't call this function. In the Poisson solver it is used (a lot but not 10^9 a lot) for the assembly and it is used to build the RHS (NQuadPts * Nr * Ntheta * 4(cells) * 2(func and basis in weak formulation) max per call to Poisson::operator())

This could plausibly be ~10^6 calls so 10^9 is not out of reach if you then have 1000 time steps

@PaulineVidal
Copy link
Collaborator Author

for (std::size_t j(0); j < ntheta; ++j) {

polar_bsplines.hpp
It could be the resolution with Ginkgo?

Ginkgo can't call this function. In the Poisson solver it is used (a lot but not 10^9 a lot) for the assembly and it is used to build the RHS (NQuadPts * Nr * Ntheta * 4(cells) * 2(func and basis in weak formulation) max per call to Poisson::operator())

This could plausibly be ~10^6 calls so 10^9 is not out of reach if you then have 1000 time steps

Mmh, indeed the diocotron by default has 700 time steps. Here I reduced it to 400 times steps. But with the predcorr the operators can be call twice (prediction and then correction) or even more for the implicit predcorr!

@EmilyBourne EmilyBourne self-assigned this Aug 11, 2025
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