snudda.utils.cleanup

snudda.utils.cleanup.cleanup(rc, state)[source]

When place, detect, prune are run one after the other, we do not need to keep them all in memory at the same time. As one finishes, we can clear the memory.

Parameters
  • rc – ipyparallel remote client

  • state – State to free memory (e.g. “place”, “detect”, “project”, “prune”

snudda.utils.cleanup.cleanup_memory(d_view, variable_list)[source]

Clear variables in variable_list on workers specified by d_view.

Parameters
  • d_view – ipyparallel direct view

  • variable_list – list of variables to clear