PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

pgf90io_fmtw_init and function inlining
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
chris.sl.lim



Joined: 11 Jan 2013
Posts: 15

PostPosted: Tue Apr 16, 2013 6:02 am    Post subject: Reply with quote

I tried to inline the first SUMFLUX call manually and it's compiling fine, but then when I try and run (without the accelerator), I get the following memory error:

Code:
0: ALLOCATE: 186097157120 bytes requested; not enough memory


Before inlining the call, I declared all the arrays that would be necessary and it compiled and ran fine. Only after inlining the code (and not declaring any extra arrays) did I get this memory error.

Any ideas?

Chris[/code]
Back to top
View user's profile
mkcolg



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

PostPosted: Tue Apr 16, 2013 11:23 am    Post subject: Reply with quote

Hi Chris,

First on the inlining problem. There's hard limit on the amount of code that can be inlined into a section of code and since you have many routines, not just sumflux, that are being inlined, you're running into this limit. If too much gets inlined, it can have a detrimental effect on performance.

Your choices here are to manually inline some of the routines, wait for the OpenACC 2.0 "routine" directive (which will allow for calling routines), or split your loop into multiple smaller loops.

For the allocation error, this looks like an uninitialized variable is being used for the size of the array. Check that you correctly changed the variables that were being used to size your automatic arrays. You might have missed changing one or forgot to declare one. You can compile with the flag "-Mdclchk" to see if missed declaring a variable.

- Mat
Back to top
View user's profile
chris.sl.lim



Joined: 11 Jan 2013
Posts: 15

PostPosted: Thu Apr 18, 2013 5:57 am    Post subject: Reply with quote

That's great, found it.

Thanks 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
Goto page Previous  1, 2, 3
Page 3 of 3

 
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