X-Git-Url: http://git.salome-platform.org/gitweb/?p=tools%2Flibbatch.git;a=blobdiff_plain;f=src%2FLoadLeveler%2FBatch_BatchManager_eLL.cxx;h=fc84e50da5f2b4b1bbdee5b97371e619df0f0eca;hp=66282284fceced3a9deea57027c922fb7c0dfac2;hb=8f7a88a255513d7a767ea69de0216ccd91007c4a;hpb=f4cdf1853ce02d04f9649d640b391dc6300b41da diff --git a/src/LoadLeveler/Batch_BatchManager_eLL.cxx b/src/LoadLeveler/Batch_BatchManager_eLL.cxx index 6628228..fc84e50 100644 --- a/src/LoadLeveler/Batch_BatchManager_eLL.cxx +++ b/src/LoadLeveler/Batch_BatchManager_eLL.cxx @@ -144,7 +144,7 @@ namespace Batch { ofstream tempOutputFile; string tmpFileName = createAndOpenTemporaryFile("LL-script", tempOutputFile); - tempOutputFile << "# @ executable = " << fileNameToExecute << endl; + tempOutputFile << "#!/bin/bash" << endl; tempOutputFile << "# @ output = " << workDir << "/logs/output.log." << rootNameToExecute << endl; tempOutputFile << "# @ error = " << workDir << "/logs/error.log." << rootNameToExecute << endl; if (queue != "") @@ -164,6 +164,17 @@ namespace Batch { tempOutputFile << "# @ job_type = bluegene" << endl; tempOutputFile << "# @ queue" << endl; + // generate nodes file + tempOutputFile << "NODEFILE=`mktemp nodefile-XXXXXXXXXX` || exit 1" << endl; + tempOutputFile << "for node in $LOADL_PROCESSOR_LIST; do" << endl; + tempOutputFile << " echo $node >> $NODEFILE" << endl; + tempOutputFile << "done" << endl; + tempOutputFile << "export LIBBATCH_NODEFILE=$NODEFILE" << endl; + + // Launch the executable + tempOutputFile << "cd " << workDir << endl; + tempOutputFile << "./" + fileNameToExecute << endl; + tempOutputFile.flush(); tempOutputFile.close();