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

Fix interface checks #220

Closed
lukasm91 opened this issue Mar 3, 2025 · 1 comment
Closed

Fix interface checks #220

lukasm91 opened this issue Mar 3, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@lukasm91
Copy link
Collaborator

lukasm91 commented Mar 3, 2025

What happened?

In inv_trans and dir_trans, at least for the GPU, the interface checks are inconsistent.
https://github.com/ecmwf-ifs/ectrans/blob/develop/src/trans/gpu/external/inv_trans.F90

e.g. Line 464

  IF(IUBOUND(1) < NPROMA) THEN
    WRITE(NOUT,*)'INV_TRANS:FIRST DIM. OF PGP TOO SMALL/LARGE ',IUBOUND(1),NPROMA
    CALL ABORT_TRANS('INV_TRANS:FIRST DIMENSION OF PGP TOO SMALL/LARGE ')
  ENDIF

The error message (correctly) states that the first dimension should be NPROMA, and nothing else. The comparison should be /=, not <. I think we should try not to make the interface more generic than needed.

Or line 604:

    IF(IUBOUND(1) < NPROMA) THEN
      WRITE(NOUT,*)'INV_TRANS:FIRST DIM. OF PGP3B TOO SMALL/LARGE ',IUBOUND(1),NPROMA
      CALL ABORT_TRANS('INV_TRANS:FIRST DIMENSION OF PGP3B TOO SMALL/LARGE ')
    ENDIF
  ELSE

This is actually not even the intent. What should be here is IUBOUND(4) /= NGPBLKS.

I think we should make the interface checks more strict (as much as possible, as little as needed).

What are the steps to reproduce the bug?

Does not apply

Version

develop

Platform (OS and architecture)

Relevant log output

Accompanying data

No response

Organisation

No response

@lukasm91 lukasm91 added the bug Something isn't working label Mar 3, 2025
@wdeconinck
Copy link
Collaborator

This issue is addressed with merging of #222

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants