PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Variable Partially Present on the GPU Error
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
Bones



Joined: 03 Sep 2012
Posts: 4

PostPosted: Thu Feb 14, 2013 12:41 pm    Post subject: Variable Partially Present on the GPU Error Reply with quote

Does anyone know what this error might mean?

Code:

FATAL ERROR: variable data clause is partially present on the GPU: name=a
 file:C:\test.f line:258


Where the first line here is 258:

Code:

!$acc data copyin(a(269893641:337367040), b(53978729:67473408),
!$acc&                 c(53978729:67473408),    d(53978729:67473408),
!$acc&                 e(53978729:67473408),    f(53978729:67473408),
!$acc&                 g(53978729:67473408)) copy(h(53978729:67473408))

      do  idx= 1, n

         call abc(b(53978729), c(53978729),
     $              d(53978729), e(53978729),
     $              f(53978729), g(53978729),
     $              h(53978729), i(53978729),
     $              j(53978729), a(269893641),
     $             13494680, 13494680, 1, 1)

      end do

!$acc end data


Where function "abc" calls another function that has a kernels region in it. I do this in other parts of the code with lower regions of these arrays, but it only has trouble with this one which is right at the end of the allocated length of these arrays (a is length 337,367,040 and everything else is length 67,473,408). Sorry about the large numbers.
Back to top
View user's profile
mkcolg



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

PostPosted: Thu Feb 14, 2013 2:27 pm    Post subject: Reply with quote

Hi Bones,

The data clauses use the form "variable name [ starting element : number of elements ]". So if "a" has 337,367,040 elements, you either want to use "copyin(a(0:337367040)" or "copyin(a(269893641:67473399)".

Though given the error, I'm assuming "a" is used in another data region higher up in the program (which is fine). Otherwise, if the run time were to copy this, you'd get a seg fault.

Code:

call abc(b(53978729), c(53978729),
     $              d(53978729), e(53978729),
     $              f(53978729), g(53978729),
     $              h(53978729), i(53978729),
     $              j(53978729), a(269893641),
     $             13494680, 13494680, 1, 1)
Are you just using scalars on the device? If so, you probably don't need to copy the arrays over.

- Mat
Back to top
View user's profile
Bones



Joined: 03 Sep 2012
Posts: 4

PostPosted: Fri Feb 15, 2013 7:06 am    Post subject: Reply with quote

Thanks for the help.

That explains a lot -- I was using the upper index instead of the length in the data range specifier. After I fixed this, I still ran into more problems, though; probably because this code is kind of a mess. When you were saying that I should use "copyin(a(0:337367040)", does this mean that the starting index is zero based or 1 based? That may be what's causing my other problems, but I need to clean this up a bit and look at it more carefully.

I am using "a" in previous sections because there's not enough memory on the video card to copy the whole thing at once.

The variables are declared as arrays in the "abc" subroutine with a specific size, so it's supposed to use all the data copied. It will make more sense when I label the inputs.
Back to top
View user's profile
mkcolg



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

PostPosted: Fri Feb 15, 2013 10:04 am    Post subject: Reply with quote

Quote:
does this mean that the starting index is zero based or 1 based?
My fault, I've been working on some C code, so had C on the brain. In Fortran, it's base 1.
Quote:

The variables are declared as arrays in the "abc" subroutine with a specific size, so it's supposed to use all the data copied. It will make more sense when I label the inputs.
Again, I was in C mode so was thinking that you were passing in a specific element, not Fortran pass by reference.

Sorry for the confusion,
Mat
Back to top
View user's profile
Bones



Joined: 03 Sep 2012
Posts: 4

PostPosted: Wed Feb 20, 2013 9:53 am    Post subject: Reply with quote

I switched to using the length instead of the last index, and I get a different failure. Here is the program output:

Code:

 Section-1
 Section-2
FATAL ERROR: data in PRESENT clause was not found: name=g
 file:C:\test.f  line:216


And the code for the first 2 sections (which I want to eventually move into a loop once this gets working) is here below. Line 216 is the line after print "Section-2".

Code:

print*,"Section-1"
!$acc data copyin(     a(0*sectsize+1:5*sectsize),
!$acc&                b(0*sectsize+1:sectsize),
!$acc&                c(0*sectsize+1:sectsize),
!$acc&                d(0*sectsize+1:sectsize),
!$acc&            e(0*sectsize+1:sectsize),
!$acc&             f(0*sectsize+1:sectsize),
!$acc&             g(0*sectsize+1:sectsize))
!$acc&     copy(      h(0*sectsize+1:sectsize))
      do  idx = 1, n

         call abc(g(0*sectsize+1), b(0*sectsize+1),
     $            c(0*sectsize+1), d(0*sectsize+1),
     $            e(0*sectsize+1), f(0*sectsize+1),
     $            h(0*sectsize+1), i(0*sectsize+1),
     $            j(0*sectsize+1), a(0*sectsize+1),
     $            sectsize, sectsize, 1, 1)

      end do
!$acc end data
      print*,"Section-2"
!$acc data copyin(     a(5*sectsize+1:5*sectsize),
!$acc&                b(1*sectsize+1:sectsize),
!$acc&                c(1*sectsize+1:sectsize),
!$acc&                d(1*sectsize+1:sectsize),
!$acc&                e(1*sectsize+1:sectsize),
!$acc&                f(1*sectsize+1:sectsize),
!$acc&                g(1*sectsize+1:sectsize))
!$acc&     copy(      h(1*sectsize+1:sectsize))
      do  idx = 1, n

         call abc(g(1*sectsize+1), b(1*sectsize+1),
     $            c(1*sectsize+1), d(1*sectsize+1),
     $            e(1*sectsize+1), f(1*sectsize+1),
     $            h(1*sectsize+1), i(1*sectsize+1),
     $            j(1*sectsize+1), a(5*sectsize+1),
     $            sectsize, sectsize, 1, 1)

      end do
!$acc end data
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
Goto page 1, 2  Next
Page 1 of 2

 
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