gvegayon / parallel

PARALLEL: Stata module for parallel computing
https://rawgit.com/gvegayon/parallel/master/ado/parallel.html
MIT License
118 stars 26 forks source link

Use preserve to auto-recover from errors #45

Closed bquistorff closed 8 years ago

bquistorff commented 8 years ago

Currently, in places like parallel_do, parallel_bs, parallel_sim, when there are errors we try to reload the dataset. This is both cumbersome (we need capture error, load dta, then delete temporary variables) and can cause small errors (I remember that depending on the error, we'd drop the sortedby). I think we should make use of the preserve as this will do the recovery automatically. I think once we've put together the results from the children we can cancel the preserved data with restore, not

gvegayon commented 8 years ago

Could you point out the parts of the code in which such happens specifically?

bquistorff commented 8 years ago

For example in parallel.ado, on error, we reload - clean-up, reload - clean-up, and in parallel_spliter similar clean-up,

bquistorff commented 8 years ago

Done in fd81aea.