This is a followup question on my previous post: undefined reference to `__pgi_cu_init'... linking error
From the compiling info, the CFD program I am testing has a lot of subroutine calls. Based on similar previous posts on this topic, the latest PGI accelerator does not support subroutine calls. The subroutines have to be manually inlined so the accelerator can convert the codes. Is this true for the latest version (I think is 10.9)? If yes, is there any way to go around it?
Thanks!
Shawn
Hi Shawn,
Is this true for the latest version (I think is 10.9)?
Yes. However, we understand that this is a major limitation of the model and are actively searching a solution. Changes in the Fermi architecture make it at least possible, although very difficult, to support calling.
If yes, is there any way to go around it?
Have you tried having the compiler inline your routines? While not perfect, “-Minline” can auto-inline routines found in the same source file. For whole program inlining, you can try using “-Mipa=inline” or first create and extract library (-Mextract) which can then be used by -Minline. See Chapter 4 of the PGI User’s Guide for more details. PGI Documentation Archive for Versions Prior to 17.7