Parallelization in R: how to “source” on every node?

后端 未结 2 1502
花落未央
花落未央 2021-02-09 21:51

I have created parallel workers (all running on the same machine) using:

MyCluster = makeCluster(8)

How can I make every of these 8 nodes sourc

2条回答
  •  终归单人心
    2021-02-09 22:51

    If you use a command to source a local file, ensure the file is there.

    Else place the file on a network share or NFS, and source the absolute path.

    Better still, and standard answers, write a package and have that package installed on each node and then just call library() or require().

提交回复
热议问题