I am running doMPI on an HPC and I would like to log output from workers. Using doParallel, I was able to use makeCluster(outfile='myfile.log')
. With doMPI, there does not seem to be an outfile
argument in any of the methods. I tried using sinkWorkerOutput()
. This works, but only wrote the log for one of the workers. I suspect that each worker is overwriting the other. Is there an analog for outfile
for doMPI?
A related question - inside of a worker, can I find the worker number?
EDIT: here is a link to an answer discussing how to use outfile: How can I print when using %dopar%
Thank you for your help,
Ben