mschubert / clustermq

R package to send function calls as jobs on LSF, SGE, Slurm, PBS/Torque, or each via SSH
https://mschubert.github.io/clustermq/
Apache License 2.0
145 stars 26 forks source link

`max_calls_worker` argument is not functional #322

Closed mschubert closed 7 months ago

mschubert commented 7 months ago

The following should work, but is broken with the current CRAN and git version:

table(unlist(clustermq::Q(function(x) { Sys.sleep(x==1); Sys.getpid() }, x=1:4, n_jobs=2)))
# workers do 1 and 3 tasks, respectively
table(unlist(clustermq::Q(function(x) { Sys.sleep(x==1); Sys.getpid() }, x=1:4, n_jobs=2, max_calls_worker=2)))
# both workers should do 2 tasks: >> BROKEN ON 0.9.0

Originally posted by @mschubert in https://github.com/mschubert/clustermq/issues/309#issuecomment-1764873407