Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22001

How compile openacc block on AMD Radeon GPU?

$
0
0

I want to compile a code that contain a parallelizable loop in it with OpenACC. My GPU is AMD Radeon and compiler is Gcc. Code is such as below:

  Program Test   use openacc   Implicit None  integer(8)::I  !$acc parallel    !$acc loop  Do I=1,1000  Data1(I)=I  if (acc_on_device (acc_device_host))then   print*, "no GPU"  endif  enddo !$acc end  parallel

This code run with: gfortran -fopenacc -fno-automatic -s Test.f90 -o Test

This code run with no error on CPU(host device) not on the AMD GPU(target device).How can I run this parallelizable loop on target device?I think my compiler does not recognize target device.


Viewing all articles
Browse latest Browse all 22001

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>