Skip to content

Refactoring mergeYodas

Christian Gutschow requested to merge memory_merge_yodas into release-3-1-x

This is a draft attempt to address #274 (closed):

  • mergeYodas now calls internally the new method mergeAOs which does what it says on the tin (in memory)
  • then it calls the new method loadAOs() to prepare the reentrant run / load the AOs back into memory, such that it can finally call the existing AH.finalize() to finish it off

To simplify MPI use, readData() has been overloaded to read data from either file or stream (so far only reading from yoda files was supported). A Boolean function argument preload has been added to readData() that by default preserves the current functionality: a subset of AOs from a file/stream is preloaded (used in the HION machinery). Setting preload = false can will call loadAOs() instead, which loads the entire AH state into memory.

Also highlighted an annotation bug (Thanks Steve!) where if pushToFinal() is called multiple times (e.g. when dumping mid-run) the "ScaledBy" annotation isn't cleared and so the final reported value will end up being the product of all ScaledBy values encountered along the run. Fixed by clearing all annotations of the final AOs at the start of pushToFinal().

Edited by Christian Gutschow

Merge request reports