Use "wftest" as a driver name for testing wavefunctions.

This is a change from the previous behavior that would run wavefunction tests
as a default option if no other driver name matched.  Now an error is raised
if the driver name is unknown.


git-svn-id: https://subversion.assembla.com/svn/qmcdev/trunk@6762 e5b18d87-469d-4833-9cc0-8cdfa06e9491
This commit is contained in:
Mark Dewing 2016-02-11 03:49:37 +00:00
parent b93adcfdfd
commit 65bd840795
2 changed files with 24 additions and 11 deletions

View File

@ -109,6 +109,8 @@ bool QMCDriverFactory::setQMCDriver(int curSeries, xmlNodePtr cur)
WhatToDo[GPU_MODE ] = (gpu_tag == "yes");
#endif
OhmmsInfo::flush();
string wf_test_name("wftest");
QMCRunType newRunType = DUMMY_RUN;
if(curName != "qmc")
qmc_mode=curName;
@ -141,16 +143,22 @@ bool QMCDriverFactory::setQMCDriver(int curSeries, xmlNodePtr cur)
{
newRunType=RMC_RUN;
}
else if(qmc_mode.find("vmc")<nchars)
{
newRunType=VMC_RUN;
}
else if(qmc_mode.find("dmc")<nchars)
{
newRunType=DMC_RUN;
}
else if(qmc_mode == wf_test_name)
{
newRunType=WF_TEST_RUN;
}
else
if(qmc_mode.find("vmc")<nchars)
{
newRunType=VMC_RUN;
}
else
if(qmc_mode.find("dmc")<nchars)
{
newRunType=DMC_RUN;
}
{
app_log() << "Unknown qmc method: " << qmc_mode << endl;
}
}
unsigned long newQmcMode=WhatToDo.to_ulong();
//initialize to 0
@ -342,12 +350,16 @@ void QMCDriverFactory::createQMCDriver(xmlNodePtr cur)
opt->setWaveFunctionNode(psiPool->getWaveFunctionNode("psi0"));
qmcDriver=opt;
}
else
else if(curRunType == WF_TEST_RUN)
{
WARNMSG("Testing wavefunctions. Creating WaveFunctionTester for testing");
app_log() << "Testing wavefunctions." << endl;
qmcDriver = new WaveFunctionTester(*qmcSystem,*primaryPsi,*primaryH,
*ptclPool,*psiPool);
}
else
{
APP_ABORT("Unhandled run type: " << curRunType);
}
if(curQmcModeBits[MULTIPLE_MODE])
{
while(targetH.size())

View File

@ -47,6 +47,7 @@ struct QMCDriverFactory: public MPIObjectBase
VMC_OPT_RUN, /*!< Optimization with vmc blocks */
LINEAR_OPTIMIZE_RUN,
CS_LINEAR_OPTIMIZE_RUN,
WF_TEST_RUN
};
/*! enum to set the bit to determine the QMC mode */