10.2.6. Removing old local storage foldersΒΆ
This demo shows how to delete local storage folders across the cluster using PyOPUS.
Do not run this demo if there are any PyOPUS tasks running on the cluster because it will delete the files in their local storage folders and the tasks will fail.
File 05-storage-cleanup.py in folder demo/parallel/vm/
# Demonstrates mirrored storage cleanup
import sys
from pyopus.parallel.mpi import MPI as VM
import funclib
import os
if __name__=='__main__':
vm=VM(debug=2)
# Clean up local storage on all machines in the virtual machine.
print("\nCleaning up.")
vm.clearLocalStorage(timeout=6.0)
vm.finalize()