Skip to content

Commit

Permalink
Fix variable scoping for multiple cores
Browse files Browse the repository at this point in the history
When running from the command line, the variable "current_args" needs to be exported.
  • Loading branch information
tkuntz-hsph authored Jul 15, 2024
1 parent 0256ed9 commit 26731a7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions R/fit.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

##############################
Expand Down

0 comments on commit 26731a7

Please sign in to comment.