Skip to content

Commit

Permalink
attempted fix for checkLogandGL in mixed precision
Browse files Browse the repository at this point in the history
  • Loading branch information
PDoakORNL committed Sep 24, 2021
1 parent 7d14b2c commit 78253d2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/QMCDrivers/QMCDriverNew.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,13 @@ bool QMCDriverNew::checkLogAndGL(Crowd& crowd)
ps_dispatcher.flex_update(walker_elecs);
twf_dispatcher.flex_evaluateLog(walker_twfs, walker_elecs);

const RealType threshold = 100 * std::numeric_limits<float>::epsilon();
RealType threshold;
// mixed precision can't make this test with cuda direct inversion
if constexpr (std::is_same<RealType, FullPrecRealType>::value)
threshold = 100 * std::numeric_limits<float>::epsilon();
else
threshold = 0.5e-5;

for (int iw = 0; iw < log_values.size(); iw++)
{
auto& ref_G = walker_twfs[iw].G;
Expand Down

0 comments on commit 78253d2

Please sign in to comment.