Salome HOME
Fixed nb_proc_per_node for LoadLeveler jobs
authorbarate <barate>
Fri, 18 Feb 2011 10:42:17 +0000 (10:42 +0000)
committerbarate <barate>
Fri, 18 Feb 2011 10:42:17 +0000 (10:42 +0000)
src/LoadLeveler/Batch_BatchManager_eLL.cxx
src/LoadLeveler/Batch_BatchManager_eLL.hxx

index d0fca4754e86203b43a959a97333a2d310d7a76e..a04322add4eb6e1e2c32ec4a9af0f44d647a93b4 100644 (file)
@@ -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;
 
index 3656f6987ef9726b94cc02d3ff8f108730637ba5..e5e67f84e374710114845b302797a550e21e6d4c 100644 (file)
@@ -62,6 +62,8 @@ namespace Batch {
   protected:
     std::string buildCommandFile(const Job & job);
 
+    int _nb_proc_per_node;
+
   };
 
 }