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

Allow GPU version to compile with OpenMP #180

Merged
merged 24 commits into from
Jan 21, 2025

Conversation

samhatfield
Copy link
Collaborator

This PR permits us to build ecTrans for GPUs using OpenMP offload. It is not even remotely working yet. Here I've just done all the work necessary to run a simple test program:

PROGRAM TEST_PROGRAM

USE PARKIND1, ONLY: JPIM

IMPLICIT NONE

INTEGER(JPIM) :: TRUNC

#include "setup_trans0.h"
#include "setup_trans.h"

CALL DR_HOOK_INIT()

CALL SETUP_TRANS0(LDMPOFF=.TRUE., KPRINTLEV=2)

TRUNC = 79

CALL SETUP_TRANS(KSMAX=TRUNC, KDGL=2 * (TRUNC + 1))

END PROGRAM TEST_PROGRAM

I plan to add support for OpenMP offload gradually such that we can eventually run the full benchmark program. This PR is the first step.

I've also taken the opportunity to tidy up SETUP_TRANS.

@samhatfield samhatfield added enhancement New feature or request gpu labels Dec 9, 2024
@samhatfield
Copy link
Collaborator Author

@wdeconinck this commit looks significant, but the changes here don't affect OpenACC functionality. I just made the minimum changes to permit OpenMP-offload compilation, so I don't think this PR needs much scrutiny. Could you approve?

@PaulMullowney
Copy link
Contributor

PaulMullowney commented Jan 16, 2025

@wdeconinck @samhatfield I have 2 PRs, to this PR, that I would like to be a part of this. I have tested both on Nvidia devices using OpenACC. Results look good. I am going to check each on AMD devices with Cray.

Copy link
Collaborator

@wdeconinck wdeconinck left a comment

Choose a reason for hiding this comment

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

Thanks! I much appreciate the effort to look into OpenMP offloading again.

@PaulMullowney
Copy link
Contributor

Thanks! I much appreciate the effort to look into OpenMP offloading again.

Of course! Happy to help.

@samhatfield samhatfield merged commit 883a28e into ecmwf-ifs:develop Jan 21, 2025
11 of 12 checks passed
@samhatfield samhatfield deleted the refresh_openmp branch January 21, 2025 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gpu
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants