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

Resolve gfortran segfault issue with vertical regridding tests #3195

Merged

Conversation

pchakraborty
Copy link
Contributor

Types of change(s)

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Trivial change (affects only documentation or cleanup)
  • Refactor (no functional changes, no api changes)

Checklist

  • Tested this change with a run of GEOSgcm
  • Ran the Unit Tests (make tests)

Description

This resolves gfortran segfault issue with running Scenarios tests vertical_regridding_2/3. The issue was caused by the type bound write overload - deactivated that in case of gfortran builds.

Related Issue

@pchakraborty pchakraborty requested a review from a team as a code owner November 27, 2024 15:26
@pchakraborty pchakraborty self-assigned this Nov 27, 2024
@pchakraborty pchakraborty added 🪲 Bug Something isn't working 0 Diff The changes in this pull request have verified to be zero-diff with the target branch. 📈 MAPL3 MAPL 3 Related Changelog Skip Skips the Changelog Enforcer labels Nov 27, 2024
Copy link
Collaborator

@tclune tclune left a comment

Choose a reason for hiding this comment

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

hmm. This is not a very robust workaround. If/when we want to do any higher-level I/O we need to add #ifndef ... there as well.

I suspect you only need to ifdef the actual generic statement in the derived type and the rest could remain in place.

It is also possible/likely that if you made the write(formatted) an F90 procedure rather than type-bound it would circumvent the compiler problem. But it may well create other issues. I've seen Intel struggle when 2 such are overloaded in the same scope.

Copy link
Collaborator

@tclune tclune left a comment

Choose a reason for hiding this comment

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

ELiminate the unneeded #ifndef ...

@pchakraborty pchakraborty merged commit 4c9ebbe into release/MAPL-v3 Dec 2, 2024
36 of 37 checks passed
@pchakraborty pchakraborty deleted the bug/pchakrab/vertical-regridding-gfortran branch December 2, 2024 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 Diff The changes in this pull request have verified to be zero-diff with the target branch. 🪲 Bug Something isn't working Changelog Skip Skips the Changelog Enforcer 📈 MAPL3 MAPL 3 Related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants