From: barate Date: Fri, 18 Feb 2011 10:42:17 +0000 (+0000) Subject: Fixed nb_proc_per_node for LoadLeveler jobs X-Git-Tag: V1_3_0rc1~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c49b7a1151a5b1b34ae8eac4ae964d32773025a7;p=tools%2Flibbatch.git Fixed nb_proc_per_node for LoadLeveler jobs --- diff --git a/src/LoadLeveler/Batch_BatchManager_eLL.cxx b/src/LoadLeveler/Batch_BatchManager_eLL.cxx index d0fca47..a04322a 100644 --- a/src/LoadLeveler/Batch_BatchManager_eLL.cxx +++ b/src/LoadLeveler/Batch_BatchManager_eLL.cxx @@ -44,7 +44,8 @@ namespace Batch { CommunicationProtocolType protocolType, const char * mpiImpl, int nb_proc_per_node) : BatchManager(parent, host), - BatchManager_eClient(parent, host, username, protocolType, mpiImpl) + BatchManager_eClient(parent, host, username, protocolType, mpiImpl), + _nb_proc_per_node(nb_proc_per_node) { // Nothing to do } @@ -157,9 +158,10 @@ namespace Batch { // tempOutputFile << "# @ job_type = serial" << endl; //else { // tempOutputFile << "# @ job_type = parallel" << endl; + int nodes_requested = (nbproc + _nb_proc_per_node -1) / _nb_proc_per_node; tempOutputFile << "# @ job_type = mpich" << endl; - tempOutputFile << "# @ node = " << nbproc << endl; - tempOutputFile << "# @ tasks_per_node = 1" << endl; + tempOutputFile << "# @ node = " << nodes_requested << endl; + tempOutputFile << "# @ tasks_per_node = " << _nb_proc_per_node << endl; //} //tempOutputFile << "# @ job_type = bluegene" << endl; diff --git a/src/LoadLeveler/Batch_BatchManager_eLL.hxx b/src/LoadLeveler/Batch_BatchManager_eLL.hxx index 3656f69..e5e67f8 100644 --- a/src/LoadLeveler/Batch_BatchManager_eLL.hxx +++ b/src/LoadLeveler/Batch_BatchManager_eLL.hxx @@ -62,6 +62,8 @@ namespace Batch { protected: std::string buildCommandFile(const Job & job); + int _nb_proc_per_node; + }; }