|
| View previous topic :: View next topic |
| Author |
Message |
Alexey A. Romanenko
Joined: 17 Feb 2012 Posts: 31
|
Posted: Wed Feb 27, 2013 3:37 am Post subject: restriction on inlined function |
|
|
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 |
|
 |
mkcolg
Joined: 30 Jun 2004 Posts: 4996 Location: The Portland Group Inc.
|
Posted: Wed Feb 27, 2013 10:42 am Post subject: |
|
|
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 |
|
 |
Alexey A. Romanenko
Joined: 17 Feb 2012 Posts: 31
|
Posted: Wed Feb 27, 2013 11:47 pm Post subject: |
|
|
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 |
|
 |
mkcolg
Joined: 30 Jun 2004 Posts: 4996 Location: The Portland Group Inc.
|
Posted: Thu Feb 28, 2013 11:40 am Post subject: |
|
|
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 |
|
 |
|
|
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 © 2001, 2002 phpBB Group
|