CEpetra_LAPACK: "no matching function for call to Epetra_LAPACK::GGSVD" with HAVE_EPETRA_LAPACK_GSSVD3
Created by: edmondac
I'm trying to build Trilinos but get the following error:
<PATH>/trilinos-12.12.1-Source/packages/CTrilinos/src/epetra/CEpetra_LAPACK.cpp: In function ‘void Epetra_LAPACK_GGSVD_double(CT_Epetra_LAPACK_ID_t, char, char, char, i nt, int, int, int*, int*, double*, int, double*, int, double*, double*, double*, int, double*, int, double*, int, double*, int*, int*)’:
<PATH>/trilinos-12.12.1-Source/packages/CTrilinos/src/epetra/CEpetra_LAPACK.cpp:612:76: error: no matching function for call to ‘Epetra_LAPACK::GGSVD(const char&, const char&, const char&, const int&, const int&, const int&, int*&, int*&, double*&, const int&, double*&, const int&, double*&, double*&, double*&, const int&, double*&, const int&, double*&, const int&, double*&, int*&, int*&) const’
LDA, B, LDB, ALPHA, BETA, U, LDU, V, LDV, Q, LDQ, WORK, IWORK, INFO);
^
In file included from <PATH>/trilinos-12.12.1-Source/packages/CTrilinos/src/epetra/CEpetra_LAPACK_Cpp.hpp:52:0,
from <PATH>/trilinos-12.12.1-Source/packages/CTrilinos/src/epetra/CEpetra_LAPACK.cpp:50:
<PATH>/trilinos-12.12.1-Source/packages/epetra/src/Epetra_LAPACK.h:279:8: note: candidate: void Epetra_LAPACK::GGSVD(char, char, char, int, int, int, int*, int*, double *, int, double*, int, double*, double*, double*, int, double*, int, double*, int, double*, int, int*, int*) const
void GGSVD(const char JOBU, const char JOBV, const char JOBQ, const int M, const int N, const int P, int * K, int * L, double* A, const int LDA, double* B, const int LDB,
^~~~~
<PATH>/trilinos-12.12.1-Source/packages/epetra/src/Epetra_LAPACK.h:279:8: note: candidate expects 24 arguments, 23 provided
<PATH>/trilinos-12.12.1-Source/packages/epetra/src/Epetra_LAPACK.h:286:8: note: candidate: void Epetra_LAPACK::GGSVD(char, char, char, int, int, int, int*, int*, float* , int, float*, int, float*, float*, float*, int, float*, int, float*, int, float*, int, int*, int*) const
void GGSVD(const char JOBU, const char JOBV, const char JOBQ, const int M, const int N, const int P, int * K, int * L, float* A, const int LDA, float* B, const int LDB,
^~~~~
<PATH>/trilinos-12.12.1-Source/packages/epetra/src/Epetra_LAPACK.h:286:8: note: candidate expects 24 arguments, 23 provided
<PATH>/trilinos-12.12.1-Source/packages/CTrilinos/src/epetra/CEpetra_LAPACK.cpp: In function ‘void Epetra_LAPACK_GGSVD_float(CT_Epetra_LAPACK_ID_t, char, char, char, in t, int, int, int*, int*, float*, int, float*, int, float*, float*, float*, int, float*, int, float*, int, float*, int*, int*)’:
<PATH>/trilinos-12.12.1-Source/packages/CTrilinos/src/epetra/CEpetra_LAPACK.cpp:624:76: error: no matching function for call to ‘Epetra_LAPACK::GGSVD(const char&, const char&, const char&, const int&, const int&, const int&, int*&, int*&, float*&, const int&, float*&, const int&, float*&, float*&, float*&, const int&, float*&, const int&, float*&, const int&, float*&, int*&, int*&) const’
LDA, B, LDB, ALPHA, BETA, U, LDU, V, LDV, Q, LDQ, WORK, IWORK, INFO);
^
In file included from <PATH>/trilinos-12.12.1-Source/packages/CTrilinos/src/epetra/CEpetra_LAPACK_Cpp.hpp:52:0,
from <PATH>/trilinos-12.12.1-Source/packages/CTrilinos/src/epetra/CEpetra_LAPACK.cpp:50:
<PATH>/trilinos-12.12.1-Source/packages/epetra/src/Epetra_LAPACK.h:279:8: note: candidate: void Epetra_LAPACK::GGSVD(char, char, char, int, int, int, int*, int*, double *, int, double*, int, double*, double*, double*, int, double*, int, double*, int, double*, int, int*, int*) const
void GGSVD(const char JOBU, const char JOBV, const char JOBQ, const int M, const int N, const int P, int * K, int * L, double* A, const int LDA, double* B, const int LDB,
^~~~~
<PATH>/trilinos-12.12.1-Source/packages/epetra/src/Epetra_LAPACK.h:279:8: note: candidate expects 24 arguments, 23 provided
<PATH>/trilinos-12.12.1-Source/packages/epetra/src/Epetra_LAPACK.h:286:8: note: candidate: void Epetra_LAPACK::GGSVD(char, char, char, int, int, int, int*, int*, float* , int, float*, int, float*, float*, float*, int, float*, int, float*, int, float*, int, int*, int*) const
void GGSVD(const char JOBU, const char JOBV, const char JOBQ, const int M, const int N, const int P, int * K, int * L, float* A, const int LDA, float* B, const int LDB,
^~~~~
<PATH>/trilinos-12.12.1-Source/packages/epetra/src/Epetra_LAPACK.h:286:8: note: candidate expects 24 arguments, 23 provided
The problem seems to stem from packages/epetra/src/Epetra_LAPACK.cpp having been changed to add an extra argument for GSSVD3 but packages/CTrilinos/src/epetra/CEpetra_LAPACK.cpp not so:
packages/CTrilinos/src/epetra/CEpetra_LAPACK.cpp:
603 void Epetra_LAPACK_GGSVD_double (
604 CT_Epetra_LAPACK_ID_t selfID, const char JOBU, const char JOBV,
605 const char JOBQ, const int M, const int N, const int P, int * K,
606 int * L, double * A, const int LDA, double * B, const int LDB,
607 double * ALPHA, double * BETA, double * U, const int LDU,
608 double * V, const int LDV, double * Q, const int LDQ,
609 double * WORK, int * IWORK, int * INFO )
610 {
611 CEpetra::getConstLAPACK(selfID)->GGSVD(JOBU, JOBV, JOBQ, M, N, P, K, L, A,
612 LDA, B, LDB, ALPHA, BETA, U, LDU, V, LDV, Q, LDQ, WORK, IWORK, INFO);
613 }
614
615 void Epetra_LAPACK_GGSVD_float (
616 CT_Epetra_LAPACK_ID_t selfID, const char JOBU, const char JOBV,
617 const char JOBQ, const int M, const int N, const int P, int * K,
618 int * L, float * A, const int LDA, float * B, const int LDB,
619 float * ALPHA, float * BETA, float * U, const int LDU, float * V,
620 const int LDV, float * Q, const int LDQ, float * WORK,
621 int * IWORK, int * INFO )
622 {
623 CEpetra::getConstLAPACK(selfID)->GGSVD(JOBU, JOBV, JOBQ, M, N, P, K, L, A,
624 LDA, B, LDB, ALPHA, BETA, U, LDU, V, LDV, Q, LDQ, WORK, IWORK, INFO);
625 }
packages/epetra/src/Epetra_LAPACK.cpp
363 //=============================================================================
364 void Epetra_LAPACK::GGSVD(const char JOBU, const char JOBV, const char JOBQ, const int M, const int N, const int P, int * K, int * L,
365 double* A, const int LDA, double* B, const int LDB,
366 double* ALPHA, double* BETA, double* U, const int LDU, double* V, const int LDV, double* Q, const int LDQ, double* WORK,
367 #ifdef HAVE_EPETRA_LAPACK_GSSVD3
368 const int LWORK,
369 #endif
370 int* IWORK, int* INFO) const {
371 DGGSVD_F77(CHAR_MACRO(JOBU), CHAR_MACRO(JOBV), CHAR_MACRO(JOBQ), &M, &N, &P, K, L, A, &LDA, B, &LDB,
372 ALPHA, BETA, U, &LDU, V, &LDV, Q, &LDQ, WORK,
373 #ifdef HAVE_EPETRA_LAPACK_GSSVD3
374 &LWORK,
375 #endif
376 IWORK, INFO);
377 }
378
379 //=============================================================================
380 void Epetra_LAPACK::GGSVD(const char JOBU, const char JOBV, const char JOBQ, const int M, const int N, const int P, int * K, int * L,
381 float* A, const int LDA, float* B, const int LDB,
382 float* ALPHA, float* BETA, float* U, const int LDU, float* V, const int LDV, float* Q, const int LDQ, float* WORK,
383 #ifdef HAVE_EPETRA_LAPACK_GSSVD3
384 const int LWORK,
385 #endif
386 int* IWORK, int* INFO) const {
387 SGGSVD_F77(CHAR_MACRO(JOBU), CHAR_MACRO(JOBV), CHAR_MACRO(JOBQ), &M, &N, &P, K, L, A, &LDA, B, &LDB,
388 ALPHA, BETA, U, &LDU, V, &LDV, Q, &LDQ, WORK,
389 #ifdef HAVE_EPETRA_LAPACK_GSSVD3
390 &LWORK,
391 #endif
392 IWORK, INFO);
393 }
I've got a patch that builds on my system, but it wouldn't work in the opposite situation as the header doesn't use an ifdef.