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.