Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add delay_rank to driver input #3204

Open
jtkrogel opened this issue May 27, 2021 · 6 comments
Open

Add delay_rank to driver input #3204

jtkrogel opened this issue May 27, 2021 · 6 comments

Comments

@jtkrogel
Copy link
Contributor

The delay_rank parameter should be settable in the driver input. There are a few benefits to enabling this:

  • It will no longer (necessarily) be inherited as state between old wavefunction optimization runs and new VMC/DMC runs.
  • This will enable runtime optimization scans over subsequent VMC blocks (very similar to using variable target_walkers to optimize gpu performance). Better to do this in a single submission and not require multiple submissions.
  • This will enable a direct path to support this parameter in Nexus (w/o risking clobbering of user request via imported wavefunctions from prior runs).

This should be a simple feature to implement once there is time.

@prckent
Copy link
Contributor

prckent commented May 27, 2021

Alternative scheme: We write some code to auto-tune the delay rank and avoid needing to specify it at all apart from developer nerd runs. The code is then automagically near enough to optimal and there is no need to specify wavefunction updating parameters in the driver.

We want to avoid something like the pools and band group setting in QE or the nsim and ncpu tags in VASP that in my experience are approximately never set optimally by users.

@jtkrogel
Copy link
Contributor Author

I agree. One less hyperparameter to tune user side is a win all around in my book. This should become the default behavior eventually. Walker count performance tuning would be another good target.

Still, being able to vary delay_rank easily in the input until then is a good step.

@prckent
Copy link
Contributor

prckent commented May 27, 2021

Can you live with the setting in the wavefunction specification for now?

    <wavefunction name="psi0" target="e">
         <determinantset type="einspline" href="pwscf.pwscf.h5" tilematrix="2 0 0 0 1 0 0 0 1" twistnum="0" source="ion0" meshfactor="1.0" precision="double">
            <slaterdeterminant delay_rank="5">
               <determinant id="updet" size="8">
                  <occupation mode="ground" spindataset="0"/>
               </determinant>
               <determinant id="downdet" size="8">
                  <occupation mode="ground" spindataset="0"/>
               </determinant>
            </slaterdeterminant>
         </determinantset>
         <jastrow type="One-Body" name="J1" function="bspline" source="ion0" print="yes">

@jtkrogel
Copy link
Contributor Author

jtkrogel commented May 27, 2021

Sure. I probably just won't support it (well) in Nexus. That whole input block can get overwritten by wavefunction optimization runs.

I could write it to the input initially and basically give no guarantees. For simple Jastrow optimization, that might be fine. Thoughts?

@prckent
Copy link
Contributor

prckent commented May 27, 2021

Perhaps poll others on Slack? I am OK with the no guarantee route. Less work, more motivation to implement this code soon.

Is it Nexus doing the ignoring/overwriting or is it the writer of the wavefunction block XML that needs to be updated in QMCPACK with this flag though? (bug in QMCPACK if the latter, easy fix).

@jtkrogel
Copy link
Contributor Author

I will put in the "no guarantee" route for now.

QMCPACK is writing it out. Nexus copies the XML that is written out from a past optimization run into the current one, so the state in the prior run for delay_rank effectively sets it for the new one (this is the hazard of placing a driver parameter in the trial wavefunction). This will be true of the traditional <include/> route as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants