Skip to content

Commit

Permalink
add CG timer and remove print statement
Browse files Browse the repository at this point in the history
  • Loading branch information
camelto2 committed Sep 9, 2024
1 parent f299cf1 commit 9ec87a4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/QMCDrivers/WFOpt/ConjugateGradient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ namespace qmcplusplus
{

ConjugateGradient::ConjugateGradient(Real threshold, Real regularization)
: threshold_(threshold), regularization_(regularization)
: threshold_(threshold), regularization_(regularization), conjugate_gradient_timer_(createGlobalTimer("ConjugateGradient::run", timer_level_fine))
{}

int ConjugateGradient::run(QMCCostFunctionBase& optTarget, const std::vector<Real>& bvec, std::vector<Real>& solution)
{
ScopedTimer local(conjugate_gradient_timer_);
int numParams = optTarget.getNumParams();
int kmax = numParams;
int k = 0;
Expand Down
3 changes: 2 additions & 1 deletion src/QMCDrivers/WFOpt/ConjugateGradient.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


#include <Configuration.h>

#include <NewTimer.h>

namespace qmcplusplus
{
Expand All @@ -41,6 +41,7 @@ class ConjugateGradient
//to be used for nonlinear rescale
std::vector<Real> Axsol_;
std::vector<Real> xsol_;
NewTimer& conjugate_gradient_timer_;

// obtain the range of non-linear parameters
void getNonLinearRange(int& first, int& last, const QMCCostFunctionBase& optTarget) const;
Expand Down
1 change: 0 additions & 1 deletion src/QMCDrivers/WFOpt/QMCCostFunctionBatched.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,6 @@ void QMCCostFunctionBatched::checkConfigurations(EngineHandle& handle)

void QMCCostFunctionBatched::checkConfigurationsSR(EngineHandle& handle)
{
std::cout << "checkConfigurationsSR" << std::endl;
ScopedTimer tmp_timer(check_config_timer_);

RealType et_tot = 0.0;
Expand Down

0 comments on commit 9ec87a4

Please sign in to comment.