Skip to content

Commit

Permalink
Merge pull request #242 from ye-luo/add-delayed-update
Browse files Browse the repository at this point in the history
Add delayed update
  • Loading branch information
PDoakORNL authored Jun 12, 2019
2 parents bf6a3f0 + 9afab34 commit 3b26489
Show file tree
Hide file tree
Showing 33 changed files with 2,679 additions and 1,202 deletions.
2 changes: 2 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,4 +178,6 @@ ENDIF()

SUBDIRS(Particle/tests)

SUBDIRS(QMCWaveFunctions)

SUBDIRS(Drivers)
35 changes: 13 additions & 22 deletions src/Drivers/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,29 +1,20 @@
if(QMC_BUILD_LEVEL GREATER 4)
# add apps XYZ.cpp, e.g., qmc_particles.cpp
#SET(ESTEST einspline_smp einspline_spo qmc_particles moveonsphere twobody ptclset)
SET(ESTEST check_wfc check_spo check_determinant)

FOREACH(p ${ESTEST})
ADD_EXECUTABLE( ${p} ${p}.cpp)
TARGET_LINK_LIBRARIES(${p} qmcbase qmcutil ${QMC_UTIL_LIBS} ${MPI_LIBRARY})
ENDFOREACH(p ${ESTEST})

ADD_LIBRARY(miniwfs ../QMCWaveFunctions/WaveFunction.cpp ../QMCWaveFunctions/SPOSet_builder.cpp)

SET(DRIVERS miniqmc miniqmc_sync_move)
#//////////////////////////////////////////////////////////////////////////////////////
#// This file is distributed under the University of Illinois/NCSA Open Source License.
#// See LICENSE file in top directory for details.
#//
#// Copyright (c) 2019 QMCPACK developers.
#//
#// File developed by: Ye Luo, [email protected], Argonne National Laboratory
#//
#// File created by: Ye Luo, [email protected], Argonne National Laboratory
#//////////////////////////////////////////////////////////////////////////////////////

SET(DRIVERS check_spo check_wfc miniqmc miniqmc_sync_move)

FOREACH(p ${DRIVERS})
ADD_EXECUTABLE( ${p} ${p}.cpp)
TARGET_LINK_LIBRARIES(${p} miniwfs qmcbase qmcutil ${QMC_UTIL_LIBS} ${MPI_LIBRARY})
TARGET_LINK_LIBRARIES(${p} qmcwfs qmcbase qmcutil ${QMC_UTIL_LIBS} ${MPI_LIBRARY})
ENDFOREACH(p ${ESTEST})

endif()

SUBDIRS(tests)

#SET(boost_test exchange_walker)
#FOREACH(p ${boost_test})
# ADD_EXECUTABLE( ${p} ${p}.cpp)
# TARGET_LINK_LIBRARIES(${p} qmcbase qmcutil ${QMC_UTIL_LIBS} boost ${MPI_LIBRARY})
#ENDFOREACH(p ${boost_test})

221 changes: 0 additions & 221 deletions src/Drivers/check_determinant.cpp

This file was deleted.

16 changes: 9 additions & 7 deletions src/Drivers/check_spo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,9 @@ int main(int argc, char** argv)
// VMC
for (int iel = 0; iel < nels; ++iel)
{
PosType pos = els.R[iel] + delta[iel];
spo.evaluate_vgh(pos);
spo_ref.evaluate_vgh(pos);
els.makeMove(iel, delta[iel]);
spo.evaluate_vgh(els, iel);
spo_ref.evaluate_vgh(els, iel);
// accumulate error
for (int ib = 0; ib < spo.nBlocks; ib++)
for (int n = 0; n < spo.nSplinesPerBlock; n++)
Expand All @@ -272,7 +272,7 @@ int main(int argc, char** argv)
}
if (ur[iel] < accept)
{
els.R[iel] = pos;
els.acceptMove(iel);
my_accepted++;
}
}
Expand All @@ -288,11 +288,13 @@ int main(int argc, char** argv)

for (int nn = 0; nn < nnF; ++nn)
{
int iel = nn + iat * zval;
for (int k = 0; k < nknots; k++)
{
PosType pos = centerP + r * rOnSphere[k];
spo.evaluate_v(pos);
spo_ref.evaluate_v(pos);
PosType delta_qp = centerP + r * rOnSphere[k] - els.R[iel];
els.makeMove(iel, delta_qp);
spo.evaluate_v(els, iel);
spo_ref.evaluate_v(els, iel);
// accumulate error
for (int ib = 0; ib < spo.nBlocks; ib++)
for (int n = 0; n < spo.nSplinesPerBlock; n++)
Expand Down
Loading

0 comments on commit 3b26489

Please sign in to comment.