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

[WIP] Proposed fix Gnu and Pgi issue with class(*) in send_data3d #1149

Merged
merged 4 commits into from
Mar 9, 2023

Conversation

nikizadehgfdl
Copy link
Contributor

Description
Fixes gnu and pgi issue with class(*) in send_data3d

  • MOM6 gnu tests seg fault when calling send_data3d under FMS2023.01-beta2
  • These tests were passing under FMS2023.01-alpha4
  • Slight changes in send_data3d has probably tickled some bugs in the Gnu compiler
  • It is clear that both gnu and pgi have issues with optional arguments declared as class(*)
  • Rather than having component models add kludge code to avoid these
    issues (probably compiler bugs) we can limit the kludge to a minimum by
    putting them inside FMS where these already exists (in send_data_1d and
    send_data_2d interfaces).
  • We may even be able to get rid of some old kludge we put in the component models to avoid these compiler issues.
  • With this commit MOM6 tests passed under compilers Intel22, gnu11 and Nvhpc22.7 on c5

Fixes # (issue)

How Has This Been Tested?
MOM6_solo test cases with Intel, Gnu and Pgi

Checklist:

  • [ *] My code follows the style guidelines of this project
  • [ *] I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • New check tests, if applicable, are included
  • make distcheck passes

- MOM6 gnu tests seg fault when calling send_data3d under FMS2023.01-beta2
- These tests were passing under FMS2023.01-alpha4
- It is clear that gnu and pgi have issues with optional arguments declared as class(*)
- Rather than having component models add kludge code to avoid these
issues (probably compiler bugs) we can limit the kludge to a minimun by
putting them inside FMS where these  already exists (in send_data_1d and
send_data_2d interfaces).
- With this commit MOM6 tests passed under compilers Intel22, gnu11 and Nvhpc22.7 on c5
- MOM6 gnu tests seg fault when calling send_data3d under FMS2023.01-beta2
- These tests were passing under FMS2023.01-alpha4
- Slight changes in send_data3d has probably tickled some bugs in the Gnu compiler
- It is clear that gnu and pgi both have issues with optional arguments declared as class(*)
- Rather than having component models add kludge code to avoid these
  issues (probably compiler bugs) we can limit the kludge to a minimun by
  putting them inside FMS where these already exists (in send_data_1d and send_data_2d interfaces).
- With this commit MOM6 tests passed under compilers Intel22, gnu11 and Nvhpc22.7 on c5
@thomas-robinson
Copy link
Member

@nikizadehgfdl it looks like you have a line that's too long

- MOM6 gnu tests seg fault when calling send_data3d under FMS2023.01-beta2
- These tests were passing under FMS2023.01-alpha4
- Slight changes in send_data3d has probably tickled some bugs in the Gnu compiler
- It is clear that gnu and pgi both have issues with optional arguments declared as class(*)
- Rather than having component models add kludge code to avoid these
  issues (probably compiler bugs) we can limit the kludge to a minimun by
  putting them inside FMS where these already exists (in send_data_1d and send_data_2d interfaces).
- With this commit MOM6 tests passed under compilers Intel22, gnu11 and Nvhpc22.7 on c5
- Fixed line>121chars
ngs333
ngs333 previously approved these changes Mar 9, 2023
Copy link
Contributor

@ngs333 ngs333 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@nikizadehgfdl
Copy link
Contributor Author

Please suggest a better name for the new subroutine send_data_3d_class!

- MOM6 gnu tests seg fault when calling send_data3d under FMS2023.01-beta2
- These tests were passing under FMS2023.01-alpha4
- Slight changes in send_data3d has probably tickled some bugs in the Gnu compiler
- It is clear that gnu and pgi both have issues with optional arguments declared as class(*)
- Rather than having component models add kludge code to avoid these
  issues (probably compiler bugs) we can limit the kludge to a minimun by
  putting them inside FMS where these already exists (in send_data_1d and send_data_2d interfaces).
- With this commit MOM6 tests passed under compilers Intel22, gnu11 and Nvhpc22.7 on c5
- Fixed line>121chars
@nikizadehgfdl
Copy link
Contributor Author

@thomas-robinson suggested diag_send_data. I pushed an update.

@rem1776 rem1776 merged commit 9b83c8c into NOAA-GFDL:main Mar 9, 2023
nikizadehgfdl added a commit to nikizadehgfdl/FMS that referenced this pull request Mar 10, 2023
- send_data3d is not calling diag_send_data  correctly.
- it has to check for presence of  argument "mask" and call
diag_send_data accordingly
is
rem1776 pushed a commit that referenced this pull request Mar 13, 2023
uramirez8707 added a commit to uramirez8707/FMS that referenced this pull request Apr 6, 2023
* fix - gnu and pgi issue with class(*) in send_data3d (NOAA-GFDL#1149)

* feat: extend `string` interface in `fms_string_utils_mod` (NOAA-GFDL#1142)

* fix: add omp directives for race condition in tridiagonal (NOAA-GFDL#1109)

* fix: missing if statement in PR NOAA-GFDL#1149 (NOAA-GFDL#1155)

* fix: time_manager missing changes from year to yr, month to mo, day to dy (NOAA-GFDL#1169)

* chore: update changelog and version numbers for release (NOAA-GFDL#1167)

* chore: append dev to version number post-release (NOAA-GFDL#1179)

---------

Co-authored-by: Niki Zadeh <niki.zadeh@noaa.gov>
Co-authored-by: Jesse Lentz <42011922+J-Lentz@users.noreply.github.com>
Co-authored-by: ganganoaa <121043264+ganganoaa@users.noreply.github.com>
Co-authored-by: MiKyung Lee <58964324+mlee03@users.noreply.github.com>
Co-authored-by: Ryan Mulhall <35538242+rem1776@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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