HUJI-Deep / FlowKet

A framework based on Tensorflow for running variational Monte-Carlo simulations of quantum many-body systems.
MIT License
37 stars 11 forks source link

Running Flowket under CPU parallelization with MPI #18

Closed NnktYoshioka closed 3 years ago

NnktYoshioka commented 4 years ago

Hi,

Walking through the examples such as this code, I noticed that we can speed up the sampling by using GPUs. I am not an expert of tensorflow or Horovod, but from the website of Horovod I understand that it is capable of calculation using MPI.

May I ask if it is possible to run flowket codes without GPU but with CPU parallelization using MPI? If so, how shall I modify the codes? (I do not have GPU machines right now, so wanted to know if my current environment in supercomputers are fine)

Thank you very much for your help in advance.

Best regards, Nobu

noamwies commented 4 years ago

The example name "heisenberg_2d_horvod_multy_gpu_fast_sampling.py" is slightly misleading, actually the parallelism is for the entire training steps (and not only the sampling).

I never tried to run Flowket on CPU clusters but from here it seem that it's possible.

Regarding the example, please look at the updated version that average the energy over the MPI cluster, if you plan to use StochasticReconfiguration you should add similar logic to ComplexValuesStochasticReconfiguration