Skip to content

Commit

Permalink
Merge pull request #198 from ye-luo/fix-cuda-j2
Browse files Browse the repository at this point in the history
Fix CUDA J2 in 1 up + 1 down electron case.
  • Loading branch information
prckent authored May 2, 2017
2 parents 5546568 + 0f62e62 commit e88e20f
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/QMCWaveFunctions/Jastrow/TwoBodyJastrowOrbitalBspline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,20 @@ TwoBodyJastrowOrbitalBspline::addFunc(int ia, int ib, FT* j)
}
else
{
GPUSplines[ia*NumGroups+ib]=newSpline;
GPUSplines[ib*NumGroups+ia]=newSpline;
if(PtclRef.R.size()==2)
{
// a very special case, 1 up + 1 down
// uu/dd was prevented by the builder
for(int ig=0; ig<NumGroups; ++ig)
for(int jg=0; jg<NumGroups; ++jg)
GPUSplines[ig*NumGroups+jg]=newSpline;
}
else
{
// generic case
GPUSplines[ia*NumGroups+ib]=newSpline;
GPUSplines[ib*NumGroups+ia]=newSpline;
}
}
}

Expand Down

0 comments on commit e88e20f

Please sign in to comment.