PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

restriction on inlined function

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
Alexey A. Romanenko



Joined: 17 Feb 2012
Posts: 31

PostPosted: Wed Feb 27, 2013 3:37 am    Post subject: restriction on inlined function Reply with quote

Hi!

Is there any restriction on function which could be inlined?

I would like to inline some routine into kernel body. I add "-Minline=foo" option to compiler, but it says
Code:

571, Accelerator region ignored
...
575, Accelerator restriction: function/procedure calls are not supported
...
601, Accelerator restriction: unsupported call to foo'


Thanks
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Feb 27, 2013 10:42 am    Post subject: Reply with quote

Hi Alexey,

Inlining is a big topic so I'll first point you to Chapter 4 of the PGI Compiler User's Guide. It does have a section on inlining restrictions.

Note "-Minfo=inline" might give you details on why a routine was not inlined. Though, this only is printed if the compiler attempted to inline the function but failed.

Also, if "foo" is not in the same source file, you will need to first create an inline library using the "-Mextract" flag (see docs for details).

Hope this helps,
Mat
Back to top
View user's profile
Alexey A. Romanenko



Joined: 17 Feb 2012
Posts: 31

PostPosted: Wed Feb 27, 2013 11:47 pm    Post subject: Reply with quote

Hi Mat!

It's help, but I still have some questions.
PGI reports that reshaping is not allowed.... but I doesn't reshape arrays

Code:
601, subprogram not inlined -- array reshaping not enabled: foo, argument 1


Code:

 519       REAL, DIMENSION(kts:kte):: &
 520                           qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, &
...
 601          call foo(qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, &
...
 752       subroutine foo (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, &
...
 758       REAL, DIMENSION(kts:kte), INTENT(INOUT):: &
 759                           qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, &
 


Any idea?
Back to top
View user's profile
mkcolg



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

PostPosted: Thu Feb 28, 2013 11:40 am    Post subject: Reply with quote

Is "kts" a variable? That would cause a reshape since the compiler can't tell the actual and dummy argument's lower bounds are the same.

You can try adding the flag "-Minline=reshape" to get the compiler to inline this routine.

- 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