Commit cf31d5ce authored by Alvarez, Gonzalo's avatar Alvarez, Gonzalo
Browse files

SolverOptions blasNotThreadSafe

If set, BLAS is assumed not to be thread safe,
and threading around all BLAS calls are disabled.
TODO FIXME: We should also disable threading around LAPACK
calls, because LAPACK (in turn) calls BLAS apparently.
This option replaces the no longer extant option
blasIsThreadSafe
parent fd22fed5
......@@ -358,6 +358,7 @@ public:
to target expressions.
\item [calcAndPrintEntropies] Calculate entropies and print to cout file
\item [printHamiltonianAverage] Print <...|H|...> in NGSTs.
\item [blasNotThreadSafe] TBW
\end{itemize}
*/
void check(const PsimagLite::String& label,
......@@ -425,6 +426,7 @@ public:
registerOpts.push_back("OperatorsChangeAll");
registerOpts.push_back("calcAndPrintEntropies");
registerOpts.push_back("printHamiltonianAverage");
registerOpts.push_back("blasNotThreadSafe");
PsimagLite::Options::Writeable optWriteable(registerOpts,
PsimagLite::Options::Writeable::PERMISSIVE);
......
......@@ -147,7 +147,7 @@ public:
bool blasIsThreadSafe() const
{
return (model_.params().options.find("blasIsThreadSafe") != PsimagLite::String::npos);
return (model_.params().options.find("blasNotThreadSafe") == PsimagLite::String::npos);
}
// -------------------
......
......@@ -304,7 +304,7 @@ private:
cache.transform.truncate(cache.removedIndices);
const bool blasIsThreadSafe = (parameters_.options.find("blasIsThreadSafe") !=
const bool blasIsThreadSafe = (parameters_.options.find("blasNotThreadSafe") ==
PsimagLite::String::npos);
rPrime.truncateBasis(cache.transform,
cache.eigs,
......
......@@ -129,7 +129,7 @@ public:
true,
true,
params.denseSparseThreshold,
params.options.find("blasIsThreadSafe") != PsimagLite::String::npos),
params.options.find("blasNotThreadSafe") == PsimagLite::String::npos),
progress_("WaveFunctionTransf"),
filenameIn_(params.checkpoint.filename()),
filenameOut_(params.filename),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment