Overwrite maxCopy to 2 if it is larger and nonblocking=yes.

This commit is contained in:
Ye Luo 2018-01-09 14:18:10 -06:00
parent 7f47725a2e
commit a08f67b545
2 changed files with 7 additions and 3 deletions

View File

@ -46,7 +46,7 @@
% & \texttt{wlen } & integer & $\ge 0$ & 0 & number of samples per thread \\
& \texttt{maxDisplSq } & real & all values & -1 & maximum particle move \\
& \texttt{storeconfigs } & integer & all values & 0 & store configurations \\
& \texttt{use\_nonblocking } & string & yes/no & no & using non-blocking send/recv \\
& \texttt{use\_nonblocking } & string & yes/no & yes & using non-blocking send/recv \\
& \texttt{blocks\_between\_recompute} & integer & $\ge 0$ & dep. & wavefunction recompute frequency \\
\hline
\end{tabularx}

View File

@ -502,7 +502,7 @@ int WalkerControlBase::copyWalkers(MCWalkerConfiguration& W)
bool WalkerControlBase::put(xmlNodePtr cur)
{
int nw_target=0, nw_max=0;
std::string nonblocking="no";
std::string nonblocking="yes";
ParameterSet params;
params.add(targetEnergyBound,"energyBound","double");
params.add(targetSigma,"sigmaBound","double");
@ -516,8 +516,12 @@ bool WalkerControlBase::put(xmlNodePtr cur)
// validating input
if(nonblocking=="yes")
{
APP_ABORT("WalkerControlBase::put use_nonblocking==\"yes\" is disabled currently!");
use_nonblocking = true;
if(MaxCopy>2)
{
app_warning() << "use_nonblocking==\"yes\" doesn't support maxCopy>2. Overwriting it to 2." << std::endl;
MaxCopy=2;
}
}
else if(nonblocking=="no")
{