tracking down arrays that cause R_X86_64_PC32

Hello PGI Support,

I realise that the usual solution to this link error is to
use the -mcmodel=medium, and that if -Bstatic is used then the libraries should also be -mcmodel=medium.

However, I would rather find the static arrays that are causing the error
and reduce their dimensions or make them allocatable.

Is there some tool to help me identify which arrays are causing this problem?
(the code I am compiling is legacy and large >100000 lines.).

There is a further problem with inlining and -Mipa=reshape but I will post on that later.

Many thanks,


Hi Mark,

Unfortunately I don’t know of any tool that could help you with this specific issue.

Often programmers will put fixed length array sizes into parameter statements. If this is the case for your program, you could grep for “parameter” and look for larger sizes, then grep for the parameter name to see if its used to declare any arrays.

  • Mat

Hi Mat,
I thought that might be the reply. I had hoped for an RTM reference
but it looks like I am going to have to write a pre-compiler parser
script or lexical analyzer to identify and calculate the static array

Not very soon then.