Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dopar .errorhandling options are not working #164

Open
statquant opened this issue Jul 13, 2019 · 1 comment
Open

dopar .errorhandling options are not working #164

statquant opened this issue Jul 13, 2019 · 1 comment

Comments

@statquant
Copy link

Using clustermq as a foreach backend does not work as expected.
Typically the very important .errorhandling option does not seem to work, when .errorhandling = "pass" any error happening on the slave process should come back as an error object and all other results should be returned to the user.
It seems it is not working as per bellow

library(clustermq)                                                                      
foo <- function(i)                                                                      
{                                                                                       
    if (i == 1)                                                                         
        return(10)                                                                      
    else if (i == 2)                                                                    
        return(20)                                                                      
    else                                                                                
        stop("nope...")                                                                 
}                                                                                       
register_dopar_cmq(n_jobs = 5, memory = 40*1024, template = list(partition = partition))
                                                                                        
res <- foreach(x_i = 1:3, .errorhandling = "pass") %dopar% foo(x_i)                     
#Master: [0.7s 18.4% CPU]; Worker: [avg 87.3% CPU, max 232.8 Mb]                        
#Error in summarize_result(job_result, n_errors, n_warnings, cond_msgs,  :              
#                           1/3 jobs failed (0 warnings). Stopping.                     
#                           (Error #3) nope...     

Many thanks for this great package, it helps tremendously

@mschubert
Copy link
Owner

Yes, .errorhandling is not supported but should be.

Thank you for your interest in the package, it's nice to see it used!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants