Mouse-Imaging-Centre / RMINC

Statistics for MINC volumes: A library to integrate voxel-based statistics for MINC volumes into the R environment. Supports getting and writing of MINC volumes, running voxel-wise linear models, correlations, etc.; correcting for multiple comparisons using the False Discovery Rate, and more. With contributions from Jason Lerch, Chris Hammill, Jim Nikelski and Matthijs van Eede. Some additional information can be found here:
https://mouse-imaging-centre.github.io/RMINC
Other
23 stars 17 forks source link

RMINC breaks parallel::parSapply() when using parallel::makeForkCluster() in R 4.1.3 #310

Open dnmacdon opened 2 years ago

dnmacdon commented 2 years ago

In R 4.1.3, I've noticed the following issue. It does not occur when using 3.5.1. Note that no RMINC functions are used - merely loading RMINC causes this to break.

This works:

library(parallel)
cl <- makeForkCluster( 2 )
result <- parSapply (cl, X=1:1000, FUN=function(x) x)
stopCluster(cl)

This does not:

library(parallel)
library(RMINC)
cl <- makeForkCluster( 2 )
result <- parSapply (cl, X=1:1000, FUN=function(x) x)
stopCluster(cl)

Fails with: Error in serialize(data, node$con, xdr = FALSE) : ignoring SIGPIPE signal