This may be O/T. If so, either reply privately or not at all.
"objective function diverges to infinity."
How do you operationally define that? Detecting Inf -- e.g. 1/0, log(0),
etc -- is straightforward. But how do you know other than via math whether
iterations will continue to diverge or not?
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
Hello Giovanni,
I don't know if my workflow would suit you but I tend to want the
opposite when I launch a parallel process. I tend to want to keep the
processes alive as long as they can. If the computation time is long I
would not want to lose everything.
lapply..8 <- function(X,FUN,...){
m
Hey folks,
Is there any way to exit an mclapply early on error?
For example, in the following mclapply loop, I have to wait for all the
processes to finish before the error is returned.
```
mclapply(X = 1:12, FUN = function(x) {Sys.sleep(0.1); if(x == 4) stop()},
mc.cores = 4, mc.preschedule
4 matches
Mail list logo