Skip to content

Commit

Permalink
Merge pull request QMCPACK#5003 from prckent/fixdryrun
Browse files Browse the repository at this point in the history
Improve dryrun capabilty
  • Loading branch information
ye-luo committed May 22, 2024
2 parents d0deeb9 + 1c99331 commit 1cbc463
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
8 changes: 5 additions & 3 deletions docs/running.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ QMCPACK offers several command line options that affect how calculations
are performed. If the flag is absent, then the corresponding
option is disabled:

- ``--dryrun`` Validate the input file without performing the simulation. This is a good way to ensure that QMCPACK will do what you think it will.
- ``--dryrun`` Validate the input file without performing the simulation. All the QMC and loop sections are skipped.
Wavefunctions and pseudopotentials will be loaded and processed. This option can be used to verify all the required
files are available or to check memory usage.

- ``--enable-timers=none|coarse|medium|fine`` Control the timer granularity when the build option ``ENABLE_TIMERS`` is enabled.

- ``help`` Print version information as well as a list of optional
- ``--help`` Print version information as well as a list of optional
command-line arguments.

- ``noprint`` Do not print extra information on Jastrow or pseudopotential.
- ``--noprint`` Do not print extra information on Jastrow or pseudopotential.
If this flag is not present, QMCPACK will create several ``.dat`` files
that contain information about pseudopotentials (one file per PP) and Jastrow
factors (one per Jastrow factor). These file might be useful for visual inspection
Expand Down
10 changes: 3 additions & 7 deletions src/QMCApp/QMCMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,12 @@ bool QMCMain::execute()
particle_set_pool_->get(app_log());
ham_pool_->get(app_log());
OHMMS::Controller->barrier();
t3.stop();
if (qmc_common.dryrun)
{
app_log() << " dryrun == 1 Ignore qmc/loop elements " << std::endl;
myComm->barrier_and_abort("QMCMain::execute");
app_log() << " dryrun == 1 : Skipping all QMC and loop elements " << std::endl;
return true;
}
t3.stop();
Timer t1;
qmc_common.qmc_counter = 0;
for (int qa = 0; qa < qmc_action_.size(); qa++)
Expand Down Expand Up @@ -308,11 +308,7 @@ bool QMCMain::execute()
xmlNewProp(newmcptr, (const xmlChar*)"node", (const xmlChar*)"-1");
xmlNewProp(newmcptr, (const xmlChar*)"nprocs", (const xmlChar*)np_str.str().c_str());
xmlNewProp(newmcptr, (const xmlChar*)"version", (const xmlChar*)v_str.str().c_str());
//#if defined(H5_HAVE_PARALLEL)
xmlNewProp(newmcptr, (const xmlChar*)"collected", (const xmlChar*)"yes");
//#else
// xmlNewProp(newmcptr,(const xmlChar*)"collected",(const xmlChar*)"no");
//#endif
if (mcptr == NULL)
{
xmlAddNextSibling(last_input_node_, newmcptr);
Expand Down
2 changes: 1 addition & 1 deletion src/Utilities/qmc_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void QMCState::print_options(std::ostream& os)
{
os << " Global options " << std::endl;
if (dryrun)
os << " dryrun : qmc sections will be ignored." << std::endl;
os << " dryrun : All QMC and loop sections will be skipped." << std::endl;
}

void QMCState::print_memory_change(const std::string& who, size_t before)
Expand Down

0 comments on commit 1cbc463

Please sign in to comment.