Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28632 Discussions

How to build a Numerical Model by offloading to Intel GPU

cu238
Beginner
411 Views

Numerical models means scientific models written in Fortran, such as  WRF, ROMS, POM, SWAN. Computations in numerical models should be serious and efficient. In order to minimize data transfer, most of the variables should stay in device GPU, instead of reading from or writing to CPU memory frequently.

Recently I learned that Intel oneAPI can offload OpenMP codes to Intel GPU automatically. That is cool because NVidia CUDA is way ugly to code and no model developers like it. But I can't find exact grammar on Intel websites to avoid data transfer.

On some AMD and NVidia websites, I found grammar below:

!$OMP TARGET ENTER DATA MAP (to: B,A)

They say it could make variable A and B stay in device.

I tried this grammar in Intel IFX compiler, it works. But I am not sure if it works like they say.

As a numerical model developer, all I want to do is to put all major variables to GPU side, then do computing hours and days without transferring with CPU, only write data back to CPU when outputting. 

I am quite sure that if this is achieved, Intel GPU would be the most popular in numerical modelling. CUDA would vanish here.

0 Kudos
1 Reply
Reply