OpenACC doesn't accelerate in my computer

I have installed the PGI Community Edition Version 17.10, and

these are my computer information :
OS: Windows 10
CPU: i7-5820K 3.30GHz
Video Card: NVIDIA GeForce GTX 1060 6GB

and then i use this command to compiler and execute the example Fortran code

pgfortran -acc -fast -o OpenACC OpenACC.f90



program picalc
  implicit none
integer, parameter :: n=1000000000
integer :: i
real(kind=8) :: t,pi
real t1,t2


pi=0.0
call CPU_TIME(t1)
!$acc parallel loop
 do i=0,n-1
    t=(i+0.5)/n
    pi=pi+4.0/(1.0+t*t)
 enddo
!$acc end parallel loop
call CPU_TIME(t2)
print *,'-------Acc----------'
print *,'pi =',pi/n
print *,'time =',t2-t1



pi=0.0
call CPU_TIME(t1)
!$acc data copyout(pi)
!$acc parallel loop
 do i=0,n-1
    t=(i+0.5)/n
    pi=pi+4.0/(1.0+t*t)
 enddo
!$acc end parallel loop
!$acc end data
call CPU_TIME(t2)
print *,'-------Acc2----------'
print *,'pi =',pi/n
print *,'time =',t2-t1


pi=0.0
call CPU_TIME(t1)
!$acc kernels
 do i=0,n-1
    t=(i+0.5)/n
    pi=pi+4.0/(1.0+t*t)
 enddo
!$acc end kernels
call CPU_TIME(t2)
print *,'-------Kernels---------'
print *,'pi =',pi/n
print *,'time =',t2-t1



pi=0.0
call CPU_TIME(t1)
 do i=0,n-1
    t=(i+0.5)/n
    pi=pi+4.0/(1.0+t*t)
 enddo
call CPU_TIME(t2)
print *,'---------Normal--------'
print *,'pi =',pi/n
print *,'time =',t2-t1

end program picalc

and the results show

 -------Acc----------
 pi =    3.141592654592580
 time =    3.073000
 -------Acc2----------
 pi =    3.141592654592580
 time =    2.513000
 -------Kernels---------
 pi =    3.141592654592580
 time =    2.529000
 ---------Normal--------
 pi =    3.141592654592580
 time =    2.531000

Why OpenACC doesn’t accelerate in my computer?

Thanks.

Try adding “-ta=tesla:cc60”. By default with just “-acc”, 17.10 doesn’t target Pascal so you need to add the target accelerator flag to tell the compiler to create a binary for your GTX 1080.

Hope this helps,
Mat

Dear mkcolg

it’s working

Thank you for helping me.


 -------Acc----------
 pi =    3.141592654589228
 time =   0.4020000
 -------Acc2----------
 pi =    3.141592654589228
 time =   0.1500000
 -------Kernels---------
 pi =    3.141592654589228
 time =   0.1260000
 ---------Normal--------
 pi =    3.141592654591852
 time =    6.108000