[R] exiting mclapply early on error

Giovanni Righi gr|gh| @end|ng |rom ug@@edu
Tue Oct 13 02:44:23 CEST 2020


Thanks for the response, Jeremie. I wholeheartedly agree about testing.

In my case, this feature would be used purely to reduce computation time. I’m calculating
an expensive (and embarrassingly parallel) likelihood function, and for some parameter combinations 
my objective function diverges to infinity. In those instances, I’d like to throw an error that stops
subsequent computations and that I could catch to return a value of infinity. I agree, though, 
that the default should allow all processes to finish.

What I’ve suggested does not seem possible with mclapply(). Do you know how I could suggest 
this as a feature request to the maintainer of the parallel package?

Thanks,
Giovanni


More information about the R-help mailing list