From 1ed33a5d136ad94625655b2b0f975b26d924fe27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20Holl=C3=B3s?= Date: Tue, 22 Nov 2022 09:18:29 +0100 Subject: [PATCH] detectCores bug fix for single-core machine --- RBBGCMuso/R/calibrateMuso.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RBBGCMuso/R/calibrateMuso.R b/RBBGCMuso/R/calibrateMuso.R index 3748e62..87a9ee5 100644 --- a/RBBGCMuso/R/calibrateMuso.R +++ b/RBBGCMuso/R/calibrateMuso.R @@ -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, ...){