Writing Wavefunction and Hamiltonian to Disk in Parallel DMRG

0 votes
asked Dec 2 by Zhiyu (300 points)
edited Dec 2 by Zhiyu

Hi Miles,

Thank you for your persistent effort to address our problems.

I can write Mps or Hamiltonian into disk in dmrg. However, I encountered problems when I want to do so in parallel dmrg program.

  1. In dmrg, I insert writeToFile() in DMRG_Worker in order to output wavefunction after each sweep. However, this approach no longer work in parallel dmrg. If I still do so, each cores only write the block of wavefunction sent to it, while the last core finishing the sweep will overwrite wavefunction stored before. Therefore, I cannot store a complete wavefunction for further measurement. So my Question is: is there any way to output the whole wavefunction collected from all cores at a time? And it would be the best if there is a way to output complete wavefuntion after each sweep.

  2. Besides, I also need to write Hamiltonian into disk to save memory. I tried to set WriteM in the arguments as I did in dmrg program, but the program stopped in the second sweep. I found the names of Hamiltonians written in the last sweep do not match the ones to be read in the next sweep. For example, in the output message I found :

    Tried to read file ./PH0pBYHg/PH002
    Missing file

    Similar for other PH's.
    I checked the directory PH0pBYHg/, the file name of PH inside is "PH003" . It seems that all the number given to PH when writing is 1 greater than the number in the name of the PH to be read.

    Is it a bug or there should be other ways to write Hamiltonian?

Thank you in advance.

Zhiyu

Please log in or register to answer this question.

Welcome to ITensor Support Q&A, where you can ask questions and receive answers from other members of the community.

Formatting Tips:
  • To format code, indent by four spaces
  • To format inline LaTeX, surround it by @@ on both sides
  • To format LaTeX on its own line, surround it by $$ above and below
  • For LaTeX, it may be necessary to backslash-escape underscore characters to obtain proper formatting. So for example writing \sum\_i to represent a sum over i.
If you cannot register due to firewall issues (e.g. you cannot see the capcha box) please email Miles Stoudenmire to ask for an account.

To report ITensor bugs, please use the issue tracker.
...