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

OpenACC directives #98

Merged
merged 296 commits into from
May 28, 2024
Merged

OpenACC directives #98

merged 296 commits into from
May 28, 2024

Conversation

esclapez
Copy link
Collaborator

  • Move OpenACC porting into dev.

CasparJungbacker and others added 30 commits June 13, 2023 16:16
New namelist option in PHYSICS: lfast_thermo. Default is .false. for
the old icethermo. Set to .true. for the new version.

New idea: always use two iterations to determine ql, for better
vectorization.  When iterating, don't calculate numeric derivatives
but use Clausius-Clapeyron. Using tabulated esl and esi as in the
original icethermo, but read from a table combining them, interpolated
with ilratio.

Future optimization possibilities: don't always store esl, qvsl, qvsi,
perhaps also qsat and tmp0. Instead calculate them as needed.
Offload forces and gravity wave damping
- Allocate GPU fields in modfields.f90
- Create modgpu.f90/initgpu for updating GPU fields after startup
  routine
- Removed data directive from modadvection.f90
@CasparJungbacker
Copy link
Collaborator

Hmmm, tests are failing in modstartup.f90/readinitfiles with message:

Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

@fjansson looks like the same NetCDF/HDF5 error we saw previously in debug builds?

@fjansson
Copy link
Contributor

It looks like the crash now is in icethermo and not from HDF5 this time. That crash would happen when opening a netcdf file.

@CasparJungbacker
Copy link
Collaborator

I'm having the same issue on my local machine and Snellius. Release build works though.

@esclapez
Copy link
Collaborator Author

Okay, got it. A couple of things missing from the refactoring of the surface schemes.

@fjansson
Copy link
Contributor

One more single-precision error. Perhaps the 5.0 needs a _field_r

src/modthermodynamics.f90:842:58:

  842 |           PrDiff_min = min(PrDiff_min, presf(k) - esat_tab(thl0(i,j,k)*exnf(k) + 5.0))
      |                                                          1
Error: Type mismatch in argument ‘t’ at (1); passed REAL(8) to REAL(4)

@fjansson fjansson merged commit 2e69c31 into dev May 28, 2024
50 checks 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.

4 participants