detectCores bug fix for single-core machine

This commit is contained in:
Roland Hollós 2022-11-22 09:18:29 +01:00
parent 213d6c6439
commit 1ed33a5d13

View File

@ -12,7 +12,7 @@ calibrateMuso <- function(measuredData, parameters =read.csv("parameters.csv", s
skipSpinup = TRUE, plotName = "calib.jpg",
modifyOriginal=TRUE, likelihood, uncertainity = NULL,
naVal = NULL, postProcString = NULL,
thread_prefix="thread", numCores = (parallel::detectCores()-1), pb = txtProgressBar(min=0, max=iterations, style=3),
thread_prefix="thread", numCores = max(c(parallel::detectCores()-1,1)), pb = txtProgressBar(min=0, max=iterations, style=3),
maxLikelihoodEpc=TRUE,
pbUpdate = setTxtProgressBar, outputLoc="./", method="GLUE",lg = FALSE, w=NULL, ...){