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

Adjust tolerances, fix error in accelerator source function kernel #258

Merged
merged 6 commits into from
Jan 26, 2024

Conversation

RobertPincus
Copy link
Member

In the course of adjusting tolerances to match @skosukhin's values I uncovered a bug in the LW source function. This PR includes the bug fix and the adjusted tolerances, so more tests pass (nvfortran 23.9 is still failing with a missing pointer)

@RobertPincus
Copy link
Member Author

Also in this PR is changing the testing and example scripts to fail when individual tests fail (as in #256)

@skosukhin
Copy link
Collaborator

It looks like this makes Cray 16.0.1 happy as well.

Regarding the failing NVHPC 23.9 tests, the following quick and dirty workaround fixes the issue:

--- a/rrtmgp-frontend/mo_gas_optics_rrtmgp.F90
+++ b/rrtmgp-frontend/mo_gas_optics_rrtmgp.F90
@@ -306,12 +306,20 @@ contains
     ! Interpolate source function
     ! present status of optional argument is passed to source()
     !
+    if(present(tlev)) then
     error_msg = source(this,                               &
                        ncol, nlay, nband, ngpt,            &
                        play, plev, tlay, tsfc,             &
                        jtemp, jpress, jeta, tropo, fmajor, &
                        sources,                            &
                        tlev)
+    else
+    error_msg = source(this,                               &
+                       ncol, nlay, nband, ngpt,            &
+                       play, plev, tlay, tsfc,             &
+                       jtemp, jpress, jeta, tropo, fmajor, &
+                       sources)
+    end if
     if(present(tlev)) then
       !$acc        exit data      delete(tlev)
       !$omp target exit data map(release:tlev)

@alexeedm looks like a compiler bug after all

@RobertPincus
Copy link
Member Author

@skosukhin Ack! The failing tests made me think the change in 5ac4d0a was safe, but it was not I guess...

@RobertPincus RobertPincus merged commit 0a17084 into develop Jan 26, 2024
49 of 58 checks passed
@RobertPincus RobertPincus deleted the feature-hotfix-adjust-tolerances branch January 26, 2024 18:21
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