PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Strange run-time error: variable data clause is partially...

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



Joined: 14 May 2012
Posts: 8

PostPosted: Mon Aug 06, 2012 8:44 am    Post subject: Strange run-time error: variable data clause is partially... Reply with quote

Hi all,
I'm using PGI 12.6 and OpenACC.
I have a strange run-time error message with immediate stop of the program:
"FATAL ERROR: variable data clause is partially present on the GPU: name=xxx"
where xxx is an allocatable array which I have allocated on the CPU and on the GPU with a data create directive.
I don't understand what "partially" means and how I can avoid the errror.
Thanks
Tiziano
Back to top
View user's profile
mkcolg



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

PostPosted: Mon Aug 06, 2012 11:06 am    Post subject: Reply with quote

Hi Tiziano,

The "present" data directive does a run time look-up for the device copy of the variable. This allows for various pointers and sub-arrays to point into the same device memory. The "partially present" error means that variable that is being looked-up is larger than the device copy of the variable.

Can you post the create and present clauses you are using as well as how the variable is declared and allocated?

- Mat
Back to top
View user's profile
Tiziano



Joined: 14 May 2012
Posts: 8

PostPosted: Tue Aug 07, 2012 9:13 am    Post subject: Reply with quote

Hi again,
I solved the problem.
Schematically the code I was working on, was like this:
- allocate arrays on the CPU (they all are declared as fortran allocatable arrays, and they are declared in a module)
- !$acc data present_or_create(arrays just allocated so the size is known)
- loop with many routines using the arrays with present_or_copy
- deallocate all on the CPU
- !$acc end data
This is a routine itself and for the moment (to be optimized) the allocation and deallocation is performed every time, so everything starts again from the beginning.
The problem lied in the last 2 phases, switching them solved the problem, I guess ending the data region after deallocating on the CPU is confusing for the compiler, probably not a good practice anyway.
Best regards
Tiziano
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