PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Data Region across Routines

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



Joined: 17 Jan 2013
Posts: 8

PostPosted: Wed Apr 02, 2014 9:48 am    Post subject: Data Region across Routines Reply with quote

Hi,

I have the following setup:

Code:
routine A
!$ACC data copyin(arr)
call routine B
!$ACC end data
end routine A

routine B(arr)
!$ACC parallel loop gang present(arr)
do i=1,10
    arr(i) = 1*2
end do
end routine B


The code runs without
Quote:
present(arr)
but crashes when it is included. The error message is:
FATAL ERROR: data in PRESENT clause was not found on device 1: name=arr
file:/home/karl/code/src/fun.f90 fun line:22

I realise that the present clause isn't strictly necessary but prefer to be explicit and clearly something weird is going on in this situation.

I'm running tests at the moment to ensure that arr is not being copied every time the kernel in routine B is called.

Thanks in advance,

Karl



Additional - Things seem to be working as expected without the present clause - export PGI_ACC_TIME=1 gives the following for the kernel in question:

288: data region reached 50561 times
288: data copyin reached 3 times
device time(us): total=15 max=8 min=0 avg=5
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Apr 02, 2014 10:51 am    Post subject: Reply with quote

Hi Karl,

This feature is quite mature so I suspect that the error is correct and that "arr" isn't on the device. Could routine B be called from someplace else outside of a data region? Otherwise, we'd need a reproducing example to determine what's wrong.

- Mat
Back to top
View user's profile
KarlWilkinson85254



Joined: 17 Jan 2013
Posts: 8

PostPosted: Wed Apr 02, 2014 11:06 am    Post subject: Reply with quote

Ah, remind me to use case insensitive greps in the future...

Thanks for the help!
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