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

Bugfix: Cray logical derived type member values #173

Merged

Conversation

scrasmussen
Copy link
Member

TYPE: bug fix

KEYWORDS: derived types, logical types, hack

SOURCE: Soren Rasmussen, NCAR

DESCRIPTION OF CHANGES: If using the Cray compiler, turn off optimization when compiling the options_obj.f90 file.

TESTS CONDUCTED: Add the following lines to line 1930 of options_obj.f90.

        print*, "use_simple_sw, options%rad_options%use_simple_sw, rad_options%use_simple_sw"
        print*, use_simple_sw, options%rad_options%use_simple_sw, rad_options%use_simple_sw
stop "debugging"

NOTE: The -eo compiler option lists all the optimization flags. Since -O0 works and -O1 does not, I could test each flag that is different individually to find which one is breaking this test. Might be worth it in case the optimization would break things somewhere else. I had previously tried to create a simple reproducer but have been unsuccessful since this issue probably has to do with the complexity of derived types/modules/submodules being used. But it might be worth it to try to create one to add to the CTests (this is a branch that has CTests but is waiting for good ones before it becomes a PR).

Checklist

Merging the PR depends on following checklist being completed. Add X between
each of the square brackets if they are completed in the PR itself. If a
bullet is not relevant to you, please comment on why below the bullet.

  • Closes issue #xxxx (An issue must exist or be created to be closed. The
    issue describes and documents the problem and general solution, the PR
    describes the technical details of the solution.)
  • Tests added (unit tests and/or regression/integration tests)
  • Backwards compatible
  • Requires new files? If so, how to generate them.
  • Fully documented

…ogical members that leads to incorrect values when ICAR is setting logical values after reading from namelists. Turning optimization off for the options_obs.F90 will fix this issue.
@gutmann gutmann merged commit 63e3564 into NCAR:develop Nov 28, 2023
1 check passed
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.

2 participants