From: barate Date: Tue, 30 Nov 2010 16:39:14 +0000 (+0000) Subject: Added MAXWALLTIME parameter for LoadLeveler X-Git-Tag: V1_3_0rc1~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3d1197f046be2848fd0cd9b90f7d2cd5afd98baf;p=tools%2Flibbatch.git Added MAXWALLTIME parameter for LoadLeveler --- diff --git a/src/LoadLeveler/Batch_BatchManager_eLL.cxx b/src/LoadLeveler/Batch_BatchManager_eLL.cxx index 28ed73c..3b348fd 100644 --- a/src/LoadLeveler/Batch_BatchManager_eLL.cxx +++ b/src/LoadLeveler/Batch_BatchManager_eLL.cxx @@ -125,15 +125,11 @@ namespace Batch { if (params.find(WORKDIR) != params.end()) workDir = params[WORKDIR].str(); else - throw EmulationException("params[WORKDIR] is not defined ! Please defined it, cannot submit this job"); + throw EmulationException("params[WORKDIR] is not defined. Please define it, cannot submit this job."); if (params.find(EXECUTABLE) != params.end()) fileToExecute = params[EXECUTABLE].str(); else - throw EmulationException("params[EXECUTABLE] is not defined ! Please defined it, cannot submit this job"); - - // Optional parameters - if (params.find(QUEUE) != params.end()) - queue = params[QUEUE].str(); + throw EmulationException("params[EXECUTABLE] is not defined. Please define it, cannot submit this job."); string::size_type p1 = fileToExecute.find_last_of("/"); string::size_type p2 = fileToExecute.find_last_of("."); @@ -147,8 +143,12 @@ namespace Batch { tempOutputFile << "#!/bin/bash" << endl; tempOutputFile << "# @ output = " << workDir << "/logs/output.log." << rootNameToExecute << endl; tempOutputFile << "# @ error = " << workDir << "/logs/error.log." << rootNameToExecute << endl; - if (queue != "") - tempOutputFile << "# @ class = " << queue << endl; + + // Optional parameters + if (params.find(MAXWALLTIME) != params.end()) + tempOutputFile << "# @ wall_clock_limit = " << params[MAXWALLTIME] << ":00" << endl; + if (params.find(QUEUE) != params.end()) + tempOutputFile << "# @ class = " << params[QUEUE] << endl; // Define environment for the job Environnement env = job.getEnvironnement();