Recent site activity

How-to guides‎ > ‎

Restart from a previous run

Insert  before any <qmc> section:

<mcwalkerset fileroot="CONFIGH5" node="-1" nprocs="2" version="0 6" collected="yes"/>

Here, CONFIGH5 is the root of *.config.h5 file. Each <qmc> section generates its own config.h5 file.

When a QMCPACK run is completed, it generates a file with cont.xml extension. This is a copy of the original input file with <mcwalkerset> inserted. mcwalkerset/@fileroot is set to the root of the last <qmc> section.

It is necessary to edit this file, less you want to repeat the same calculation again!

Example of a restart input

<?xml version="1.0"?>
<simulation>
  <project id="mytitle" series="0">
  </project>
  <!-- input from gaussian converter -->
  <random seed="-1" parallel="true"/>
  <include href="N2.ptcl.xml"/>
  <include href="N2.varmin.3j.s008.opt.xml"/>
  <!--  Hamiltonian -->
  <hamiltonian name="h0" type="generic" target="e">
    <pairpot name="ElecElec" type="coulomb" source="e" target="e"/>
    <pairpot name="ELEMENT-ECP" type="pseudo" source="ion0" target="e" format="xml" wavefunction
      <pseudo elementType="N" format="xml" href="N.BFD.xml"/>
    </pairpot>
    <constant name="IonIon" type="coulomb" source="ion0" target="ion0"/>
  </hamiltonian>
    <!-- restart from mytitle.s002 -->
  <mcwalkerset fileroot="mytitle.s002" node="-1" nprocs="2" version="0 6" collected="yes"/>
  <qmc method="dmc" move="pbyp" target="e">
    <parameter name="blocks">200</parameter>
    <parameter name="steps">20</parameter>
    <parameter name="timestep">0.0025</parameter>
  </qmc>
</simulation>

What is config.h5

It contains the state of a population to continue a run including the random number sequences. h5ls -r shows

/state_0                 Group
/state_0/number_of_walkers Dataset {1}
/state_0/qmc_status      Group
/state_0/qmc_status/branchmode Dataset {1}
/state_0/qmc_status/histogram Group
/state_0/qmc_status/histogram/energy Dataset {4}
/state_0/qmc_status/histogram/r2accepted Dataset {4}
/state_0/qmc_status/histogram/r2proposed Dataset {4}
/state_0/qmc_status/histogram/variance Dataset {4}
/state_0/qmc_status/iparam Dataset {8}
/state_0/qmc_status/iparam_def Dataset {1}
/state_0/qmc_status/vparam Dataset {16}
/state_0/qmc_status/vparam_def Dataset {1}
/state_0/random          Group
/state_0/random/mt19937  Dataset {8, 624}
/state_0/walkers         Dataset {2079, 10, 3}
/version                 Dataset {2}

Caveat

  • Since random number sequences of a previous run are used, multiple runs starting from one config.file can produce identical data  if the runs use the same number of MPI tasks and OpenMP threads. In fact, that is what is supposed to do.
  • One can initialize the random number generators by adding <random/> in a <qmc> section, e.g.,
<?xml version="1.0"?>
<simulation>
 <!--- everything else  -->
  <mcwalkerset fileroot="current.09-20-10_0741.s000" node="-1" nprocs="2" version="0 6" collecte
  <qmc method="dmc" move="pbyp" target="e">
    <random/>
    <parameter name="blocks">200</parameter>
    <parameter name="steps">20</parameter>
    <parameter name="timestep">0.0025</parameter>
  </qmc>
</simulation>