Jiaxin-Fan / ASEP

8 stars 3 forks source link

cluster setup failed #5

Open ghost opened 3 years ago

ghost commented 3 years ago

Hi Jiaxin,

I set parallel = T, and then run for a test. It turns out there is one error in parallel running. I want to ask how many cores/threads the function will ask for when set parallel = T.

There is the error output information:

Error in makePSOCKcluster(names = spec, ...) : Cluster setup failed. 8 of 8 workers failed to connect.

Thanks!

Meiyuan

Jiaxin-Fan commented 3 years ago

Hi Meiyuan,

I am using r package Parallel for the parallel computing and uses the number of cores available on the computer. I have not ever faced this problem when running the code on my computer. Not sure how it happens, but seems to be related to recent update in RStudio + R 4.0.0 on Mac ox (see https://github.com/rstudio/rstudio/issues/6692). I do not have an easy solution for that. One suggestion is maybe you can run the r script of my source code and changed the code 'clus=makeCluster(n_core)' accordingly. Hope that help!

Best, Jiaxin

ghost commented 3 years ago

Hi Jiaxin,

Just a suggestion. Why don't you let the user set their working cores by giving an argument in the function to initiate customized cores? I just tried to modify your script but it's not an efficient way for future users.

Best, Meiyuan