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

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

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
!$OMP END TARGET DATA
#endif
#ifdef ACCGPU
!$ACC end data
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Suggested change
!$ACC end data
!$ACC END DATA

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.

1 participant