Hook errors to pFUnit exception system#2233
Open
timofeymukha wants to merge 17 commits intoExtremeFLOW:developfrom
Open
Hook errors to pFUnit exception system#2233timofeymukha wants to merge 17 commits intoExtremeFLOW:developfrom
timofeymukha wants to merge 17 commits intoExtremeFLOW:developfrom
Conversation
Collaborator
|
Could one not add an error function overload similar to error plain and error message? That way we do not need to introduce a new file system? |
njansson
approved these changes
Dec 16, 2025
Collaborator
Author
|
Not sure what happened to the ARM runs... I am trying to move the default throw routines to utils.f90, maybe default initialization to a submodule routine is flaky... |
Collaborator
It seems like it stops when error boom is thrown. FAIL: errors/errors_test
========================
ERROR STOP
Error termination. Backtrace:
#0 0xffebb964d44b in ???
#1 0xffebb964e277 in ???
#2 0xffebb964fa17 in ???
#3 0xaac59507e437 in __utils_MOD_default_throw_error
at common/utils.f90:131
#4 0xaac59507c373 in ???
#5 0xaac59508b887 in __pf_testmethod_MOD_runmethod
at /home/runner/work/neko/tmp/pfunit-v4.15.0-Ubuntu-24.04.3-LTS-ARM64-gfortran-14/src/funit/core/TestMethod.F90:89
#6 0xaac5950b8b0b in __pf_testcase_MOD_runbare
at /home/runner/work/neko/tmp/pfunit-v4.15.0-Ubuntu-24.04.3-LTS-ARM64-gfortran-14/src/funit/core/TestCase.F90:136
#7 0xaac5950b8abb in __pf_testcase_MOD_runbare_surrogate
at /home/runner/work/neko/tmp/pfunit-v4.15.0-Ubuntu-24.04.3-LTS-ARM64-gfortran-14/src/funit/core/TestCase.F90:146
#8 0xaac5950d4423 in __pf_testresult_MOD_run
at /home/runner/work/neko/tmp/pfunit-v4.15.0-Ubuntu-24.04.3-LTS-ARM64-gfortran-14/src/funit/core/TestResult.F90:237
#9 0xaac5950b8c67 in inner_run
at /home/runner/work/neko/tmp/pfunit-v4.15.0-Ubuntu-24.04.3-LTS-ARM64-gfortran-14/src/funit/core/TestCase.F90:121
#10 0xaac5950b8d17 in __pf_testcase_MOD_run
at /home/runner/work/neko/tmp/pfunit-v4.15.0-Ubuntu-24.04.3-LTS-ARM64-gfortran-14/src/funit/core/TestCase.F90:108
#11 0xaac59508e3b3 in __pf_testsuite_MOD_run
at /home/runner/work/neko/tmp/pfunit-v4.15.0-Ubuntu-24.04.3-LTS-ARM64-gfortran-14/src/funit/core/TestSuite.F90:109
#12 0xaac59508e3b3 in __pf_testsuite_MOD_run
at /home/runner/work/neko/tmp/pfunit-v4.15.0-Ubuntu-24.04.3-LTS-ARM64-gfortran-14/src/funit/core/TestSuite.F90:109
#13 0xaac5950d6e6f in __pf_testrunner_MOD_runwithresult
at /home/runner/work/neko/tmp/pfunit-v4.15.0-Ubuntu-24.04.3-LTS-ARM64-gfortran-14/src/funit/core/TestRunner.F90:139
#14 0xaac5950dad03 in __pf_testrunner_MOD_run
at /home/runner/work/neko/tmp/pfunit-v4.15.0-Ubuntu-24.04.3-LTS-ARM64-gfortran-14/src/funit/core/TestRunner.F90:117
#15 0xaac595098feb in __funit_MOD_generic_run
at /home/runner/work/neko/tmp/pfunit-v4.15.0-Ubuntu-24.04.3-LTS-ARM64-gfortran-14/src/funit/FUnit.F90:123
#16 0xaac59509f1f3 in __funit_MOD_run
at /home/runner/work/neko/tmp/pfunit-v4.15.0-Ubuntu-24.04.3-LTS-ARM64-gfortran-14/src/funit/FUnit.F90:33
#17 0xaac59509f25b in funit_main_
at /home/runner/work/neko/tmp/pfunit-v4.15.0-Ubuntu-24.04.3-LTS-ARM64-gfortran-14/src/funit/funit_main.F90:16
#18 0xaac59507bfb7 in ???
#19 0xaac59507bff7 in ???
#20 0xffebb94584c3 in ???
#21 0xffebb9458597 in ???
#22 0xaac59507ba6f in ???
#23 0xffffffffffffffff in ???
*** ERROR: boom ***
.FAIL errors/errors_test (exit status: 1) |
Collaborator
Author
|
OK, it seems this just doesn't work properly on ARM, I have no idea why at this point. I have even added an explicit call to redirect in a @before routine, which should not even be needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds errors.f90, which for now just contains a copy of our errors from utils.f90, but they are hooked up to the system pfunit uses
for exceptions.
Basically, there is subroutine pointer, that by default points:
error stopFor unit tests, there is a module error_redirection.f90 added, which switches the pointers to a routine that registers a pfunit exception. This way one can do tests like
to make sure we are raising an error. In reality, it is some object that is tested that calls neko_error of course.
A separate question is whether to actually move errors and warnings out to their own module, or to add stuff to utils.f90. I feel like if we add more error later, it would be nice with a separate module.
The
seems to be the only way to get thigns to comple.
Bonus: added a CHANGELOG.md