Problem with lapack

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?

Thanks

Hello,

The problem with 15 year old PGI releases running on very old RHEL systems is that we can’t recreate the user’s experience.

Commenting out the “USE xxx” statement, can be a disaster if all
the routines in lapack are prototyped(interface), and it causes an error to NOT be flagged at runtime.

You may only need to declare the 32-bit integer variable as 64-bit integer, for things to work.

I recommend you move to the future and use the free community version of PGI compilers for Linux. http://www.pgroup.com/products/community.htm to get 17.4 compilers. You will want to update to a current Linux version, since the compilers may fail to install on RHEL 2.4.

dave