*/
interface SalomeLauncher
{
+ long submitJob( in string xmlExecuteFile,
+ in string clusterName ) raises (SALOME::SALOME_Exception);
long submitSalomeJob( in string fileToExecute,
in FilesList filesToExport,
in FilesList filesToImport,
// Second step : copy fileToExecute into
// batch tmp files directory
- command = copy_command;
- command += string(params[EXECUTABLE]);
- command += " ";
- if(_username != ""){
- command += _username;
- command += "@";
- }
- command += _hostname;
- command += ":";
- command += string(params[TMPDIR]);
- cerr << command.c_str() << endl;
- status = system(command.c_str());
- if(status) {
- std::ostringstream oss;
- oss << status;
- std::string ex_mess("Error of connection on remote host ! status = ");
- ex_mess += oss.str();
- throw EmulationException(ex_mess.c_str());
+ string executeFile = params[EXECUTABLE];
+ if( executeFile.size() > 0 ){
+ command = copy_command;
+ command += string(params[EXECUTABLE]);
+ command += " ";
+ if(_username != ""){
+ command += _username;
+ command += "@";
+ }
+ command += _hostname;
+ command += ":";
+ command += string(params[TMPDIR]);
+ cerr << command.c_str() << endl;
+ status = system(command.c_str());
+ if(status) {
+ std::ostringstream oss;
+ oss << status;
+ std::string ex_mess("Error of connection on remote host ! status = ");
+ ex_mess += oss.str();
+ throw EmulationException(ex_mess.c_str());
+ }
}
// Third step : copy filesToExportList into
Parametre params = job.getParametre();
const std::string dirForTmpFiles = params[TMPDIR];
const string fileToExecute = params[EXECUTABLE];
- string::size_type p1 = fileToExecute.find_last_of("/");
- string::size_type p2 = fileToExecute.find_last_of(".");
- std::string fileNameToExecute = fileToExecute.substr(p1+1,p2-p1-1);
+ std::string fileNameToExecute;
+ if( fileToExecute.size() > 0 ){
+ string::size_type p1 = fileToExecute.find_last_of("/");
+ string::size_type p2 = fileToExecute.find_last_of(".");
+ fileNameToExecute = fileToExecute.substr(p1+1,p2-p1-1);
+ }
+ else
+ fileNameToExecute = "command";
// export input files on cluster
exportInputFiles(job);
{
int status;
Parametre params = job.getParametre();
+ Environnement env = job.getEnvironnement();
const int nbproc = params[NBPROC];
const long edt = params[MAXWALLTIME];
const long mem = params[MAXRAMSIZE];
const string workDir = params[WORKDIR];
const std::string dirForTmpFiles = params[TMPDIR];
const string fileToExecute = params[EXECUTABLE];
- string::size_type p1 = fileToExecute.find_last_of("/");
- string::size_type p2 = fileToExecute.find_last_of(".");
- std::string rootNameToExecute = fileToExecute.substr(p1+1,p2-p1-1);
- std::string fileNameToExecute = "~/" + dirForTmpFiles + "/" + string(basename(fileToExecute.c_str()));
-
- int idx = dirForTmpFiles.find("Batch/");
- std::string filelogtemp = dirForTmpFiles.substr(idx+6, dirForTmpFiles.length());
+ std::string rootNameToExecute;
+ std::string fileNameToExecute;
+ std::string filelogtemp;
+ if( fileToExecute.size() > 0 ){
+ string::size_type p1 = fileToExecute.find_last_of("/");
+ string::size_type p2 = fileToExecute.find_last_of(".");
+ rootNameToExecute = fileToExecute.substr(p1+1,p2-p1-1);
+ fileNameToExecute = "~/" + dirForTmpFiles + "/" + string(basename(fileToExecute.c_str()));
+
+ int idx = dirForTmpFiles.find("Batch/");
+ filelogtemp = dirForTmpFiles.substr(idx+6, dirForTmpFiles.length());
+ }
+ else{
+ rootNameToExecute = "command";
+ }
std::string TmpFileName = BuildTemporaryFileName();
ofstream tempOutputFile;
if( mem > 0 )
tempOutputFile << "#BSUB -M " << mem*1024 << endl ;
tempOutputFile << "#BSUB -n " << nbproc << endl ;
- tempOutputFile << "#BSUB -o runSalome.output.log." << filelogtemp << endl ;
- tempOutputFile << "#BSUB -e runSalome.error.log." << filelogtemp << endl ;
+ if( fileToExecute.size() > 0 ){
+ tempOutputFile << "#BSUB -o output.log." << filelogtemp << endl ;
+ tempOutputFile << "#BSUB -e error.log." << filelogtemp << endl ;
+ }
+ else{
+ tempOutputFile << "#BSUB -o " << env["LOGFILE"] << ".output.log" << endl ;
+ tempOutputFile << "#BSUB -e " << env["LOGFILE"] << ".error.log" << endl ;
+ }
if( workDir.size() > 0 )
tempOutputFile << "cd " << workDir << endl ;
- tempOutputFile << _mpiImpl->boot("",nbproc);
- tempOutputFile << _mpiImpl->run("",nbproc,fileNameToExecute);
- tempOutputFile << _mpiImpl->halt();
+ if( fileToExecute.size() > 0 ){
+ tempOutputFile << _mpiImpl->boot("",nbproc);
+ tempOutputFile << _mpiImpl->run("",nbproc,fileNameToExecute);
+ tempOutputFile << _mpiImpl->halt();
+ }
+ else{
+ tempOutputFile << "source " << env["SOURCEFILE"] << endl ;
+ tempOutputFile << env["COMMAND"];
+ }
+
tempOutputFile.flush();
tempOutputFile.close();
chmod(TmpFileName.c_str(), 0x1ED);
#include "Batch_Date.hxx"
#include "Batch_FactBatchManager_eLSF.hxx"
#include "Batch_FactBatchManager_ePBS.hxx"
+#include "SALOME_Launcher_Handler.hxx"
#include "Launcher.hxx"
#include <iostream>
#include <sstream>
delete it2->second;
}
+//=============================================================================
+/*! CORBA Method:
+ * Submit a batch job on a cluster and returns the JobId
+ * \param xmlExecuteFile : to define the execution on the batch cluster
+ * \param clusterName : name of the batch cluster
+ */
+//=============================================================================
+long Launcher_cpp::submitJob( const std::string xmlExecuteFile,
+ const std::string clusterName) throw(LauncherException)
+{
+ cerr << "BEGIN OF Launcher_cpp::submitJob" << endl;
+ long jobId;
+ vector<string> aMachineList;
+
+ // verify if cluster is in resources catalog
+ machineParams params;
+ params.hostname = clusterName;
+ vector<string> aCompoList ;
+ try{
+ aMachineList = _ResManager->GetFittingResources(params, aCompoList);
+ }
+ catch(const ResourcesException &ex){
+ throw LauncherException(ex.msg.c_str());
+ }
+ if (aMachineList.size() == 0)
+ throw LauncherException("This cluster is not in resources catalog");
+
+ // Parsing xml file
+ ParseXmlFile(xmlExecuteFile);
+
+ // verify if clustername is in xml file
+ map<std::string,MachineParameters>::const_iterator it1 = _launch.MachinesList.find(clusterName);
+ if(it1 == _launch.MachinesList.end())
+ throw LauncherException("This cluster is not in xml file");
+
+ ParserResourcesType p = _ResManager->GetResourcesList(aMachineList[0]);
+ string cname(p.Alias);
+ cerr << "Choose cluster: " << cname << endl;
+
+ // search batch manager for that cluster in map or instanciate one
+ map < string, Batch::BatchManager_eClient * >::const_iterator it2 = _batchmap.find(cname);
+ if(it2 == _batchmap.end())
+ {
+ _batchmap[cname] = FactoryBatchManager(p);
+ // TODO: Add a test for the cluster !
+ }
+
+ try{
+
+ // directory on cluster to put files to execute
+ string remotedir = _launch.MachinesList[clusterName].WorkDirectory;
+ // local directory to get files to execute and to put results
+ string localdir = _launch.RefDirectory;
+
+ int idx1 = xmlExecuteFile.find_last_of("/");
+ if(idx1 == string::npos) idx1 = -1;
+ int idx2 = xmlExecuteFile.find(".xml");
+ string logfile = xmlExecuteFile.substr(idx1+1,idx2-idx1-1);
+ string ologfile = logfile + ".output.log";
+ string elogfile = logfile + ".error.log";
+
+ // create and submit job on cluster
+ Batch::Parametre param;
+ param[USER] = p.UserName;
+ param[EXECUTABLE] = "";
+ for(int i=0; i<_launch.InputFile.size();i++)
+ param[INFILE] += Batch::Couple( localdir + "/" + _launch.InputFile[i], remotedir + "/" + _launch.InputFile[i] );
+ for(int i=0; i<_launch.OutputFile.size();i++)
+ param[OUTFILE] += Batch::Couple( localdir + "/" + _launch.OutputFile[i], remotedir + "/" + _launch.OutputFile[i] );
+ param[OUTFILE] += Batch::Couple( localdir + "/" + ologfile, remotedir + "/" + ologfile );
+ param[OUTFILE] += Batch::Couple( localdir + "/" + elogfile, remotedir + "/" + elogfile );
+ param[NBPROC] = _launch.NbOfProcesses;
+ param[WORKDIR] = remotedir;
+ param[TMPDIR] = remotedir;
+ param[MAXWALLTIME] = getWallTime("");
+ param[MAXRAMSIZE] = getRamSize("");
+
+ Batch::Environnement env;
+ env["COMMAND"] = _launch.Command;
+ env["SOURCEFILE"] = _launch.MachinesList[clusterName].EnvFile;
+ env["LOGFILE"] = logfile;
+
+ Batch::Job* job = new Batch::Job(param,env);
+
+ // submit job on cluster
+ Batch::JobId jid = _batchmap[cname]->submitJob(*job);
+
+ // get job id in long
+ istringstream iss(jid.getReference());
+ iss >> jobId;
+
+ _jobmap[ pair<string,long>(cname,jobId) ] = job;
+ }
+ catch(const Batch::EmulationException &ex){
+ throw LauncherException(ex.msg.c_str());
+ }
+
+ return jobId;
+}
+
//=============================================================================
/*! CORBA Method:
* Submit a batch job on a cluster and returns the JobId
else
return 0;
}
+
+void Launcher_cpp::ParseXmlFile(string xmlExecuteFile)
+{
+ SALOME_Launcher_Handler* handler = new SALOME_Launcher_Handler(_launch);
+
+ const char* aFilePath = xmlExecuteFile.c_str();
+ FILE* aFile = fopen(aFilePath, "r");
+
+ if (aFile != NULL)
+ {
+ xmlDocPtr aDoc = xmlReadFile(aFilePath, NULL, 0);
+
+ if (aDoc != NULL)
+ handler->ProcessXmlDocument(aDoc);
+ else
+ cerr << "ResourcesManager_cpp: could not parse file "<< aFilePath << endl;
+
+ // Free the document
+ xmlFreeDoc(aDoc);
+
+ fclose(aFile);
+ }
+ else
+ cerr << "Launcher_cpp: file "<<aFilePath<<" is not readable." << endl;
+
+ delete handler;
+
+}
#include "Batch_BatchManager_eClient.hxx"
#include "ResourcesManager.hxx"
+#include "SALOME_Launcher_Parser.hxx"
#include <string>
Launcher_cpp();
~Launcher_cpp();
+ long submitJob(const std::string xmlExecuteFile,
+ const std::string clusterName) throw(LauncherException);
+
long submitSalomeJob(const std::string fileToExecute ,
const std::vector<std::string>& filesToExport ,
const std::vector<std::string>& filesToImport ,
bool check(const batchParams& batch_params);
long getWallTime(std::string edt);
long getRamSize(std::string mem);
+ void ParseXmlFile(std::string xmlExecuteFile);
+
+ //! will contain the informations on the data type catalog(after parsing)
+ ParserLauncherType _launch;
+
};
#endif
#
# header files
salomeinclude_HEADERS = \
+ SALOME_Launcher_Parser.hxx \
+ SALOME_Launcher_Handler.hxx \
SALOME_Launcher.hxx \
Launcher.hxx
$(COMMON_LIBS) libLauncher.la
libLauncher_la_SOURCES=\
+ SALOME_Launcher_Parser.cxx \
+ SALOME_Launcher_Handler.cxx \
Launcher.cxx
libLauncher_la_CPPFLAGS =\
return (CORBA::Long)getpid();
}
+//=============================================================================
+/*! CORBA Method:
+ * Submit a batch job on a cluster and returns the JobId
+ * \param xmlExecuteFile : .xml to parse to execute on the batch cluster
+ * \param clusterName : cluster name
+ */
+//=============================================================================
+CORBA::Long SALOME_Launcher::submitJob(const char * xmlExecuteFile,
+ const char * clusterName)
+{
+ CORBA::Long jobId;
+
+ try{
+ jobId = _l.submitJob(xmlExecuteFile,clusterName);
+ }
+ catch(const LauncherException &ex){
+ INFOS(ex.msg.c_str());
+ THROW_SALOME_CORBA_EXCEPTION(ex.msg.c_str(),SALOME::INTERNAL_ERROR);
+ }
+ return jobId;
+}
+
//=============================================================================
/*! CORBA Method:
* Submit a batch job on a cluster and returns the JobId
SALOME_Launcher(CORBA::ORB_ptr orb, PortableServer::POA_var poa);
~SALOME_Launcher();
+ CORBA::Long submitJob(const char * xmlExecuteFile,
+ const char * clusterName);
+
CORBA::Long submitSalomeJob(const char * fileToExecute ,
const Engines::FilesList& filesToExport ,
const Engines::FilesList& filesToImport ,
--- /dev/null
+// SALOME ResourcesCatalog : implementation of catalog resources parsing (SALOME_ModuleCatalog.idl)
+//
+// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+//
+//
+// File : SALOME_Laucher_Handler.cxx
+// Author : Bernard Secher
+// Module : SALOME
+//$Header$
+
+#include "SALOME_Launcher_Handler.hxx"
+#include <iostream>
+#include <map>
+
+using namespace std;
+
+#ifdef _DEBUG_
+static int MYDEBUG = 1;
+#else
+static int MYDEBUG = 0;
+#endif
+
+//=============================================================================
+/*!
+ * Constructor
+ * \param listOfResources: map of ParserResourcesType to fill when parsing
+ */
+//=============================================================================
+
+SALOME_Launcher_Handler::SALOME_Launcher_Handler(ParserLauncherType& launch):
+ _launch(launch)
+{
+ //XML tags initialisation
+ test_machine_list = "machine-list";
+ test_main = "main";
+
+ test_machine = "machine";
+ test_env_file = "env-file";
+ test_work_directory = "work-directory";
+ test_ref_directory = "ref-directory";
+ test_nb_processes = "nb-processes";
+ test_input_file = "input-file";
+ test_output_file = "output-file";
+ test_command = "command";
+
+}
+
+//=============================================================================
+/*!
+ * Destructor
+ */
+//=============================================================================
+
+SALOME_Launcher_Handler::~SALOME_Launcher_Handler()
+{
+ // cout << "SALOME_Launcher_Handler destruction") << endl;
+}
+
+//=============================================================================
+/*!
+ * Retrieves DS after the file parse.
+ */
+//=============================================================================
+
+const ParserLauncherType&
+SALOME_Launcher_Handler::GetLauncherAfterParsing() const
+{
+ return _launch;
+}
+
+//=============================================================================
+/*!
+ * Processes XML document and fills the list of resources
+ */
+//=============================================================================
+
+void SALOME_Launcher_Handler::ProcessXmlDocument(xmlDocPtr theDoc)
+{
+// if (MYDEBUG) cout << "Begin parse document" << endl;
+
+ // Empty private elements
+ _launch.Clear();
+
+ // Get the document root node
+ xmlNodePtr aCurNode = xmlDocGetRootElement(theDoc);
+
+ aCurNode = aCurNode->xmlChildrenNode;
+
+ // Processing the document nodes
+ while(aCurNode != NULL){
+ if ( !xmlStrcmp(aCurNode->name,(const xmlChar*)test_machine_list) ){
+ xmlNodePtr aCurNode2 = aCurNode->xmlChildrenNode;
+ while(aCurNode2 != NULL){
+ if ( !xmlStrcmp(aCurNode2->name,(const xmlChar*)test_machine) ){
+ _machp.Clear();
+ xmlChar* name = xmlNodeGetContent(aCurNode2);
+ string clusterName = (const char*)name;
+ xmlFree(name);
+
+ if (xmlHasProp(aCurNode2, (const xmlChar*)test_env_file)){
+ xmlChar* envfile = xmlGetProp(aCurNode2, (const xmlChar*)test_env_file);
+ _machp.EnvFile = (const char*)envfile;
+ xmlFree(envfile);
+ }
+
+ if (xmlHasProp(aCurNode2, (const xmlChar*)test_work_directory)){
+ xmlChar* workdirectory = xmlGetProp(aCurNode2, (const xmlChar*)test_work_directory);
+ _machp.WorkDirectory = (const char*)workdirectory;
+ xmlFree(workdirectory);
+ }
+ _launch.MachinesList[clusterName]=_machp ;
+ }
+ aCurNode2 = aCurNode2->next;
+ }
+ }
+
+ if ( !xmlStrcmp(aCurNode->name,(const xmlChar*)test_ref_directory) ){
+ xmlChar* refdirectory = xmlNodeGetContent(aCurNode);
+ _launch.RefDirectory = (const char*)refdirectory;
+ xmlFree(refdirectory);
+ }
+
+ if ( !xmlStrcmp(aCurNode->name,(const xmlChar*)test_nb_processes) ){
+ xmlChar* nbofprocesses = xmlNodeGetContent(aCurNode);
+ _launch.NbOfProcesses = atoi((const char*)nbofprocesses);
+ xmlFree(nbofprocesses);
+ }
+
+ if ( !xmlStrcmp(aCurNode->name,(const xmlChar*)test_input_file) ){
+ xmlChar* inputfile = xmlNodeGetContent(aCurNode);
+ _launch.InputFile.push_back((const char*)inputfile);
+ xmlFree(inputfile);
+ }
+
+ if ( !xmlStrcmp(aCurNode->name,(const xmlChar*)test_output_file) ){
+ xmlChar* outputfile = xmlNodeGetContent(aCurNode);
+ _launch.OutputFile.push_back((const char*)outputfile);
+ xmlFree(outputfile);
+ }
+
+ if ( !xmlStrcmp(aCurNode->name,(const xmlChar*)test_command) ){
+ xmlChar* command = xmlNodeGetContent(aCurNode);
+ _launch.Command = (const char*)command;
+ xmlFree(command);
+ }
+
+ aCurNode = aCurNode->next;
+ }
+
+}
--- /dev/null
+// SALOME ResourcesCatalog : implementation of catalog resources parsing (SALOME_ModuleCatalog.idl)
+//
+// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+//
+//
+// File : SALOME_Launcher_Handler.hxx
+// Author : Bernard SECHER
+// Module : SALOME
+//$Header$
+
+#ifndef SALOME_LAUNCHER_HANDLER
+#define SALOME_LAUNCHER_HANDLER
+
+#include "SALOME_Launcher_Parser.hxx"
+
+#include <string>
+#include <vector>
+
+#include <libxml/parser.h>
+
+class SALOME_Launcher_Handler
+{
+
+public :
+ SALOME_Launcher_Handler(ParserLauncherType& launch);
+
+ virtual ~SALOME_Launcher_Handler();
+
+ const ParserLauncherType& GetLauncherAfterParsing() const;
+
+ void ProcessXmlDocument(xmlDocPtr theDoc);
+
+private :
+ ParserLauncherType& _launch;
+ MachineParameters _machp;
+
+ const char *test_machine_list;
+ const char *test_main;
+
+ const char *test_machine;
+ const char *test_env_file;
+ const char *test_work_directory;
+ const char *test_ref_directory;
+ const char *test_nb_processes;
+ const char *test_input_file;
+ const char *test_output_file;
+ const char *test_command;
+
+};
+
+#endif // SALOME_LAUNCHER_HANDLER
--- /dev/null
+// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#include "SALOME_Launcher_Parser.hxx"
+#include <iostream>
+#include <sstream>
+
+#define NULL_VALUE 0
+
+using namespace std;
+
+void MachineParameters::Clear()
+{
+ EnvFile = "";
+ WorkDirectory = "";
+}
+
+void MachineParameters::Print() const
+{
+ ostringstream oss;
+ oss << " EnvFile: " << EnvFile
+ << " WorkDirectory: " << WorkDirectory << endl;
+
+ cout << oss.str();
+}
+
+void ParserLauncherType::Print() const
+{
+ ostringstream oss;
+ oss << endl <<
+ "RefDirectory: " << RefDirectory << endl <<
+ "NbOfProcesses: " << NbOfProcesses << endl <<
+ "InputFile: ";
+ for(int i=0; i <InputFile.size();i++)
+ oss << InputFile[i] << " ";
+ oss << endl << "OutputFile: ";
+ for(int i=0; i <OutputFile.size();i++)
+ oss << OutputFile[i] << " ";
+ oss << endl <<
+ "Command: " << Command << endl <<
+ "Machines: " << endl;
+
+ cout << oss.str();
+
+ std::map < string, MachineParameters >::const_iterator it;
+ for(it=MachinesList.begin();it!=MachinesList.end();it++){
+ cout << " " << it->first;
+ it->second.Print();
+ }
+
+}
+
+void ParserLauncherType::Clear()
+{
+ MachinesList.clear();
+ RefDirectory = "";
+ NbOfProcesses = 1;
+ InputFile.clear();
+ OutputFile.clear();
+ Command = "";
+}
--- /dev/null
+// SALOME ResourcesCatalog : implementation of catalog resources parsing (SALOME_ModuleCatalog.idl)
+//
+// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+//
+//
+// File : SALOME_Launcher_Parser.hxx
+// Author : Bernard Secher
+// Module : SALOME
+//$Header$
+
+#ifndef SALOME_LAUNCHER_PARSER
+#define SALOME_LAUNCHER_PARSER
+
+#include <string>
+#include <vector>
+#include <map>
+#include <iostream>
+
+struct MachineParameters
+ {
+ std::string EnvFile;
+ std::string WorkDirectory;
+ void Print() const;
+ void Clear();
+ };
+
+struct ParserLauncherType
+ {
+ std::map<std::string,MachineParameters> MachinesList;
+ std::string RefDirectory;
+ long NbOfProcesses;
+ std::vector<std::string> InputFile;
+ std::vector<std::string> OutputFile;
+ std::string Command;
+
+ void Print() const;
+ void Clear();
+ };
+
+#endif //SALOME_LAUNCHER_PARSER