else if (!have_win) {# linux/mac values <- mclapply(levels(data_sample[[curStrata]]), function(x) { simulateValues( dataSample=data_sample[data_sample[[curStrata]]==x,], dataPop=data_pop[indStrata[[x]], c(predNames, simPopObj@pop@hhid, relation), with=FALSE], params ) }, mc.cores = max(nr_cores,length(levels(data_sample[[curStrata]])))) }
In this piece of code from simRelation(), mc.cores = max(...) causes Error in mcfork() : unable to create a pipe while running in Linux. I believe this is because the function is trying to allocate far more cores (than possible) based on the number of stratas. @bernhard-da , I think fixing it will simply require replacing max() with min().
else if (!have_win) {# linux/mac values <- mclapply(levels(data_sample[[curStrata]]), function(x) { simulateValues( dataSample=data_sample[data_sample[[curStrata]]==x,], dataPop=data_pop[indStrata[[x]], c(predNames, simPopObj@pop@hhid, relation), with=FALSE], params ) }, mc.cores = max(nr_cores,length(levels(data_sample[[curStrata]])))) }
In this piece of code from simRelation(), mc.cores = max(...) causes Error in mcfork() : unable to create a pipe while running in Linux. I believe this is because the function is trying to allocate far more cores (than possible) based on the number of stratas. @bernhard-da , I think fixing it will simply require replacing max() with min().