-
Notifications
You must be signed in to change notification settings - Fork 42
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
Draft: Modernise OP routines #527
base: main
Are you sure you want to change the base?
Conversation
ok. this project will need lots of testing, verification, etc. it might be useful to have both old and new version so that direct comparisons can be done on the fly. |
Thanks for taking this on. Just pushed an update to |
I ended up having to tweak Interestingly, |
i'm on it, as soon as the current test suite runs finish later today i'll fire again. |
Do we run unit tests on the OP routines? It looks to me like the answer is "no" I guess because they aren't installed by default. I can try turning them on at least on this branch. I'm running the latest commit on |
https://docs.mesastar.org/en/release-r22.11.1/test_suite/1.4M_ms_op_mono.html#m-ms-op-mono it can be a stub. i run with setenv MESA_OP_MONO_DATA_PATH /Users/fxt/mesa_work/OP4STARS_1.3/mono which should activate the basic functionality being tested. |
having to delete and rebuild op_mono_cache.bin every N versions used to be an issue. not sure if it still is. i'll rebuild it as an additional test. |
By "unit tests" I mean the tests that are run when the module is built, not the runs in the test suite (which I think of as integration tests). See e.g. mesa/kap/test/src/test_kap_support.f90 Lines 54 to 64 in 04e4de4
where the op_mono test appears to be commented out.
|
yes, i understand what a unit test is. just reminding what tests we do have. |
The OP routines (
kap/private/op_*.f
) have long been suspected of bit-for-bit inconsistency, which occasionally but inconsistently manifests in theradiative_levitation
test (e.g. in72c52f2
and54c4dc0
. This PR is a medium-term project to modernise the largely F77-style source to remove these doubts and possibly even fix some bugs along the way.The first few files were quite straightforward but there's then a tangled mess of calls across various files, which means most of the rest probably have to be modernised in one pass. I tried this and got stuck, so started over, just tweaking what I could.
Some
goto
statements will require some careful restructuring to use modern flow control (cycle
,exit
, etc).This also doesn't all have to be done in one PR. If there are substantial stumbling blocks, we can raise issues for those and merge everything else we manage to modernise.