aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/btl/libs
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2011-01-28 11:24:18 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2011-01-28 11:24:18 +0100
commit1731a432e70422f608b072062c0da5454998cb46 (patch)
treeaa56ee1a4bbd6d239b60e542c00e0f891dc63407 /bench/btl/libs
parent837f1ae59c7e71a0524410271d1553b1d0e77e66 (diff)
fix BTL cholesky action and output errors if the factorization failed
Diffstat (limited to 'bench/btl/libs')
-rw-r--r--bench/btl/libs/C_BLAS/C_BLAS_interface.hh4
1 files changed, 3 insertions, 1 deletions
diff --git a/bench/btl/libs/C_BLAS/C_BLAS_interface.hh b/bench/btl/libs/C_BLAS/C_BLAS_interface.hh
index aa2021d13..5701b7b1e 100644
--- a/bench/btl/libs/C_BLAS/C_BLAS_interface.hh
+++ b/bench/btl/libs/C_BLAS/C_BLAS_interface.hh
@@ -246,12 +246,13 @@ public :
#endif
}
- static inline void cholesky(const gene_vector & X, gene_vector & C, int N){
+ static inline void cholesky(const gene_matrix & X, gene_matrix & C, int N){
int N2 = N*N;
scopy_(&N2, X, &intone, C, &intone);
char uplo = 'L';
int info = 0;
spotrf_(&uplo, &N, C, &N, &info);
+ if(info!=0) std::cerr << "spotrf_ error " << info << "\n";
}
static inline void partial_lu_decomp(const gene_matrix & X, gene_matrix & C, int N){
@@ -261,6 +262,7 @@ public :
int info = 0;
int * ipiv = (int*)alloca(sizeof(int)*N);
sgetrf_(&N, &N, C, &N, ipiv, &info);
+ if(info!=0) std::cerr << "sgetrf_ error " << info << "\n";
}
#ifdef HAS_LAPACK