Hi,

I need to computed the GSVD of two matrices. For doing so I used in my C code the lapack routine dggsvd. But when I source my file gsvd.R I have the following error:

Error in eval.with.vis(expr, envir, enclos) :
       BLAS/LAPACK routine 'DGGSVD' gave error code -1


Is there a problem with the parameters passed through the gsvd.R script?
Is there a problem within the C script?

I will really appreciate your help.

Thanks,


Philippe

--
Philippe Hupé
Institut Curie, CNRS UMR 144 / Service Bioinformatique
Laboratoire de Transfert (4ème étage)
26 rue d'Ulm
75005 Paris - France
        
Email :  [EMAIL PROTECTED]
Tél :    +33 (0)1 44 32 42 75
Fax :    +33 (0)1 42 34 65 28

website : http://bioinfo.curie.fr

vA <- c(1.0,  2.0,  3.0,
       3.0,  2.0,  1.0,
       4.0,  5.0,  6.0,
       7.0,  8.0,  8.0)

A <- matrix(vA,4,3, byrow=TRUE)

vB <- c(-2.0, -3.0,  3.0,
        4.0,  6.0,  5.0)


B <- matrix(vB,2,3, byrow=TRUE)

if(ncol(A)!=ncol(B))
  {
    stop("A and B matrix does not have the same column number")
  }

gsvd <- .C("GSVD",
           JOBU = as.character('U'),
           JOBV = as.character('V'),
           JOBQ = as.character('Q'),
           M = as.integer(nrow(A)),
           N = as.integer(ncol(A)),
           P = as.integer(nrow(B)),
           K = integer(1),
           L = integer(1),
           A = as.double(A),
           LDA = as.integer(nrow(A)),
           B = as.double(B),
           LDB = as.integer(nrow(B)),
           ALPHA = double(ncol(A)),
           BETA = double(ncol(A)),
           U = double(nrow(A)*nrow(A)),
           LDU = as.integer(nrow(A)),
           V = double(nrow(B)*nrow(B)),
           LDV = as.integer(nrow(B)),
           Q = double(ncol(A)*ncol(A)),
           LDQ = as.integer(ncol(A)),
           WORK = double(max(c(3*ncol(A),nrow(A),nrow(B)))+ncol(A)),
           IWORK = integer(ncol(A)),
           INFO = integer(1),
           PACKAGE="GSVD")

Attachment: GSVD_1.0.tar.gz
Description: PostScript document

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to