質問

I have some non-parallel code that I would like to parallelize. The code should be embarrassingly parallelizeable except for file operations (multiple files are written to and which file to write is somewhat stochastic and could potentially be the same in different processors). With the doMC and foreach packages, do I have to handle file locking or is it already handled by the package? I am not tied to doMC, I selected it because I will still be making a lot of changes to my code and it seems simple to work with.

役に立ちましたか?

解決

I have not found a solution for the general problem. There appears to be a solution in:

Is there a way to share a lock (e.g. a lock file) between R processes?

and this could be considered a duplicate of that.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top