Add threading test to capgen_test; codee format test/capgen_test/*.F90 - #722
Conversation
a9e77fa to
a76f82c
Compare
capgen_test; codee format test/capgen_test/*.F90
dustinswales
left a comment
There was a problem hiding this comment.
Thanks for adding these features.
I like how extensible the ctest was in this case!
|
hi @climbfuji i'm working through this now, but thought I'd mention that I ran the unit tests on derecho and found that the new thread tests fail (answer differences) with ifx (but pass with ifort). Not sure if this is critical. If we determine that we'll proceed without fixing that now, I will make an issue. |
|
@peverwhee That's interesting. I thought I had tested on my laptop with |
I figured that I tested with gcc on my laptop earlier. I can reproduce your error with oneapi@2025.3.0. The results are identical between omp1 and omp2 with oneapi@2025.3.0, but what is concerning is that the values are vastly different between gfortran and ifx - not just a bit. I will need to investigate what is going on here. |
Thanks for the update, @climbfuji If it helps, it also fails with oneapi@2025.2.1. Let me know if you want a second pair of eyes. Since we haven't extensively tested the generated caps with ifx, it could be something somewhat unrelated to threading that's popping up |
I am fairly certain that it's something else. Let me dig a little more later, maybe it has to do with the flags, uninitialized data, ... |
3a38b76 to
419a6c2
Compare
|
@peverwhee Indeed, I found an uninitialized variable ( The bug fix is in commit 419a6c2 |
peverwhee
left a comment
There was a problem hiding this comment.
thanks @climbfuji ! tests pass for me with both ifx and gnu on derecho.
I do have a couple of codee questions.
…st.F90 and test/capgen_test/temp_calc_adjust.F90 to test Fortran parser; try to prevent Codee from formatting these blocks
|
@peverwhee Any chance you can re-review this, please? |
peverwhee
left a comment
There was a problem hiding this comment.
thanks for looking into the Codee stuff - good to know that it can be turned off pretty easily.
|
@mkavulich I think this can be merged, it's got 2 approvals and it's been out there for three weeks. |
mkavulich
left a comment
There was a problem hiding this comment.
Procedural approval for NEPTUNE contingent
….F90` (NCAR#722) 1. Add threading test to `capgen_test`. This is exercised with `ctest` without any further changes, and it passes. I added a comparison of all averages to the `compare_data` call, which compares the `omp1` and `omp2` test runs. This is commit NCAR@900069b. While testing this, @peverwhee and I uncovered a bug (uninitialized variable, see NCAR#722 (comment)) that I had to fix. 2. Update Codee to 2025.4.8 and simplify `.github/workflows/fortran-formatting.yaml` (there was an actual error using the workflow that needed to be fixed). This is commit NCAR@a76f82c 3. Codee format `test/capgen_test/*.F90`. This is commit NCAR@24223ff User interface changes?: No Issues: Working toward NCAR#721 Testing: all pass test removed: n/a unit tests: n/a system tests: existing capgen test now run with `OMP_NUM_THREADS=1` and `OMP_NUM_THREADS=2` manual testing: tested manually on my dev machine with spack-stack-2.1.0
capgen_test. This is exercised withctestwithout any further changes, and it passes. I added a comparison of all averages to thecompare_datacall, which compares theomp1andomp2test runs. This is commit 900069b. While testing this, @peverwhee and I uncovered a bug (uninitialized variable, see Add threading test tocapgen_test; codee formattest/capgen_test/*.F90#722 (comment)) that I had to fix..github/workflows/fortran-formatting.yaml(there was an actual error using the workflow that needed to be fixed). This is commit a76f82ctest/capgen_test/*.F90. This is commit 24223ffUser interface changes?: No
Issues: Working toward #721
Testing: all pass
test removed: n/a
unit tests: n/a
system tests: existing capgen test now run with
OMP_NUM_THREADS=1andOMP_NUM_THREADS=2manual testing: tested manually on my dev machine with spack-stack-2.1.0