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

Matrix Multiplication Example from the "Next Chapter" 2023 Webinar

rokelley
New Contributor I
368 Views

I watched the "Next Chapter" webinar from yesterday (2/1/2023) and I really like the simple example of matrix multiplication in Fortran with OpenMP offload. When I offload to CPU, it works great. However, when I attempt to force GPU offload with

OMP_TARGET_OFFLOAD=mandatory
LIBOMPTARGET_DEVICETYPE=gpu

 

I get

 

matrix_multiply.f90:5:26: Libomptarget fatal error 1: failure of target construct while offloading is mandatory

 

(among many other messages of course)

 

My only question at this point is: should this work if the only device I have available is the Iris Xe integrated GPU from an i7-12700H?

0 Kudos
1 Solution
rokelley
New Contributor I
306 Views

Just in case anyone reads this later: yes, it apparently should work. In this case my input matrices were apparently too large (??), when I reduced the sizes to 2000x2000 it ran fine on CPU and GPU offload with OpenMP. I've been pushing the code to GitLab as I'm working on it here: https://gitlab.com/ryan.okelley/oneapi-gpu-offload-sample

View solution in original post

1 Reply
rokelley
New Contributor I
307 Views

Just in case anyone reads this later: yes, it apparently should work. In this case my input matrices were apparently too large (??), when I reduced the sizes to 2000x2000 it ran fine on CPU and GPU offload with OpenMP. I've been pushing the code to GitLab as I'm working on it here: https://gitlab.com/ryan.okelley/oneapi-gpu-offload-sample

Reply