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.
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.
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
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.