Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix assertion failure #4752

Merged
merged 1 commit into from
Sep 29, 2023
Merged
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
4 changes: 1 addition & 3 deletions src/QMCWaveFunctions/Fermion/DiracDeterminantBatched.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -657,16 +657,14 @@ void DiracDeterminantBatched<DET_ENGINE>::mw_evaluateGL(const RefVectorWithLeade
auto& det = wfc_list.getCastedElement<DiracDeterminantBatched<DET_ENGINE>>(iw);

#ifndef NDEBUG
// at this point, host and device should have exactly the same G and L values.
GradMatrix dpsiM_from_device = det.dpsiM;
Matrix<Value> d2psiM_from_device = det.d2psiM;

auto& my_psiM_vgl = det.psiM_vgl;
auto* psiM_vgl_ptr = my_psiM_vgl.data();
// transfer device to host, total size 4, g(3) + l(1)
PRAGMA_OFFLOAD("omp target update from(psiM_vgl_ptr[my_psiM_vgl.capacity():my_psiM_vgl.capacity()*4])")
Matrix<Value> psiM_temp_host(det.psiM_temp.data(), det.psiM_temp.rows(), det.psiM_temp.cols());
det.Phi->evaluate_notranspose(p_list[iw], FirstIndex, LastIndex, psiM_temp_host, det.dpsiM, det.d2psiM);

assert(dpsiM_from_device == det.dpsiM);
assert(d2psiM_from_device == det.d2psiM);
#endif
Expand Down