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

Improve error handling for GPU code path unimplemented features #193

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

wdeconinck
Copy link
Collaborator

All following changes are required to more gracefully integrate ectrans GPU code paths in atlas via transi.

  • Workaround to avoid some unimplemented gpu-code path features:

    • SETUP_TRANS(LDSPSETUPONLY=.TRUE.)
    • SETUP_TRANS(LDGRIDONLY=.TRUE.)

    The workarounds consists in ignoring the "ONLY" setup and setting everything up with a low truncation or grid resolution. Not ideal but a sufficient temporary solution.
    This avoids special handling in downstream code like Atlas that would otherwise perform the same tricks.

  • Calling of ABORT_TRANS for other unimplemented gpu-code path features:

    • VORDIV_TO_UV
    • SETUP_TRANS(LDLL=.TRUE.)

    Now we don't get obscure errors or segfaults in lower-level code paths

  • Unsupported known gpu code paths called from within transi are now protected explicitly with error return codes rather than hard failures that cannot be recovered from. These error return codes should be removed as features are implemented of course:
    - trans_vordiv_to_UV
    - trans_dirtrans_adj
    - trans_invtrans_adj
    - trans_setup with llatlon=true

    This now means that atlas unit-tests can choose to ignore unimplemented features via exception handling

@wdeconinck wdeconinck force-pushed the feature/error_handling branch from cce2be1 to 76eb4a2 Compare December 19, 2024 16:00
Comment on lines +293 to +298
R%NDGL = NPROC
! Make even and positive
IF (MOD(R%NDGL,2) /= 0) THEN
R%NDGL = NPROC+1
ENDIF
R%NDGL = MAX(2,R%NDGL)
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's the purpose of this block?

Comment on lines +388 to +389
R%NSMAX=1
R%NTMAX = R%NSMAX
Copy link
Collaborator

Choose a reason for hiding this comment

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

Likewise, what are these two lines for?

Copy link
Collaborator

@samhatfield samhatfield left a comment

Choose a reason for hiding this comment

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

Approved pending questions above.

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