My compile:
pgf95 main.f -ta=nvidia -Minfo -Mextend -Mpreprocess
My compiling error:
PGF90-S-0000-Internal compiler error. semsmp: bad rednum 1204 (main.f: 105)
0 inform, 0 warnings, 1 severes, 0 fatal for foofunc
#ifdef _ACCEL
use accel_lib
#endif
call foofunc()
end
!===================================================================
!===================================================================
subroutine foofunc()
IMPLICIT double precision (a-h,o-z)
PARAMETER (maxiter=10000000,noutincr=100)
PARAMETER (nouter=maxiter/noutincr)
DIMENSION ca_ds(N), ca_jsr(N),c(N)
DIMENSION aJ_ryr(N)
DIMENSION aJ_efflux(N),aJ_refill(N)
DIMENSION bigC(N)
DIMENSION chiC(N),chiO(N)
DIMENSION compKm(irow_R,0:maxnklm), indexKm(irow_R,maxnklm)
DIMENSION compKp(irow_R,0:maxnklp), indexKp(irow_R,maxnklp)
double precision, dimension(irow_R):: U_Ro
double precision, dimension(N) :: ryrgate
DIMENSION isfu(N)
!local
INTEGER LSTATE,N
INTEGER I,INFO,NSKIP,SEED(LSEED),STATE(LSTATE)
double precision A,B, X(N)
double precision, dimension(N, maxnklm+maxnklp-1) :: compPdt
integer, dimension(N, maxnklm+maxnklp-1) :: indexPdt
double precision, dimension(0:maxnklm+maxnklp-1,N) :: compP
double precision :: Pdtmin
integer, dimension(N) :: flag
irow_R = 1000
Mbig=irow_R
isfu = 1
ryrgate(:) = U_Ro(isfu(:))
dt = 1d-7 ! seconds
Vstep = -10d0
time = 0d0 ! seconds
timeend = 1d0 ! seconds
compP(0,:) = +0.0
!$acc data region copyin(aKo, aK1, ryrgate, compKp, indexKp, compKm, indexKm, isfu, ca_ds, ca_jsr, compP, U_Ro),
!$acc$local(bigC, chiC, chiO, compPdt, indexPdt)
do iouter=1,nouter
do iinner=1,noutincr
Pdtmin = 0.0d0
!$acc region
do i=1, maxnklm+maxnklp-1
do j = 1,N
compPdt(j,i) = 0.0d0
indexPdt(j,i) = 0
enddo
enddo
!$acc end region
!$acc region
do i=1,N
bigc(i) = ca_ds(i)**4/ ((aKo - aK1*ca_jsr(i))**4. + ca_ds(i)**4)
chiC(i) = 1d0 + (ryrgate(i))/N_R
chiO(i) = 1d0 + (N_R-ryrgate(i))/N_R
enddo
!$acc end region
dtmax =-0.1/Pdtmin
dt = min(dtmax,1d-5)
time = time + dt
!$acc region local(flag, aJ_ryr, aJ_efflux, aJ_refill)
do i=1,N
compPdt(i, 1) = compPdt(i, 1) + 1/dt
flag(i) = 1
enddo
!$acc end region
enddo !end inner time loop
!$acc update host(ca_ds)
enddo !end outer time loop
90 continue
!$acc end data region
return
end
Q1: could someone tell me why I get the error above?
Q2: using !$acc data region directive to wrap this code
dtmax =-0.1/Pdtmin
dt = min(dtmax,1d-5)
time = time + dt
would it be executed on Accelerator while it is not enclosed by any compute region?
Thanks,
Tuan