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

Add simple test to verify OpenMP offload #607

Merged
merged 1 commit into from
May 27, 2022

Conversation

jeanlucf22
Copy link
Collaborator

Verify simple OpenMP loop running on device,
to check OpenMP offload working

Verify simple OpenMP loop running on device,
to check OpenMP offload working
@jmohdyusof
Copy link
Collaborator

I am not sure this is doing what you think it is. From the OpenMP 5.2 spec document:

18.7.6 omp_is_initial_device
Summary
The omp_is_initial_device routine returns true if the current task is executing on the host device; otherwise, it returns false.

I assume we want the code to be executing on the target device if offload is true?

@jeanlucf22
Copy link
Collaborator Author

I am not sure this is doing what you think it is. From the OpenMP 5.2 spec document:

18.7.6 omp_is_initial_device Summary The omp_is_initial_device routine returns true if the current task is executing on the host device; otherwise, it returns false.

I assume we want the code to be executing on the target device if offload is true?

0 = false. So if running on GPU, value will be 0 and test will pass

@jmohdyusof
Copy link
Collaborator

OK, I guess I was confused because for C usually exiting with 0 = success. So long as it is used correctly, I guess it is fine

@nicolasbock
Copy link
Collaborator

I cannot test whether this works but the code looks good.

@nicolasbock nicolasbock merged commit 6bd7275 into lanl:master May 27, 2022
@jeanlucf22 jeanlucf22 deleted the test_ompt branch January 20, 2023 21:01
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