-
Notifications
You must be signed in to change notification settings - Fork 62
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
[WIP] Please ignore this! An alternate fix to class(*) issues with FMS 2022-01 #68
[WIP] Please ignore this! An alternate fix to class(*) issues with FMS 2022-01 #68
Conversation
- This update is an alternate to PR#66 to fix the issues with passing read arguments to subroutines receiving class(*) - This tries to show that there are no inherent issues with passing a real and receiving it as class(*). Rather the root cause of the issues is some of these arguments are optional and are being passed to FMS even thought they are not present! Then they are trapped in FMS diag_manager inside a SELECT TYPE statement and the compiler is not smart enough to know that they are absent and bombs.
Codecov Report
@@ Coverage Diff @@
## dev/gfdl #68 +/- ##
============================================
+ Coverage 28.82% 29.04% +0.21%
============================================
Files 242 244 +2
Lines 71495 71928 +433
============================================
+ Hits 20612 20893 +281
- Misses 50883 51035 +152
Continue to review full report at Codecov.
|
@nikizadehgfdl I tested the current Is this a runtime error? Do I need to use a more complicated test, e.g. the production regression suite? Or a different FMS build? (Forgot to add: I used GCC 11.2, have not yet tried Intel Fortran) |
@marshallward @nikizadehgfdl Thanks for this information, we will do corresponding testing in UFS. |
@marshallward, this is to avoid runtime errors and you need tests that have extensive diag_table, like OMIP,CM, ESM. If diag_table has no diagnostics that require mask or weight you won't run into any problem. |
- This update is an alternate to PR#66 to fix the issues with passing read arguments to subroutines receiving class(*) - This tries to show that there are no inherent issues with passing a real and receiving it as class(*). Rather the root cause of the issues is some of these arguments are optional and are being passed to FMS even thought they are not present! Then they are trapped in FMS diag_manager inside a SELECT TYPE statement and the compiler is not smart enough to know that they are absent and bombs. - Added the same fix for infra/FMS2
- This update is an alternate to PR#66 to fix the issues with passing read arguments to subroutines receiving class(*) - This tries to show that there are no inherent issues with passing a real and receiving it as class(*). Rather the root cause of the issues is some of these arguments are optional and are being passed to FMS even thought they are not present! Then they are trapped in FMS diag_manager inside a SELECT TYPE statement and the compiler is not smart enough to know that they are absent and bombs. - Added the same fix for infra/FMS2 - Fixed trailing spaces
@jiandewang I updated infra/FMS2 the same way. My tests passed with FMS2022.01-beta1 (mixed-mode tag of FMS). |
- This update is an alternate to PR#66 to fix the issues with passing read arguments to subroutines receiving class(*) - This tries to show that there are no inherent issues with passing a real and receiving it as class(*). Rather the root cause of the issues is some of these arguments are optional and are being passed to FMS even thought they are not present! Then they are trapped in FMS diag_manager inside a SELECT TYPE statement and the compiler is not smart enough to know that they are absent and bombs. - Added the same fix for infra/FMS2 - Fixed trailing spaces
@jiandewang |
@nikizadehgfdl thanks for the heads up and sorry for my late reply as I was out of town in the past week. We will do more testing and get back to you and Marshall. |
@jiandewang |
@MinsukJi-NOAA can you provide information on which version of FMS library code being used in your test ? |
FMS2 is being used. See here |
- This update is an alternate to PR#66 to fix the issues with passing read arguments to subroutines receiving class(*) - This tries to show that there are no inherent issues with passing a real and receiving it as class(*). Rather the root cause of the issues is some of these arguments are optional and are being passed to FMS even thought they are not present! Then they are trapped in FMS diag_manager inside a SELECT TYPE statement and the compiler is not smart enough to know that they are absent and bombs. - Added the same fix for infra/FMS2 - Fixed trailing spaces and extra long lines
This PR will be sent directly to EMC, which is actively testing the FMS mixed precision support. We will eventually take this in via mom-ocean/MOM6 after EMC submits a PR in the future. |
- GNU executable crashes on send_data3d because it cannot handle optional input arguments that are declared as class(*) inside the callee interface, in this case rmask inside diag_manager::send_data_3d Such optional arguments have to be checked for and passed explicitly to send_data_3d - This is similar to the issue in NOAA-GFDL#68
read arguments to subroutines receiving class(*)
real and receiving it as class(*).
Rather the root cause of the issues is some of these arguments are
optional and are being passed to FMS even thought they are not present!
Then they are trapped in FMS diag_manager inside a SELECT TYPE statement
and the compiler is not smart enough to know that they are absent and bombs.