microsoft / aiida-dynamic-workflows

An AiiDA plugin for dynamically defining workflows using Python functions
MIT License
17 stars 4 forks source link

Add utilities for detecting and remove unreferenced remote data #11

Closed jbweston closed 2 years ago

jbweston commented 2 years ago

Dynamic workflows typically leave all data as RemoteData, so that it may be passed between calculations without expensive data transfers.

A disadvantage of this approach is that removing entries from the Aiida database will not clean up all the associated data (which actually lives on the remote computer). Additionally, as the canonical location for the data is the working directory of the calculation that produced it, users cannot remove the calculation working directory wholesale.

This PR adds utilities for detecting which calculation working directories are no longer referenced by any RemoteData nodes in the Aiida database, and for efficiently removing those directories in parallel.