PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Unexpected continuation

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
joshua_pedrick



Joined: 23 Sep 2009
Posts: 4

PostPosted: Mon Sep 28, 2009 5:02 pm    Post subject: Unexpected continuation Reply with quote

Hi, I'm getting some strange behavior with the following code. If I declare the sizes of the array dummy variables I get a segmentation fault in the first do loop where the values in ia don't seem to be copied correctly. The previous dummies were defined as follows:

Code:

        integer ia(neq+1)
        integer ja(mxstif)
        double precision a(mxstif)
        double precision b(neq)
        double precision x(neq)


So, I decided to make the type definitions of the dummy variables the same as outside the subroutine as below. Doing this leads to a segmentation fault in the !$ACC REGION directive with the following output from the debugger:

Quote:
0x4E0474: 8B 48 34 movl 52(%rax),%ecx


So, I decided to add the known array bounds and explicitly declare the various arrays as copyin, copyout and local as shown in the Staggered Leapfrog example. Doing so results in the following error messages from pgfortran:

Quote:
PGF90-S-0155-Unexpected continuation (bicgstab_a_gpu.f95: 78)
PGF90-S-0155-Unexpected continuation (bicgstab_a_gpu.f95: 79)
PGF90-S-0155-Unexpected continuation (bicgstab_a_gpu.f95: 80)
PGF90-S-0155-Unexpected continuation (bicgstab_a_gpu.f95: 81)
PGF90-S-0155-Unexpected continuation (bicgstab_a_gpu.f95: 82)
PGF90-S-0155-Unexpected continuation (bicgstab_a_gpu.f95: 83)
PGF90-S-0155-Unexpected continuation (bicgstab_a_gpu.f95: 84)
PGF90-S-0155-Unexpected continuation (bicgstab_a_gpu.f95: 85)
PGF90-S-0155-Unexpected continuation (bicgstab_a_gpu.f95: 86)
PGF90-S-0155-Unexpected continuation (bicgstab_a_gpu.f95: 87)
PGF90-S-0155-Unexpected continuation (bicgstab_a_gpu.f95: 88)
PGF90-S-0155-Unexpected continuation (bicgstab_a_gpu.f95: 89)


Which is one for every !$ACC& line I've added after !$ACC REGION

Any ideas what I might be doing incorrectly?

Code:
subroutine bicgstab_a_gpu(neq,mxstif,max_iter,errmax,ia,ja,a,b,x)
        use files_mod, only : ilog

        implicit none

        ! Dummy definitions
        integer neq
        integer mxstif
        integer max_iter
        integer, dimension(:), allocatable :: ia
        integer, dimension(:), allocatable :: ja
        double precision, dimension(:), allocatable :: a
        double precision, dimension(:), allocatable :: b
        double precision, dimension(:), allocatable :: x

        ! Locals
        double precision r(neq)
        double precision rt0(neq)
        double precision vn(neq)
        double precision tn(neq)
        double precision error,rhoold,rhonew,enorm
        double precision omega

        integer iter

        !locals for matvec loop
        integer loc1, loc2, i, j, k, ncol

        double precision, parameter :: zero    = 0.0d0
        double precision, parameter :: tolzero = 1.d-25

        double precision rmag
        double precision bmag
        double precision enumr
        double precision denom
        double precision alpha
        double precision beta
        double precision errmax
!======================
! ... initial [a]{x}
!======================
!$ACC REGION
!$ACC& LOCAL (rt0(1:neq),
!$ACC& tn(1:neq),
!$ACC& r(1:neq),
!$ACC& vn(1:neq)
!$ACC& ) COPY (
!$ACC& b(1:neq),
!$ACC& x(1:neq)
!$ACC& ) COPYIN (
!$ACC& ia(1:neq+1),
!$ACC& ja(1:mxstif),
!$ACC& a(1:mxstif)
!$ACC& )

          rmag      = 0.0d0
          bmag      = 0.0d0
          success   = .true.
          converged = .false.
          quit = .false.
          error     = errmax * 2

!$ACC DO VECTOR(32)
          do i = 1, neq
            loc1 = ia(i)
            loc2 = ia(i + 1)
            ncol = loc2 - loc1
            r(i) = 0.0d0
            do k = 1, ncol
              r(i) = r(i) + a(loc1 + k) * x(ja(loc1 + k))
            end do
          end do

!... lots more code...

!$ACC END REGION
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 5952
Location: The Portland Group Inc.

PostPosted: Tue Sep 29, 2009 8:05 am    Post subject: Reply with quote

Hi Joshua,

The "!$ACC&" if fixed form format. For free form, continuations should be added to the end of the line. For example:
Code:
!$ACC REGION   &
!$ACC LOCAL (rt0(1:neq), &
!$ACC tn(1:neq), &
!$ACC r(1:neq), &
!$ACC vn(1:neq) &
!$ACC ) COPY ( &
!$ACC b(1:neq), &
!$ACC x(1:neq) &
!$ACC ) COPYIN ( &
!$ACC ia(1:neq+1), &
!$ACC ja(1:mxstif), &
!$ACC a(1:mxstif) &
!$ACC )


Hope this helps,
Mat
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group