privefl / bigsnpr

R package for the analysis of massive SNP arrays.
https://privefl.github.io/bigsnpr/
196 stars 44 forks source link

Error in makePSOCKcluster when calling snp_ldpred2_auto #500

Closed shachideshpande closed 6 months ago

shachideshpande commented 6 months ago

When I call snp_ldpred2_auto with varying h2 and p, I am suddenly getting the error below (this error did not occur previously when I used snp_ldpred2_auto)

Error in makePSOCKcluster(names = spec, ...) :
  Cluster setup failed. 29 of 29 workers failed to connect.
Calls: snp_ldpred2_auto -> <Anonymous> -> <Anonymous> -> makePSOCKcluster
Execution halted

When I search this error type, I see that this is a suggested solution cl <- parallel::makeCluster(2, setup_strategy = "sequential")

What could be the reason for this issue? Happy to provide you more information/logs.

privefl commented 6 months ago

"When I call snp_ldpred2_auto with varying h2 and p" -> are you talking about LDpred2-grid instead?

I've never heard of this problem before. Do you have a Mac and R >= 4.0? So, I guess simply running cl <- parallel::makeCluster(2) fails? I guess the second workaround is better because you do not have to modify each piece of code (which you cannot do when using others' packages). They also mention that you can also simply try updating RStudio.

Anyway, this is not really a problem with my package, but a bug between certain versions of RRStudioMac.

shachideshpande commented 6 months ago

Hi Florian,

I am talking about snp_ldpred2_auto itself (varying h2 and p are in the context of simulation parameters, sorry for the confusion!)

I am running these experiments on Linux and this is the information printed against version

               _                           
platform       x86_64-conda-linux-gnu      
arch           x86_64                      
os             linux-gnu                   
system         x86_64, linux-gnu           
status                                     
major          4                           
minor          3.2                         
year           2023                        
month          10                          
day            31                          
svn rev        85441                       
language       R                           
version.string R version 4.3.2 (2023-10-31)
nickname       Eye Holes

Thank you for confirming that this is likely a version issue and not an issue with the package. If updating doesn't solve this, I will reopen the issue.