diff --git a/source/module_hsolver/genelpa/blas.h b/source/module_hsolver/genelpa/blas.h deleted file mode 100644 index 90266a702d..0000000000 --- a/source/module_hsolver/genelpa/blas.h +++ /dev/null @@ -1,27 +0,0 @@ -#pragma once -//blas -void dcopy_(const int *n, const double *x, const int *incx, double *y, const int *incy); -void zcopy_(const int *n, const double _Complex *x, const int *incx, double _Complex *y, const int *incy); -void dgemm_(const char *transa, const char *transb, const int *m, const int *n, const int *k, - const double *alpha, double *a, const int *lda, - double *b, const int *ldb, - const double *beta, double *c, const int *ldc); -void dsymm_(char *side, char *uplo, int *m, int *n, - const double *alpha, double *a, int *lda, - double *b, int *ldb, - const double *beta, double *c, int *ldc); -void dtrsm_(char *side, char *uplo, char *transa, char *diag, int *m, int *n, - const double *alpha, double *a, int *lda, - double *b, int *ldb); -//void zcopy_(int *n, double _Complex *x, int *incx, double _Complex *y, int *incy); -void zgemm_(const char *transa, const char *transb, const int *m, const int *n, const int *k, - const double _Complex *alpha, double _Complex *a, const int *lda, - double _Complex *b, const int *ldb, - const double _Complex *beta, double _Complex *c, const int *ldc); -void zsymm_(char *side, char *uplo, int *m, int *n, - const double _Complex *alpha, double _Complex *a, int *lda, - double _Complex *b, int *ldb, - const double _Complex *beta, double _Complex *c, int *ldc); -void ztrsm_(char *side, char *uplo, char *transa, char *diag, int *m, int *n, - double _Complex *alpha, double _Complex *a, int *lda, - double _Complex *b, int *ldb); \ No newline at end of file diff --git a/source/module_hsolver/genelpa/elpa_new_complex.cpp b/source/module_hsolver/genelpa/elpa_new_complex.cpp index 7c4e94b922..044cfbe6fd 100644 --- a/source/module_hsolver/genelpa/elpa_new_complex.cpp +++ b/source/module_hsolver/genelpa/elpa_new_complex.cpp @@ -12,6 +12,9 @@ #include "module_base/scalapack_connector.h" #include "utils.h" +#include "module_base/tool_quit.h" + + extern std::map NEW_ELPA_HANDLE_POOL; int ELPA_Solver::eigenvector(std::complex* A, double* EigenValue, std::complex* EigenVector) @@ -55,8 +58,12 @@ int ELPA_Solver::generalized_eigenvector(std::complex* A, std::complex #include #include @@ -54,8 +56,12 @@ int ELPA_Solver::generalized_eigenvector(double* A, { timer(myid, "decomposeRightMatrix", "1", t); } - if (allinfo != 0) - return allinfo; + if (allinfo != 0){ + // if allinfo is still not 0 anyway, report error and quit + if(myid == 0){ + ModuleBase::WARNING_QUIT("ELPA_Solver::generalized_eigenvector", "decomposeRightMatrix failed to decompose right matrix!\n info = " + std::to_string(allinfo)); + } + } // transform A to A~ if ((loglevel > 0 && myid == 0) || loglevel > 1) @@ -313,6 +319,15 @@ int ELPA_Solver::decomposeRightMatrix(double* B, double* EigenValue, double* Eig timer(myid, "qevq=qev*q^T", "2", t); } } + + // if allinfo is still not 0 anyway, report error and quit + if(allinfo != 0) + { + if(myid == 0){ + ModuleBase::WARNING_QUIT("decomposeRightMatrix", + "Failed to decompose right matrix!\n info = " + std::to_string(allinfo)); + } + } return allinfo; }