From c49b7a1151a5b1b34ae8eac4ae964d32773025a7 Mon Sep 17 00:00:00 2001 From: barate Date: Fri, 18 Feb 2011 10:42:17 +0000 Subject: [PATCH] Fixed nb_proc_per_node for LoadLeveler jobs --- src/LoadLeveler/Batch_BatchManager_eLL.cxx | 8 +++++--- src/LoadLeveler/Batch_BatchManager_eLL.hxx | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) 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; + }; } -- 2.39.2