mirror of https://github.com/QMCPACK/qmcpack.git
Add MP guards and SoA warning.
This commit is contained in:
parent
01b8aa84cf
commit
a9bb1944bf
|
@ -24,6 +24,7 @@ IF(NOT QMC_CUDA AND NOT QMC_COMPLEX AND NOT ENABLE_SOA)
|
|||
1 HE_SIMPLE_DMC_SCALARS # series for DMC data
|
||||
)
|
||||
|
||||
IF(NOT MIXED_PRECISION)
|
||||
LIST(APPEND HE_SIMPLE_OPT_SCALARS "totenergy" "-2.88 .004") # total energy
|
||||
|
||||
QMC_RUN_AND_CHECK(example_He_simple_opt
|
||||
|
@ -34,6 +35,7 @@ IF(NOT QMC_CUDA AND NOT QMC_COMPLEX AND NOT ENABLE_SOA)
|
|||
TRUE
|
||||
10 HE_SIMPLE_OPT_SCALARS # final optimized series
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
LIST(APPEND HE_FROM_GAMESS_SCALARS "totenergy" "-2.872 .003") # total energy
|
||||
|
||||
|
|
|
@ -291,80 +291,55 @@ void QMCDriverFactory::createQMCDriver(xmlNodePtr cur)
|
|||
//TrialWaveFunction* psiclone=primaryPsi->makeClone(*qmcSystem);
|
||||
//qmcDriver = fac.create(*qmcSystem,*psiclone,*primaryH,*ptclPool,*hamPool);
|
||||
}
|
||||
else
|
||||
if(curRunType == DMC_RUN)
|
||||
{
|
||||
DMCFactory fac(curQmcModeBits[UPDATE_MODE],
|
||||
curQmcModeBits[GPU_MODE], cur);
|
||||
qmcDriver = fac.create(*qmcSystem,*primaryPsi,*primaryH,*hamPool,*psiPool);
|
||||
}
|
||||
#if QMC_BUILD_LEVEL>1
|
||||
else
|
||||
if(curRunType == RMC_RUN)
|
||||
{
|
||||
RMCFactory fac(curQmcModeBits[UPDATE_MODE], cur);
|
||||
qmcDriver = fac.create(*qmcSystem,*primaryPsi,*primaryH,*ptclPool,*hamPool,*psiPool);
|
||||
}
|
||||
else if(curRunType == DMC_RUN)
|
||||
{
|
||||
DMCFactory fac(curQmcModeBits[UPDATE_MODE],
|
||||
curQmcModeBits[GPU_MODE], cur);
|
||||
qmcDriver = fac.create(*qmcSystem,*primaryPsi,*primaryH,*hamPool,*psiPool);
|
||||
}
|
||||
else if(curRunType == RMC_RUN)
|
||||
{
|
||||
RMCFactory fac(curQmcModeBits[UPDATE_MODE], cur);
|
||||
qmcDriver = fac.create(*qmcSystem,*primaryPsi,*primaryH,*ptclPool,*hamPool,*psiPool);
|
||||
}
|
||||
else if(curRunType == OPTIMIZE_RUN)
|
||||
{
|
||||
QMCOptimize *opt = new QMCOptimize(*qmcSystem,*primaryPsi,*primaryH,*hamPool,*psiPool);
|
||||
//ZeroVarianceOptimize *opt = new ZeroVarianceOptimize(*qmcSystem,*primaryPsi,*primaryH );
|
||||
opt->setWaveFunctionNode(psiPool->getWaveFunctionNode("psi0"));
|
||||
qmcDriver=opt;
|
||||
}
|
||||
else if(curRunType == LINEAR_OPTIMIZE_RUN)
|
||||
{
|
||||
#ifdef MIXED_PRECISION
|
||||
APP_ABORT("QMCDriverFactory::createQMCDriver : method=\"linear\" is not safe with CPU mixed precision. Please use full precision build instead.");
|
||||
#endif
|
||||
//#if QMC_BUILD_LEVEL>1
|
||||
// else if(curRunType == RMC_RUN)
|
||||
// {
|
||||
// app_log() << "Using RQMCMultiple: no warping, no pbyp" << std::endl;
|
||||
// qmcDriver = new RQMCMultiple(*qmcSystem,*primaryPsi,*primaryH,*psiPool);
|
||||
// }
|
||||
//#endif
|
||||
//#if defined(QMC_BUILD_COMPLETE)
|
||||
// else if(curRunType == RMC_RUN)
|
||||
// {
|
||||
//#if defined(QMC_COMPLEX)
|
||||
// qmcDriver = new RQMCMultiple(*qmcSystem,*primaryPsi,*primaryH);
|
||||
//#else
|
||||
// if(curQmcModeBits[SPACEWARP_MODE])
|
||||
// qmcDriver = new RQMCMultiWarp(*qmcSystem,*primaryPsi,*primaryH, *ptclPool);
|
||||
// else
|
||||
// qmcDriver = new RQMCMultiple(*qmcSystem,*primaryPsi,*primaryH);
|
||||
// }
|
||||
// else if (curRunType==RMC_PBYP_RUN)
|
||||
// {
|
||||
// qmcDriver = new RQMCMultiplePbyP(*qmcSystem,*primaryPsi,*primaryH);
|
||||
//#endif
|
||||
// }
|
||||
//#endif
|
||||
else if(curRunType == OPTIMIZE_RUN)
|
||||
{
|
||||
QMCOptimize *opt = new QMCOptimize(*qmcSystem,*primaryPsi,*primaryH,*hamPool,*psiPool);
|
||||
//ZeroVarianceOptimize *opt = new ZeroVarianceOptimize(*qmcSystem,*primaryPsi,*primaryH );
|
||||
opt->setWaveFunctionNode(psiPool->getWaveFunctionNode("psi0"));
|
||||
qmcDriver=opt;
|
||||
}
|
||||
else if(curRunType == LINEAR_OPTIMIZE_RUN)
|
||||
{
|
||||
QMCFixedSampleLinearOptimize *opt = new QMCFixedSampleLinearOptimize(*qmcSystem,*primaryPsi,*primaryH,*hamPool,*psiPool);
|
||||
//ZeroVarianceOptimize *opt = new ZeroVarianceOptimize(*qmcSystem,*primaryPsi,*primaryH );
|
||||
opt->setWaveFunctionNode(psiPool->getWaveFunctionNode("psi0"));
|
||||
qmcDriver=opt;
|
||||
}
|
||||
else if(curRunType == CS_LINEAR_OPTIMIZE_RUN)
|
||||
{
|
||||
QMCFixedSampleLinearOptimize *opt = new QMCFixedSampleLinearOptimize(*qmcSystem,*primaryPsi,*primaryH,*hamPool,*psiPool);
|
||||
//ZeroVarianceOptimize *opt = new ZeroVarianceOptimize(*qmcSystem,*primaryPsi,*primaryH );
|
||||
opt->setWaveFunctionNode(psiPool->getWaveFunctionNode("psi0"));
|
||||
qmcDriver=opt;
|
||||
}
|
||||
else if(curRunType == CS_LINEAR_OPTIMIZE_RUN)
|
||||
{
|
||||
#if defined(QMC_CUDA)
|
||||
app_log() << "cslinear is not supported. Switch to linear method. " << std::endl;
|
||||
QMCFixedSampleLinearOptimize *opt = new QMCFixedSampleLinearOptimize(*qmcSystem,*primaryPsi,*primaryH,*hamPool,*psiPool);
|
||||
app_log() << "cslinear is not supported. Switch to linear method. " << std::endl;
|
||||
QMCFixedSampleLinearOptimize *opt = new QMCFixedSampleLinearOptimize(*qmcSystem,*primaryPsi,*primaryH,*hamPool,*psiPool);
|
||||
#else
|
||||
QMCCorrelatedSamplingLinearOptimize *opt = new QMCCorrelatedSamplingLinearOptimize(*qmcSystem,*primaryPsi,*primaryH,*hamPool,*psiPool);
|
||||
QMCCorrelatedSamplingLinearOptimize *opt = new QMCCorrelatedSamplingLinearOptimize(*qmcSystem,*primaryPsi,*primaryH,*hamPool,*psiPool);
|
||||
#endif
|
||||
opt->setWaveFunctionNode(psiPool->getWaveFunctionNode("psi0"));
|
||||
qmcDriver=opt;
|
||||
}
|
||||
else if(curRunType == WF_TEST_RUN)
|
||||
{
|
||||
app_log() << "Testing wavefunctions." << std::endl;
|
||||
qmcDriver = new WaveFunctionTester(*qmcSystem,*primaryPsi,*primaryH,
|
||||
*ptclPool,*psiPool);
|
||||
}
|
||||
else
|
||||
{
|
||||
APP_ABORT("Unhandled run type: " << curRunType);
|
||||
}
|
||||
opt->setWaveFunctionNode(psiPool->getWaveFunctionNode("psi0"));
|
||||
qmcDriver=opt;
|
||||
}
|
||||
else if(curRunType == WF_TEST_RUN)
|
||||
{
|
||||
app_log() << "Testing wavefunctions." << std::endl;
|
||||
qmcDriver = new WaveFunctionTester(*qmcSystem,*primaryPsi,*primaryH,
|
||||
*ptclPool,*psiPool);
|
||||
}
|
||||
else
|
||||
{
|
||||
APP_ABORT("Unhandled run type: " << curRunType);
|
||||
}
|
||||
if(curQmcModeBits[MULTIPLE_MODE])
|
||||
{
|
||||
while(targetH.size())
|
||||
|
|
|
@ -486,6 +486,10 @@ bool HamiltonianFactory::build(xmlNodePtr cur, bool buildtree)
|
|||
#if OHMMS_DIM==3
|
||||
else if(potType == "chiesa")
|
||||
{
|
||||
#ifdef ENABLE_SOA
|
||||
app_warning() << "Skip Chiesa estimator due to the lack of support with SoA."
|
||||
<< " Access the correction via AoS at the moment." << std::endl;
|
||||
#else
|
||||
std::string PsiName="psi0";
|
||||
std::string SourceName = "e";
|
||||
OhmmsAttributeSet hAttrib;
|
||||
|
@ -506,6 +510,7 @@ bool HamiltonianFactory::build(xmlNodePtr cur, bool buildtree)
|
|||
const TrialWaveFunction &psi = *psi_it->second->targetPsi;
|
||||
ChiesaCorrection *chiesa = new ChiesaCorrection (source, psi);
|
||||
targetH->addOperator(chiesa,"KEcorr",false);
|
||||
#endif
|
||||
}
|
||||
else if(potType == "skall")
|
||||
{
|
||||
|
@ -524,10 +529,10 @@ bool HamiltonianFactory::build(xmlNodePtr cur, bool buildtree)
|
|||
if(PBCType)
|
||||
{
|
||||
|
||||
SkAllEstimator* apot=new SkAllEstimator(*source, *targetPtcl);
|
||||
apot->put(cur);
|
||||
targetH->addOperator(apot,potName,false);
|
||||
app_log()<<"Adding S(k) ALL estimator"<<std::endl;
|
||||
SkAllEstimator* apot=new SkAllEstimator(*source, *targetPtcl);
|
||||
apot->put(cur);
|
||||
targetH->addOperator(apot,potName,false);
|
||||
app_log()<<"Adding S(k) ALL estimator"<<std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -289,6 +289,9 @@ bool SlaterDetBuilder::put(xmlNodePtr cur)
|
|||
{
|
||||
APP_ABORT("multideterminant is already instantiated.");
|
||||
}
|
||||
#ifdef MIXED_PRECISION
|
||||
APP_ABORT("multideterminant is not safe with mixed precision. Please use full precision build instead.");
|
||||
#endif
|
||||
std::string spo_alpha;
|
||||
std::string spo_beta;
|
||||
std::string fastAlg("yes");
|
||||
|
|
|
@ -459,6 +459,7 @@ IF (NOT QMC_COMPLEX)
|
|||
0 LIH_PP_SCALARS # VMC
|
||||
)
|
||||
|
||||
IF(NOT MIXED_PRECISION)
|
||||
#
|
||||
# H2 test in a DZV basis set, using optimizable determinants, and the adaptive linear method
|
||||
#
|
||||
|
@ -569,6 +570,7 @@ ENDIF(BUILD_LMYENGINE_INTERFACE)
|
|||
TRUE
|
||||
5 H4_OPT_SCALARS # OPT step 5
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
ELSE()
|
||||
MESSAGE("Skipping all gaussian basis tests because they are not supported by complex build (QMC_COMPLEX=1)")
|
||||
|
@ -983,6 +985,7 @@ ENDIF(ENABLE_SOA)
|
|||
0 DIAMOND_SCALARS # VMC
|
||||
)
|
||||
|
||||
IF(NOT MIXED_PRECISION)
|
||||
# Reference OPT run in qmc-ref
|
||||
LIST(APPEND DIAMOND_OPT_SCALARS "totenergy" "-10.49370 0.0024")
|
||||
LIST(APPEND DIAMOND_OPT_SCALARS "kinetic" "11.5504 0.021")
|
||||
|
@ -998,6 +1001,7 @@ ENDIF(ENABLE_SOA)
|
|||
TRUE
|
||||
3 DIAMOND_OPT_SCALARS # VMC
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
# Reference DMC run in qmc-ref "-10.531583 0.000265"
|
||||
LIST(APPEND DIAMOND_DMC_SCALARS "totenergy" "-10.531583 0.0024")
|
||||
|
|
Loading…
Reference in New Issue