LAPACK Archives

[Lapack] dggsvd_ problem

Guillermo,

The problem is that work and iwork need to be arrays, not scalars.  

The length of work should be at least max(3*N,M,P)+N and iwork should be at 
least N.  

The documentation for the routine is here:

        http://www.netlib.org/lapack/explore-html/dd/db4/dggsvd_8f.html

Cheers,

Rodney



On Jan 17, 2013, at 3:09 PM, Guillermo Bublik <Guillermo.Bublik@Domain.Removed> 
wrote:

Hello,
 
I have been trying to use the Generalized Singular Value Decomposition 
routine to no avail.    Below is a snippet of the c code:
 
extern "C" int dggsvd_(char *, char *, char *, int *, int *, int *, int *, 
int *, double *, int *, double *, int *,
                                                double *, double *, double *, 
int *, double *, int *, double *, int *, double *, int *, int *);
 
int main()
{
                double A[16] = {1., 2., 3., 4., 5., 6., 7., 8., 9., 10., 11., 
12., 13., 14., 15.};
                double B[16] = {11., 12., 13., 14., 15., 16., 17., 18., 19., 
20., 21., 22., 23., 24., 25.};
                double U[16];
                double V[16];
                double Q[16];
                double alpha[16];
                double beta[16];
                int K, L;
                double work;
                int iwork;
                int info;
 
                int n = 4, nm = 13;
 
                int res = 
dggsvd_("U","V","Q",&n,&n,&n,&K,&L,A,&n,B,&n,alpha,beta,U,&n,V,&n,Q,&n,&work,&iwork,&info);
 
                return 0;
}
 
I get an access violation when I run the code above.
 
Please advise,
 
Thank you very much,
Guillermo
 
_______________________________________________
Lapack mailing list
Lapack@Domain.Removed
http://lists.eecs.utk.edu/mailman/listinfo/lapack


<Prev in Thread] Current Thread [Next in Thread>


For additional information you may use the LAPACK/ScaLAPACK Forum.
Or one of the mailing lists, or