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

Testing OpenMP GPU offload with Intel OneAPI compilers #194

Open
RobertPincus opened this issue Dec 14, 2022 · 3 comments
Open

Testing OpenMP GPU offload with Intel OneAPI compilers #194

RobertPincus opened this issue Dec 14, 2022 · 3 comments

Comments

@RobertPincus
Copy link
Member

@naromero77 from Intel had some suggestions via email for using the Intel OneAPI compilers to check aspects of the implement of the OpenMP offload.

I recently had some ideas that may help you continue OpenMP offload development and possibly do CI. With the Intel oneAPI compilers, you can do the following:

  1. Test OpenMP offload with the target being the CPU instead of the GPU:
    ifx -c -fiopenmp -fopenmp-target=x86_64 <files>.
    Code and should compile and run AS IS. However, you cannot detect issues with data transfers.

  2. Test OpenMP offload with the target being the GPU but OpenMP offload DISABLED at runtime
    ifx -c -fiopenmp -fopenmp-target=spir64 <files>
    You will not to set the runtime environment variable OMP_TARGET_OFFLOAD=DISABLED. Again, you cannot detect issues with data transfers.

The first method should be supported on any Intel CPU. The second method should also be supported on any Intel CPU and would be the preferred method.

@RobertPincus
Copy link
Member Author

RobertPincus commented Jan 3, 2023

Update: syntax seems to be -fopenmp-targets=.

@RobertPincus
Copy link
Member Author

@naromero77 Would these flags work in containers? What if the containers are running on e.g. AMD processors?

@RobertPincus
Copy link
Member Author

The current implementation (v1.6) causes an Internal Compiler Error using ifx.

@naromero77 suggets:

For the issue with Line 429, please try changing:
!$omp target teams distribute parallel do simd collapse(2) map(from:fluxes%flux_net)
 
To:
!$omp target teams distribute parallel do collapse(2) map(from:fluxes%flux_net)
 
If that still gives an ICE, then try:
!$omp target teams distribute parallel do map(from:fluxes%flux_net)
 
The finally, just remove that map(from:fluxes%flux_net).

which is next on my list

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

No branches or pull requests

1 participant