From 26731a7ba82f13dcc1cc7afeaf06fbb208acf499 Mon Sep 17 00:00:00 2001 From: Thomas Kuntz Date: Mon, 15 Jul 2024 11:35:44 -0400 Subject: [PATCH] Fix variable scoping for multiple cores When running from the command line, the variable "current_args" needs to be exported. --- R/fit.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/fit.R b/R/fit.R index a17c235..42edcc5 100644 --- a/R/fit.R +++ b/R/fit.R @@ -208,6 +208,7 @@ fit.data <- { logging::loginfo("Creating cluster of %s R processes", cores) cluster <- parallel::makeCluster(cores) + if(exists("current_args")) clusterExport(cluster, "current_args") } ##############################