RMC-pbyp bug fixing

git-svn-id: https://subversion.assembla.com/svn/qmcdev/trunk@6368 e5b18d87-469d-4833-9cc0-8cdfa06e9491
This commit is contained in:
Raymond Clay 2014-10-05 22:52:58 +00:00
parent 74ff608843
commit 3e4b029bcb
3 changed files with 38 additions and 16 deletions

View File

@ -87,9 +87,13 @@ bool RMCSingleOMP::run()
if (Period4WalkerDump&& now_loc%myPeriod4WalkerDump==0)
wClones[ip]->saveEnsemble(wit,wit_end);
if (ip==0) branchEngine->collect(CurrentStep, W, branchClones); //Ray Clay: For now, collects and syncs based on first reptile. Need a better way to do this.
branchEngine->collect(CurrentStep, W, branchClones); //Ray Clay: For now, collects and syncs based on first reptile. Need a better way to do this.
}
// wClones[ip]->reptile->calcTauScaling();
stringstream ss1;
app_log()<<ip<<" Eref="<<branchEngine->getEref()<<" Etrial="<<branchEngine->getEtrial()<<" TauEff="<<branchEngine->getTauEff()<<endl;
//app_log()<<ss1.str();
app_log().flush();
// wClones[ip]->reptile->calcTauScaling();
// wClones[ip]->reptile->calcERun();
//branchEngine->collect(CurrentStep, W, branchClones);
// wClones[ip]->reptile->resetR2Avg();
@ -228,13 +232,30 @@ void RMCSingleOMP::resetRun()
/// thermalization Norm
for (int prestep=0; prestep<nWarmupSteps; ++prestep)
Movers[ip]->advanceWalkers(W.begin()+wPerNode[ip],W.begin()+wPerNode[ip+1],true);
//
// for (int prestep=0; prestep<nWarmupSteps; ++prestep)
// {
// Movers[ip]->advanceWalkers(W.begin()+wPerNode[ip],W.begin()+wPerNode[ip+1],true);
// branchEngine->collect(CurrentStep, W, branchClones);
// }
// if (nWarmupSteps && QMCDriverMode[QMC_UPDATE_MODE])
// Movers[ip]->updateWalkers(W.begin()+wPerNode[ip],W.begin()+wPerNode[ip+1]);
// Movers[ip]->updateWalkers(W.begin()+wPerNode[ip],W.begin()+wPerNode[ip+1]);
}
branchEngine->checkParameters(W);
#if !defined(BGP_BUG)
#pragma omp parallel for
#endif
for(int ip=0; ip<NumThreads; ++ip)
{
for (int prestep=0; prestep<nWarmupSteps; ++prestep)
{
Movers[ip]->advanceWalkers(W.begin()+wPerNode[ip],W.begin()+wPerNode[ip+1],true);
branchEngine->collect(CurrentStep, W, branchClones);
}
}
}
bool

View File

@ -242,8 +242,8 @@ void RMCUpdatePbyPWithDrift::advanceWalkersVMC()
// overwriteWalker.Properties(R2PROPOSED)=rr_proposed;
prophead.Properties(LOCALENERGY)=eloc;
// prophead.Properties(R2ACCEPTED)=rr_accepted;
// prophead.Properties(R2PROPOSED)=rr_proposed;
prophead.Properties(R2ACCEPTED)=rr_accepted;
prophead.Properties(R2PROPOSED)=rr_proposed;
// H.auxHevaluate(W,overwriteWalker);
// H.auxHevaluate(W,prophead);
//H.saveProperty(overwriteWalker.getPropertyBase());
@ -620,7 +620,7 @@ void RMCUpdatePbyPWithDrift::advanceWalkersRMC()
void RMCUpdatePbyPWithDrift::advanceWalkers(WalkerIter_t it, WalkerIter_t it_end, bool measure)
{
if (vmcToDoSteps>0)
/* if (vmcToDoSteps>0)
{
advanceWalkersVMC();
vmcToDoSteps--;
@ -633,15 +633,16 @@ void RMCUpdatePbyPWithDrift::advanceWalkers(WalkerIter_t it, WalkerIter_t it_end
else
{
advanceWalkersRMC();
}
// advanceWalkersRMC();
} */
advanceWalkersRMC();
}
void RMCUpdatePbyPWithDrift::accumulate(WalkerIter_t it, WalkerIter_t it_end)
{
if (vmcToDoSteps==0 && equilToDoSteps==0) Estimators->accumulate(W,it,it_end);
else;
// if (vmcToDoSteps==0 && equilToDoSteps==0) Estimators->accumulate(W,it,it_end);
// else;
Estimators->accumulate(W,it,it_end);
}
}

View File

@ -209,7 +209,7 @@ int SimpleFixedNodeBranch::initWalkerController(MCWalkerConfiguration& walkers,
void SimpleFixedNodeBranch::initReptile(MCWalkerConfiguration& W)
{
RealType allowedFlux=10.0;
RealType allowedFlux=50.0;
BranchMode.set(B_RMC,1);//set RMC
BranchMode.set(B_RMCSTAGE,iParam[B_WARMUPSTEPS]==0);//use warmup
//this is not necessary
@ -428,7 +428,7 @@ void SimpleFixedNodeBranch::collect(int iter, MCWalkerConfiguration& W)
{
//app_log()<<" BRANCHMODE = "<<BranchMode[B_USETAUEFF]<<endl;
vParam[B_TAUEFF]=vParam[B_TAU]*R2Accepted.result()/R2Proposed.result();
// app_log()<<"\tvParam[B_TAU]="<<vParam[B_TAU]<<endl;
// app_log()<<"\tvParam[B_TAU]="<<vParam[B_TAU]<<" "<<vParam[B_TAUEFF]<<endl;
}
/*
if(BranchMode[B_RMCSTAGE]) // main stage
@ -546,7 +546,7 @@ void SimpleFixedNodeBranch::reset()
{
//this is to compare the time step errors
// BranchMode.set(B_USETAUEFF,sParam[USETAUOPT]=="no");
if(BranchMode[B_DMCSTAGE]) //
if(BranchMode[B_RMCSTAGE]) //
ToDoSteps = iParam[B_ENERGYUPDATEINTERVAL]-1;
else
ToDoSteps = iParam[B_WARMUPSTEPS];