We are running PGF90-5.0-2 under Red Hat Enterprise 2.4.21-27.0.2.ELsmp. I am trying to use the routine dggglm in the lapack library supplied by PGI. On the first call, the 12th calling argument can be set to -1, and the routine is supposed to give back the optimal size to make the working array in subsequent calls. This works when I use my own compiled version of the Lapack source code. However, when I comment out the USE statement in my code, and let the linker use the PGI version, after a normal compile/link, the resulting executable stops, having reported that the value supplied for the 12th argument is not valid.
I can trace that error message to a specific line in the source code I have for dggglm, and, indeed, to get that line to execute would require that the expression ( LWORK.EQ.-1 ) (lwork being the name of the 12th argument) has evaluated to .FALSE.
So, apparently, I am passing an integer (32 bit), with value -1, but the library version of dggglm is seeing some different value.
What’s going on, and how do I fix it?