On Tue, 15 Jul 2008, Edwin Sarkissian wrote:
However, some of the lapack function calls never returned.
For example, the executables that are included in the package
and are used to test the lapack library never end.
I wrote the following code (test.c)
integer m=3, n=2, nrhs=1, lda=3, ldb=3, lwork=512, info;
int result = dgels_( &trans, &m, &n, &nrhs, aa, &lda, bb,
&ldb, w, &lwork, &info );
I compiled and linked the code without any error message with the command
gcc test.c lapack_LINUX.a blas_LINUX.a F2CLIBS/libf2c.a -lm -IINCLUDE
but when I ran the executable a.out it never returned. However,
after I changed
the initialization value of lwork to -1 and compiled and ran the
it returned. The argument lwork is set to -1 when we need the lapack
function to return an optimum size for work buffer only.
1- there is a problem with this code not returning without modification
2- when you perform your modification, the optimal worspace size is in
w, not in lwork, lwork is input only so it is left unchanged in exit as
you have observed.
I followed the same steps mentioned above exactly on a
i386 architecture / linux / 64 bit platform and all executables
ran to completion without any error or problem.
Great, great, great. I do not know what the problem 1 is ...