euba / BacArena

agent based modelling
GNU General Public License v3.0
26 stars 11 forks source link

Fatal error: cannot create 'R_TempDir' Error in makePSOCKcluster(names = spec, ...) : Cluster setup failed. 2 of 2 workers failed to connect. Calls: simEnv ... diffuse_par -> diffuse_par -> <Anonymous> -> makePSOCKcluster Timing stopped at: 0.004 0.082 240.4 Execution halted #188

Open arijitnus opened 1 year ago

arijitnus commented 1 year ago

I am trying to run the following command for three replicates of the same simulation with a single model:

library(BacArena)
library(sybil)
library(parallel)
library(data.table)
set.seed(1231)
sybil::SYBIL_SETTINGS("SOLVER","cplexAPI")
er <- readRDS("Atlantibacter.RDS")

er@mod_desc <- "Atlanti"
eure <- Bac(er,limit_growth=F,setAllExInf=T)
arena <- Arena(n = 50, m = 50,stir=F)

arena <- addOrg(arena, eure, amount = 2)

arena_subs <- fread("custom_MS_media_ARE.csv") # same as gapfill medium
arena_subs[, ex.rxn := paste0("EX_", compounds, "_e0")]

arena <- addSubs(arena, smax = 1,
                 mediac = arena_subs$ex.rxn, unit = "mM", addAnyway = T,)
CF_sim1<-simEnv(arena,time=25, sec_obj = "mtf",diff_par=T)
CF_sim2<-simEnv(arena,time=25, sec_obj = "mtf",diff_par=T)
CF_sim3<-simEnv(arena,time=25, sec_obj = "mtf",diff_par=T)

saveRDS(CF_sim1,'Atlanti1.RDS')
saveRDS(CF_sim2,'Atlanti2.RDS')
saveRDS(CF_sim3,'Atlanti3.RDS')

Erorr: Loading required package: cplexAPI Fatal error: cannot create 'R_TempDir' Error in makePSOCKcluster(names = spec, ...) : Cluster setup failed. 2 of 2 workers failed to connect. Calls: simEnv ... diffuse_par -> diffuse_par -> -> makePSOCKcluster Timing stopped at: 0.004 0.082 240.4 Execution halted

arijitnus commented 1 year ago

Feel this is some parallel computing issues in the cluster