OpenAcc Intel Fortran Compiler

phd*_*ent 1 fortran openacc

I am trying to compile a code in Fortran using OpenAcc. So far I have been using Intel fortran which supports OpenMP, but apparently does not support OpenAcc. Can anyone suggest a free compiler that supports OpenAcc?

The exact code I am trying to run can be found on this link, but I am pasting it below as well for convenience:

program rbc
use omp_lib     ! For timing
implicit none
real, parameter :: beta = 0.984, eta = 2, alpha = 0.35, delta = 0.01, &
       rho = 0.95, sigma = 0.005, zmin=-0.0480384, zmax=0.0480384;
integer, parameter :: nz = 4, nk=4800;
real :: zgrid(nz), kgrid(nk), t_tran_z(nz,nz), tran_z(nz,nz);
real :: kmax, kmin, tol, dif, c(nk), r(nk), w(nk);
real, dimension(nz,nk) :: v=0., v0=0., ev=0., c0=0.;
integer :: i, iz, ik, cnt;
logical :: ind(nk);
real(kind=8) :: start, finish   ! For timing
real :: tmpmax, c1  

   !$acc region
   !$acc do parallel
    do ik = 1,nk;
       !$acc do parallel
       do iz=1,nz;        
          tmpmax = -huge(0.)
          do i = 1,nk
             c1 = c0(ik,iz) - kgrid(i)
             if(c1<0) exit
             c1 = c1**(1-eta)/(1-eta)+ev(i,iz)
             if(tmpmax<c1) tmpmax = c1
          end do
          v(ik,iz) = tmpmax
       end do
    end do
    !$acc end region
Run Code Online (Sandbox Code Playgroud)

小智 5

PGI社区版是PGI Fortran,C和C ++编译器和工具的免费版本,包括适用于Linux / x86,Linux / OpenPOWER和macOS的OpenACC,OpenMP和CUDA Fortran。看这里http://www.pgroup.com/products/community.htm