Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions source/module_hsolver/genelpa/blas.h

This file was deleted.

19 changes: 17 additions & 2 deletions source/module_hsolver/genelpa/elpa_new_complex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
#include "module_base/scalapack_connector.h"
#include "utils.h"

#include "module_base/tool_quit.h"


extern std::map<int, elpa_t> NEW_ELPA_HANDLE_POOL;

int ELPA_Solver::eigenvector(std::complex<double>* A, double* EigenValue, std::complex<double>* EigenVector)
Expand Down Expand Up @@ -55,8 +58,12 @@ int ELPA_Solver::generalized_eigenvector(std::complex<double>* A, std::complex<d
{
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)
Expand Down Expand Up @@ -296,6 +303,14 @@ int ELPA_Solver::decomposeRightMatrix(std::complex<double>* B, double* EigenValu
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;
}

Expand Down
21 changes: 18 additions & 3 deletions source/module_hsolver/genelpa/elpa_new_real.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#include "elpa_new.h"
#include "elpa_solver.h"
//#include "my_math.hpp"

#include "module_base/scalapack_connector.h"
#include "utils.h"

#include "module_base/tool_quit.h"

#include <cfloat>
#include <complex>
#include <cstring>
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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;
}

Expand Down
Loading