Can't terminate programs built for OpenMP-Offloading using Ctrl-C.
CPU: Intel Xeon E3-1505m v6
GPU: Intel HD Graphics P630
OS: Windows 10 Pro 20H2 and Ubuntu 20.04 and Ubuntu 20.10
- Windows: Intel OneAPI HPC Toolkit / Intel Fortran Compiler 2021.1 (ifx)
- Ubuntu: intel-oneapi-compiler-fortran from intel apt repositories.
GPU driver version:
- Windows: 126.96.36.19930
- Ubuntu: preinstalled + intel-opencl-icd
In which environment you are getting this issue? Are you are using OpenMP offload on Windows or Ubuntu?
Also, try to set LIBOMPTARGET_PLUGIN=LEVEL0 before running executable if you are on Windows, or try to export LIBOMPTARGET_PLUGIN=LEVEL0 before running executable if you are using Ubuntu.
If you still face any issues while using OpenMP offload do let us know and send us a small reproducer so that we will get more insight into your issues.
As you have mentioned in another post openmp-offloading with LEVEL0 plugin doesn't run on Windows.
The same applies for Ubuntu with packages installed from default repositories.
This is a reproducer.
program main implicit none integer, parameter :: sp = selected_real_kind(6,37) integer :: i, j, k integer :: n character(len=5) :: var real(sp), allocatable :: a(:,:), b(:,:), c(:,:), cc(:,:) integer :: t1, t2, t3 real(sp) :: tic ! call get_command_argument( 1, var ) read( var, '(i5.3)') n print*, n ! allocate( a(n,n), b(n,n), c(n,n), cc(n,n) ) call random_number(a) call random_number(b) c = 0._sp ! call system_clock(t1, tic) cc = 0._sp do j = 1, n do k = 1, n do i = 1, n cc(i,j) = a(i,k)*b(k,j) + cc(i,j) end do end do end do call system_clock( t2 ) print*, "T1 = ", (t2-t1)/tic !$omp target teams distribute parallel do collapse(3) map( to:a,b) map( tofrom:c ) do j = 1, n do k = 1, n do i = 1, n c(i,j) = a(i,k)*b(k,j) + c(i,j) end do end do end do call system_clock(t3) print*, "T2 = ", (t3-t2)/tic ! print*, "Max(|C2-C1|) = ", maxval( abs(cc-c) ) ! end program main
After building using "ifx /Qiopenmp /Qopenmp-targets=spir64 matmul.f90", and running ".\matmul.exe 1024". it doesn't terminate while it's running when I press "Ctrl-C".
This OpenMP offload issue with level-zero is with both Windows as well as Linux, whereas if you tried the above workaround your code will work run on Intel GPU.
Please let us know if you have any other issues and also give us confirmation if this issue is resolved.