]> SALOME platform Git repositories - tools/libbatch.git/commitdiff
Salome HOME
Added environment for LoadLeveler jobs
authorbarate <barate>
Tue, 30 Nov 2010 10:29:25 +0000 (10:29 +0000)
committerbarate <barate>
Tue, 30 Nov 2010 10:29:25 +0000 (10:29 +0000)
src/LoadLeveler/Batch_BatchManager_eLL.cxx

index 9044a96bad0fd91c919b1f026afc511e87226376..66282284fceced3a9deea57027c922fb7c0dfac2 100644 (file)
@@ -149,6 +149,18 @@ namespace Batch {
     tempOutputFile << "# @ error = " << workDir << "/logs/error.log." << rootNameToExecute << endl;
     if (queue != "")
       tempOutputFile << "# @ class = " << queue << endl;
+
+    // Define environment for the job
+    Environnement env = job.getEnvironnement();
+    if (!env.empty()) {
+      tempOutputFile << "# @ environment = ";
+      Environnement::const_iterator iter;
+      for (iter = env.begin() ; iter != env.end() ; ++iter) {
+        tempOutputFile << iter->first << "=" << iter->second << "; ";
+      }
+      tempOutputFile << endl;
+    }
+
     tempOutputFile << "# @ job_type = bluegene" << endl;
     tempOutputFile << "# @ queue" << endl;