Open etiennesky opened 5 years ago
If there is a crash, you want to be able to look at the logs.
Corollary: if there is a crash, the user must cleanup manually after having examined the logs.
Why not delete $SCRATCH/tmp_ecearth3
all at once? Nothing there is supposed to be kept.
It is possible that clean up upon success is not perfect. Haven't check, but should be fixed if that's the case.
Also note #39, which is (remotely) related.
Hi Philippe
I think the cleanup upon success is only missing one part, the removal of the directory.
about your corolarry... users are lazy so the files will usually be left behind.
you suggestion to delete $SCRATCH/tmp_ecearth3 all at once is tempting, but you might end up deleting files during an ece3-postproc process is active
Not sure what is the best approach.
I think the best approach is to have a tmpdir which is unique for the experiment, so you can delete it when you are finished
Yes, probably the easiest way to go.
Hi, Pablo from BSC reports that lots of temporary files remain after running ece3-postproc. Some of the folders are quite large, which happens after the scripts crash. It seems that folder created by mktemp are not automatically deleted.
As a workaround, we could put them in a unique folder (e.g. $SCRATCH/tmp_ecearth3/$expid) and delete that folder later on.
Probably a better solution is to create the folder in $TMPDIR instead of $SCRATCH, so when the job finishes the files are deleted. But this has the drawback that in case of an error the files are not around for debugging. Also it might be platform dependent, so we could define the top-level folder in the conf/ files.
But a drawback to this is that the files might not be available for debugging (also platform dependent).
Any thoughts @plesager @pabretonniere @mcastril @aearamos ?