I2PC / scipion

Scipion is an image processing framework to obtain 3D models of macromolecular complexes using Electron Microscopy (3DEM)
http://scipion.i2pc.es
Other
76 stars 47 forks source link

Preserve tmp folder for failing protocols #2016

Closed DStrelak closed 3 years ago

DStrelak commented 5 years ago

Is your feature request related to a problem? Please describe. While debugging / testing protocols, it happens that something goes wrong. Since the tmp folder is deleted every time, it is hard to reproduce the issue.

Describe the solution you'd like Ideally, tmp folder should be preserved till the moment the protocol successfully finishes (for streamed protocols, this can be e.g. checked at the end of each iteration). Only once the protocol finishes properly, tmp folder can be safely deleted.

Describe alternatives you've considered I know I can export SCIPION_DEBUG_NOCLEAN=1. However, I don't consider this to be a alternative option, as I have to do it a priory of the protocol failure. If it fails after several hours of computation, it takes a lot of time to debug.

azazellochg commented 3 years ago

I think this is done already in pw/protocol/protocol.py:

        elif not self.isFailed():
            self.info('Cleaning temp folder....')
            self.cleanTmp()