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,
-Edward

The Lapack library that shipped with PGI Release 5.0 was version 2.0. The check for LWORK being -1 wasn’t added until Lapack version 3.0 and is why your seeing the error with PGI compiled version of the library. To use this feature, you’ll need to use your own 3.0 version of the library.

Thanks,
Mat

Is it the same with the BLAS libraries–you have V. 2.0 of the libraries, and not V. 3?

Yes. We try to keep the BLAS and Lapack version the same.

  • Mat