From c341ce3797648605566c3506d837ba709da1ae26 Mon Sep 17 00:00:00 2001 From: Ovidiu Mircescu Date: Wed, 27 Jan 2021 16:44:24 +0100 Subject: [PATCH] Use NBNODE with PBS. --- src/PBS/BatchManager_PBS.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/PBS/BatchManager_PBS.cxx b/src/PBS/BatchManager_PBS.cxx index c3cf644..265c6ec 100644 --- a/src/PBS/BatchManager_PBS.cxx +++ b/src/PBS/BatchManager_PBS.cxx @@ -154,9 +154,18 @@ namespace Batch { int nbproc = 1; if (params.find(NBPROC) != params.end()) nbproc = params[NBPROC]; - int nbprocpernode = 1; + int nbprocpernode = 0; if (params.find(NBPROCPERNODE) != params.end()) nbprocpernode = params[NBPROCPERNODE]; + int nbnode = 0; + if (params.find(NBNODE) != params.end()) + { + nbnode = params[NBNODE]; + if(nbnode > 0 && nbprocpernode == 0) + nbprocpernode = nbproc / nbnode; + } + if(nbprocpernode == 0) // if not defined + nbprocpernode = 1; int edt = 0; if (params.find(MAXWALLTIME) != params.end()) edt = params[MAXWALLTIME]; -- 2.39.2