From: barate Date: Tue, 5 Nov 2013 13:43:39 +0000 (+0000) Subject: For "local" jobs, node file is filled with the number of cores required by the user... X-Git-Tag: V2_1_0rc1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c3db5f79c283f3914efff04f90bb392acf98b10f;p=tools%2Flibbatch.git For "local" jobs, node file is filled with the number of cores required by the user (no check) --- diff --git a/src/Local/BatchManager_Local.cxx b/src/Local/BatchManager_Local.cxx index 6aad951..5462347 100644 --- a/src/Local/BatchManager_Local.cxx +++ b/src/Local/BatchManager_Local.cxx @@ -321,6 +321,11 @@ namespace Batch { tempOutputFile << "ulimit -H -v " << maxramsize << endl; } + // Number of cores to use + int nbproc = 1; + if (param.find(NBPROC) != param.end()) + nbproc = param[NBPROC]; + // Define environment for the job Environnement env = job.getEnvironnement(); for (Environnement::const_iterator iter = env.begin() ; iter != env.end() ; ++iter) { @@ -329,7 +334,8 @@ namespace Batch { // generate nodes file tempOutputFile << "LIBBATCH_NODEFILE=`mktemp nodefile-XXXXXXXXXX`" << endl; - tempOutputFile << "echo `hostname` > $LIBBATCH_NODEFILE" << endl; + for (int i=0 ; i> $LIBBATCH_NODEFILE" << endl; tempOutputFile << "export LIBBATCH_NODEFILE" << endl; // Launch the executable