I would like to increase the niceness of my cluster jobs. The following code is successful:
> cl <- makePSOCKcluster(rep('localhost', 2))
> clusterEvalQ(cl = cl, rnorm(3))
[[1]]
[1] -0.6452848 -0.9899609 0.3083131
[[2]]
[1] 1.1687733 -0.1930413 1.1576510
This, however, is not.
cl <- makePSOCKcluster(names = rep('localhost', 8), renice = 15)
nice: +15: No such file or directory
I am able to set the niceness after cluster creation using the following code:
clusterEvalQ(cl = cl, tools::psnice(value = 15))
After reading the documentation for makePSOCKcluster
, I'm not sure what I'm doing wrong in the cluster creation step, and have been unable to track down the issue. How can I create a cluster and set the niceness of the worker threads all at the same time?