Loading src/Svd.h +10 −20 Original line number Diff line number Diff line Loading @@ -99,28 +99,18 @@ public: &(iwork[0]), &info); if (info != 0) { pid_t pid = getpid(); PsimagLite::String dumpFile = "SvdFailedForThisMatrix" + ttos(pid) + ".txt"; String str(__FILE__); str += " " + ttos(__LINE__); str += " svd(...) failed with info=" + ttos(info); str += " matrix is " + ttos(a.rows()) + " " + ttos(a.cols()); str += " and dumped to file " + dumpFile + "\n"; std::ofstream fout(dumpFile.c_str()); fout<<a<<"\n"; fout.close(); sleep(2); if (info < 0) throw RuntimeError(String(__FILE__) + ": " + ttos(__LINE__) + " info= " + ttos(info)); if (info < 0 || !canTryAgain()) throw RuntimeError(str); std::cerr<<str; if (canTryAgain()) { std::cerr<<__FILE__<<": "<<__LINE__<<" info= "<<"\n"; std::cerr<<"Will try with fallback...\n"; name_ = "gesvd"; operator()(jobz, a, s, vt); } } a = u; } Loading Loading
src/Svd.h +10 −20 Original line number Diff line number Diff line Loading @@ -99,28 +99,18 @@ public: &(iwork[0]), &info); if (info != 0) { pid_t pid = getpid(); PsimagLite::String dumpFile = "SvdFailedForThisMatrix" + ttos(pid) + ".txt"; String str(__FILE__); str += " " + ttos(__LINE__); str += " svd(...) failed with info=" + ttos(info); str += " matrix is " + ttos(a.rows()) + " " + ttos(a.cols()); str += " and dumped to file " + dumpFile + "\n"; std::ofstream fout(dumpFile.c_str()); fout<<a<<"\n"; fout.close(); sleep(2); if (info < 0) throw RuntimeError(String(__FILE__) + ": " + ttos(__LINE__) + " info= " + ttos(info)); if (info < 0 || !canTryAgain()) throw RuntimeError(str); std::cerr<<str; if (canTryAgain()) { std::cerr<<__FILE__<<": "<<__LINE__<<" info= "<<"\n"; std::cerr<<"Will try with fallback...\n"; name_ = "gesvd"; operator()(jobz, a, s, vt); } } a = u; } Loading