qmctorch.solver.solver_slater_jastrow_horovod module
- class qmctorch.solver.solver_mpi.SolverMPI(wf=None, sampler=None, optimizer=None, scheduler=None, output=None, rank=0)[source]
Bases:
Solver
Distributed QMC solver
- Parameters:
wf (qmctorch.WaveFunction, optional) – wave function. Defaults to None.
sampler (qmctorch.sampler, optional) – Sampler. Defaults to None.
optimizer (torch.optim, optional) – optimizer. Defaults to None.
scheduler (torch.optim, optional) – scheduler. Defaults to None.
output (str, optional) – hdf5 filename. Defaults to None.
rank (int, optional) – rank of he process. Defaults to 0.
- run(nepoch, batchsize=None, loss='energy', clip_loss=False, grad='manual', hdf5_group='wf_opt', num_threads=1, chkpt_every=None)[source]
Run the optimization
- Parameters:
nepoch (int) – Number of optimization step
batchsize (int, optional) – Number of sample in a mini batch. If None, all samples are used. Defaults to None.
loss (str, optional) – method to compute the loss: variance or energy. Defaults to ‘energy’.
clip_loss (bool, optional) – Clip the loss values at +/- 5std. Defaults to False.
grad (str, optional) – method to compute the gradients: ‘auto’ or ‘manual’. Defaults to ‘auto’.
hdf5_group (str, optional) – name of the hdf5 group where to store the data. Defaults to ‘wf_opt’