-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
namespace Batch {
BatchManager_eLSF::BatchManager_eLSF(const FactBatchManager * parent, const char * host,
+ const char * username,
CommunicationProtocolType protocolType, const char * mpiImpl)
- : BatchManager_eClient(parent, host, protocolType, mpiImpl),
+ : BatchManager_eClient(parent, host, username, protocolType, mpiImpl),
BatchManager(parent, host)
{
// Nothing to do
return id;
}
+ // Ce manager permet de faire de la reprise
+ const Batch::JobId
+ BatchManager_eLSF::addJob(const Batch::Job & job, const std::string reference)
+ {
+ return JobId(this, reference);
+ }
+
// Methode pour le controle des jobs : retire un job du gestionnaire
void BatchManager_eLSF::deleteJob(const JobId & jobid)
{
tempOutputFile << "cd " << workDir << endl ;
// generate nodes file
+ tempOutputFile << "NODEFILE=`mktemp nodefile-XXXXXXXXXX` || exit 1" << endl;
tempOutputFile << "bool=0" << endl;
tempOutputFile << "for i in $LSB_MCPU_HOSTS; do" << endl;
tempOutputFile << " if test $bool = 0; then" << endl;
tempOutputFile << " bool=1" << endl;
tempOutputFile << " else" << endl;
tempOutputFile << " for ((j=0;j<$i;j++)); do" << endl;
- tempOutputFile << " echo $n >> nodesFile" << endl;
+ tempOutputFile << " echo $n >> $NODEFILE" << endl;
tempOutputFile << " done" << endl;
tempOutputFile << " bool=0" << endl;
tempOutputFile << " fi" << endl;
tempOutputFile << "done" << endl;
// Abstraction of PBS_NODEFILE - TODO
- tempOutputFile << "export LIBBATCH_NODEFILE=nodesFile" << endl;
+ tempOutputFile << "export LIBBATCH_NODEFILE=$NODEFILE" << endl;
// Launch the executable
tempOutputFile << "./" + fileNameToExecute << endl;
+
+ // Remove the node file
+ tempOutputFile << "rm $NODEFILE" << endl;
+
tempOutputFile.flush();
tempOutputFile.close();