improved diagnostics in clapack_dgesv replacement and bugfix in wrapper of dspsv

This commit is contained in:
2026-03-04 10:55:59 +01:00
parent dfa9369779
commit 061880fb9f
3 changed files with 29 additions and 13 deletions

View File

@@ -657,8 +657,9 @@ int clapack_dgesv(const CBLAS_ORDER Order, const int N, const int NRHS,
const FINT nrhstmp=NRHS;
const FINT ldatmp=lda;
const FINT ldbtmp=ldb;
FINT ipivtmp=*ipiv;
FORNAME(dgesv) (&ntmp,&nrhstmp,A,&ldatmp,&ipivtmp,B,&ldbtmp,&INFO);
FINT ipivtmp[N];
FORNAME(dgesv) (&ntmp,&nrhstmp,A,&ldatmp,ipivtmp,B,&ldbtmp,&INFO);
for(int i=0; i<N; ++i) ipiv[i]=ipivtmp[i];
#else
FORNAME(dgesv) (&N,&NRHS,A,&lda,ipiv,B,&ldb,&INFO);
#endif
@@ -672,6 +673,7 @@ int clapack_sgesv(const CBLAS_ORDER Order, const int N, const int NRHS,
float *A, const int lda, int *ipiv,
float *B, const int ldb)
{
std::cout <<"In my clapack_sgesv\n";
FINT INFO=0;
if(Order!=CblasRowMajor) laerror("CblasRowMajor order asserted");
//B should be in the same physical order, just transpose A in place and the LU result on output
@@ -681,8 +683,9 @@ int clapack_sgesv(const CBLAS_ORDER Order, const int N, const int NRHS,
const FINT nrhstmp=NRHS;
const FINT ldatmp=lda;
const FINT ldbtmp=ldb;
FINT ipivtmp=*ipiv;
FORNAME(sgesv) (&ntmp,&nrhstmp,A,&ldatmp,&ipivtmp,B,&ldbtmp,&INFO);
FINT ipivtmp[N];
FORNAME(sgesv) (&ntmp,&nrhstmp,A,&ldatmp,ipivtmp,B,&ldbtmp,&INFO);
for(int i=0; i<N; ++i) ipiv[i]=ipivtmp[i];
#else
FORNAME(sgesv) (&N,&NRHS,A,&lda,ipiv,B,&ldb,&INFO);
#endif