Skip to content
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

Error cleanup (Intel Fortran) #130

Merged
merged 1 commit into from
Mar 27, 2024

Conversation

marshallward
Copy link

This patch clears out many errors detected by Intel Fortran.

Most are false positives from stub functions which would normally be replaced in production and report unset output. These variables are now assigned dummy values in order to pacify the compiler.

The stat function in POSIX was incorrectly passing its buf object to the C stat function as intent(in), causing the compiler to believe that the contents were unset. Oddly, this was already working correctly, and perhaps warrants further investigation, but it has now been correctly set to intent(inout).

The ppoly_* variables in check_reconstruction_1d appear to have been incorrectly declared as out, when they are clearly used as in to validate the values. This has been corrected.

register_diag_field in the ice shelf diag manager was incorrectly declared and the function appeared to return nothing. Perhaps this function was not used for anything.

An IO statement in MOM_open_boundary had a syntax error; this has been fixed.

get_dataset returns a dataset_type, so some compilers expect the stub function to also return a valid dataset. Since the stub dataset_type contains no fields, any locally declared instance should be sufficient as a return value.

This patch clears out many errors detected by Intel Fortran.

Most are false positives from stub functions which would normally be
replaced in production and report unset output.  These variables are now
assigned dummy values in order to pacify the compiler.

The `stat` function in POSIX was incorrectly passing its `buf` object to
the C `stat` function as `intent(in)`, causing the compiler to believe
that the contents were unset.  Oddly, this was already working
correctly, and perhaps warrants further investigation, but it has now
been correctly set to `intent(inout)`.

The `ppoly_*` variables in `check_reconstruction_1d` appear to have been
incorrectly declared as `out`, when they are clearly used as `in` to
validate the values.  This has been corrected.

`register_diag_field` in the ice shelf diag manager was incorrectly
declared and the function appeared to return nothing.  Perhaps this
function was not used for anything.

An IO statement in MOM_open_boundary had a syntax error; this has been
fixed.

`get_dataset` returns a `dataset_type`, so some compilers expect the
stub function to also return a valid `dataset`.  Since the stub
`dataset_type` contains no fields, any locally declared instance should
be sufficient as a return value.
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 37 lines in your changes are missing coverage. Please review.

Project coverage is 37.44%. Comparing base (10521a9) to head (f10ef1b).

❗ Current head f10ef1b differs from pull request most recent head dc24883. Consider uploading reports for the commit dc24883 to get more accurate results

Files Patch % Lines
...c/external/GFDL_ocean_BGC/generic_tracer_utils.F90 0.00% 19 Missing ⚠️
...ernal/database_comms/database_client_interface.F90 0.00% 14 Missing ⚠️
src/framework/MOM_io_file.F90 0.00% 2 Missing ⚠️
src/core/MOM_open_boundary.F90 0.00% 1 Missing ⚠️
src/ice_shelf/MOM_ice_shelf_diag_mediator.F90 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           dev/emc     #130      +/-   ##
===========================================
- Coverage    37.45%   37.44%   -0.02%     
===========================================
  Files          270      270              
  Lines        79765    79800      +35     
  Branches     14833    14833              
===========================================
  Hits         29878    29878              
- Misses       44350    44385      +35     
  Partials      5537     5537              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zach1221
Copy link

@jiandewang @DeniseWorthen are you able to provide a review for this sub-component PR? UFS-WM PR 2197 could be an option to test against soon.

@jiandewang
Copy link
Collaborator

thanks for @marshallward work. It eliminated those warning now.

@zach1221
Copy link

@jiandewang testing is complete on UFS-WM PR #2202. Please merge this MOM6 PR when you're able.

@jiandewang jiandewang merged commit ab7bd14 into NOAA-EMC:dev/emc Mar 27, 2024
10 checks passed
@jiandewang
Copy link
Collaborator

just merged

@marshallward marshallward deleted the emc_fix_warn branch May 8, 2024 15:15
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.

5 participants