From 467b2f53974533c129c2db0f02c03d058dceeb82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Todor=20Kondi=C4=87?= <kontrapunkt@uclmail.net> Date: Wed, 22 Feb 2023 10:44:31 +0100 Subject: [PATCH] runme: Add future control --- runme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runme b/runme index d4d3073..1a27894 100644 --- a/runme +++ b/runme @@ -1,12 +1,12 @@ #!/bin/Rscript -nthreads = Sys.getenv("SS_CPU") +nthreads = as.integer(Sys.getenv("SS_CPU")) mf_db_dir = Sys.getenv("SS_MF_DB_DIR") user = Sys.getenv("SS_USER") library(future) plan("sequential") -plan("multisession",workers=nthreads) +if (nthreads > 1L) plan("multisession",workers=nthreads) library(shinyscreen) carg = commandArgs(trailingOnly=T) eo = init(metfrag_db_dir=mf_db_dir) -- GitLab