* Auteur : Bernard SECHER - CEA DEN
* Mail : mailto:bernard.secher@cea.fr
* Date : Thu Apr 24 10:17:22 2008
- * Projet : PAL Salome
+ * Projet : PAL Salome
*
*/
FILE *fp = fopen(logFile.c_str(),"r");
fgets( line, 128, fp);
fclose(fp);
-
+
string sline(line);
int pos = sline.find(".");
string strjob;
int ref;
istringstream iss(jobid.getReference());
iss >> ref;
-
+
// define command to submit batch
string command;
command = _protocol;
cerr << "jobId = " << ref << "killed" << endl;
}
-
+
// Methode pour le controle des jobs : suspend un job en file d'attente
void BatchManager_ePBS::holdJob(const JobId & jobid)
{
throw EmulationException("Not yet implemented");
}
- void BatchManager_ePBS::buildBatchScript(const Job & job) throw(EmulationException)
+ void BatchManager_ePBS::buildBatchScript(const Job & job)
{
#ifndef WIN32 //TODO: need for porting on Windows
int status;
rootNameToExecute = "command";
}
- std::string TmpFileName = BuildTemporaryFileName();
ofstream tempOutputFile;
- tempOutputFile.open(TmpFileName.c_str(), ofstream::out );
+ std::string TmpFileName = createAndOpenTemporaryFile(tempOutputFile);
tempOutputFile << "#! /bin/sh -f" << endl;
if (queue != "")
tempOutputFile << "source " << env["SOURCEFILE"] << endl ;
tempOutputFile << env["COMMAND"];
}
-
+
tempOutputFile.flush();
tempOutputFile.close();
#ifdef WIN32
cerr << command.c_str() << endl;
status = system(command.c_str());
if(status)
- throw EmulationException("Error of connection on remote host");
+ throw EmulationException("Error of connection on remote host");
- RmTmpFile(TmpFileName);
-#endif
+ remove(TmpFileName.c_str());
+#endif
}
}