Salome HOME
Add job parameter 'exclusive' to let the user choose to share nodes or not (EDF issue...
[modules/yacs.git] / src / Launcher / Launcher_Job.cxx
1 // Copyright (C) 2009-2013  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 // Author: AndrĂ© RIBES - EDF R&D
21 //
22 #include "Launcher_Job.hxx"
23 #include "Launcher.hxx"
24
25 #ifdef WITH_LIBBATCH
26 #include <libbatch/Constants.hxx>
27 #endif
28
29 Launcher::Job::Job()
30 {
31   _number = -1;
32   _state = "CREATED";
33   _launch_date = getLaunchDate();
34
35   _env_file = "";
36   _job_name = "";
37   _job_file = "";
38   _job_file_name = "";
39   _job_file_name_complete = "";
40   _work_directory = "";
41   _local_directory = "";
42   _result_directory = "";
43   _maximum_duration = "";
44   _maximum_duration_in_second = -1;
45   _resource_required_params.name = "";
46   _resource_required_params.hostname = "";
47   _resource_required_params.OS = "";
48   _resource_required_params.nb_proc = -1;
49   _resource_required_params.nb_node = -1;
50   _resource_required_params.nb_proc_per_node = -1;
51   _resource_required_params.cpu_clock = -1;
52   _resource_required_params.mem_mb = -1;
53   _queue = "";
54   _job_type = "";
55   _exclusive = false;
56
57   // Parameters for COORM
58   _launcher_file = "";
59   _launcher_args = "";
60
61 #ifdef WITH_LIBBATCH
62   _batch_job = new Batch::Job();
63 #endif
64 }
65
66 Launcher::Job::~Job() 
67 {
68   LAUNCHER_MESSAGE("Deleting job number: " << _number);
69 #ifdef WITH_LIBBATCH
70   if (_batch_job)
71     delete _batch_job;
72 #endif
73 }
74
75 void
76 Launcher::Job::stopJob()
77 {
78   LAUNCHER_MESSAGE("Stop resquested for job number: " << _number);
79   setState("FAILED");
80 #ifdef WITH_LIBBATCH
81   if (_batch_job_id.getReference() != "undefined")
82   {
83     try 
84     {
85       _batch_job_id.deleteJob();
86     }
87     catch (const Batch::GenericException &ex)
88     {
89       LAUNCHER_INFOS("WARNING: exception when stopping the job: " << ex.message);
90     }
91   }
92 #endif
93 }
94
95
96 void
97 Launcher::Job::removeJob()
98 {
99   LAUNCHER_MESSAGE("Removing job number: " << _number);
100 #ifdef WITH_LIBBATCH
101   if (_batch_job_id.getReference() != "undefined")
102   {
103     try 
104     {
105       _batch_job_id.deleteJob();
106     }
107     catch (const Batch::GenericException &ex)
108     {
109       LAUNCHER_INFOS("WARNING: exception when removing the job: " << ex.message);
110     }
111   }
112 #endif
113 }
114
115 std::string
116 Launcher::Job::getJobType()
117 {
118   return _job_type;
119 }
120
121 void
122 Launcher::Job::setJobName(const std::string & job_name)
123 {
124   _job_name = job_name;
125 }
126
127 std::string
128 Launcher::Job::getJobName()
129 {
130   return _job_name;
131 }
132
133 void 
134 Launcher::Job::setState(const std::string & state)
135 {
136   // State of a Job: CREATED, QUEUED, RUNNING, FINISHED, FAILED
137   if (state != "CREATED" &&
138       state != "IN_PROCESS" &&
139       state != "QUEUED" &&
140       state != "RUNNING" &&
141       state != "PAUSED" &&
142       state != "FINISHED" &&
143       state != "FAILED" &&
144       state != "ERROR")
145   {
146     throw LauncherException("Bad state, this state does not exist: " + state);
147   }
148   _state = state;
149 }
150
151 std::string 
152 Launcher::Job::getState()
153 {
154   return _state;
155 }
156
157 // Get names or ids of hosts assigned to the job
158 std::string
159 Launcher::Job::getAssignedHostnames()
160 {
161   return _assigned_hostnames;
162 }
163
164 void 
165 Launcher::Job::setNumber(const int & number)
166 {
167   if (_number != -1)
168     std::cerr << "Launcher::Job::setNumber -- Job number was already defined, before: " << _number << " now: " << number << std::endl;
169   _number = number;
170 }
171
172 int
173 Launcher::Job::getNumber()
174 {
175   return _number;
176 }
177
178 void 
179 Launcher::Job::setResourceDefinition(const ParserResourcesType & resource_definition)
180 {
181   // Check machine_definition
182   std::string user_name = "";
183   if (resource_definition.UserName == "")
184   {
185     user_name = getenv("USER");
186     if (user_name == "")
187     {
188       std::string mess = "You must define a user name: into your resource description or with env variable USER";
189       throw LauncherException(mess);
190     }
191   }
192   else
193     user_name = resource_definition.UserName;
194
195   _resource_definition = resource_definition;
196   _resource_definition.UserName = user_name;
197 }
198
199 ParserResourcesType 
200 Launcher::Job::getResourceDefinition()
201 {
202   return _resource_definition;
203 }
204
205 void 
206 Launcher::Job::setJobFile(const std::string & job_file)
207 {
208   // Check job file
209   if (job_file == "")
210   {
211     std::string mess = "Empty Job File is forbidden !";
212     throw LauncherException(mess);
213   }
214
215   _job_file = job_file;
216   std::string::size_type p1 = _job_file.find_last_of("/");
217   std::string::size_type p2 = _job_file.find_last_of(".");
218   _job_file_name_complete = _job_file.substr(p1+1);
219   _job_file_name = _job_file.substr(p1+1,p2-p1-1);
220 }
221
222 std::string
223 Launcher::Job::getJobFile()
224 {
225   return _job_file;
226 }
227 void 
228 Launcher::Job::setEnvFile(const std::string & env_file)
229 {
230   _env_file = env_file;
231 }
232
233 std::string
234 Launcher::Job::getEnvFile()
235 {
236   return _env_file;
237 }
238
239 void 
240 Launcher::Job::setWorkDirectory(const std::string & work_directory)
241 {
242   _work_directory = work_directory;
243 }
244
245 void 
246 Launcher::Job::setLocalDirectory(const std::string & local_directory)
247 {
248   _local_directory = local_directory;
249 }
250
251 void 
252 Launcher::Job::setResultDirectory(const std::string & result_directory)
253 {
254   _result_directory = result_directory;
255 }
256
257 void 
258 Launcher::Job::add_in_file(const std::string & file)
259 {
260   std::list<std::string>::iterator it = std::find(_in_files.begin(), _in_files.end(), file);
261   if (it == _in_files.end())
262     _in_files.push_back(file);
263   else
264     std::cerr << "Launcher::Job::add_in_file -- Warning file was already entered in in_files: " << file << std::endl;
265 }
266
267 void 
268 Launcher::Job::add_out_file(const std::string & file)
269 {
270   std::list<std::string>::iterator it = std::find(_out_files.begin(), _out_files.end(), file);
271   if (it == _out_files.end())
272     _out_files.push_back(file);
273   else
274     std::cerr << "Launcher::Job::add_out_file -- Warning file was already entered in out_files: " << file << std::endl;
275 }
276
277 void 
278 Launcher::Job::setMaximumDuration(const std::string & maximum_duration)
279 {
280   checkMaximumDuration(maximum_duration);
281   _maximum_duration_in_second = convertMaximumDuration(maximum_duration);
282   _maximum_duration = maximum_duration;
283 }
284
285 // For COORM
286 void
287 Launcher::Job::setLauncherFile(const std::string & launcher_file)
288 {
289         _launcher_file = launcher_file;
290 }
291 void
292 Launcher::Job::setLauncherArgs(const std::string & launcher_args)
293 {
294         _launcher_args = launcher_args;
295 }
296
297 void 
298 Launcher::Job::setResourceRequiredParams(const resourceParams & resource_required_params)
299 {
300   checkResourceRequiredParams(resource_required_params);
301   _resource_required_params = resource_required_params;
302 }
303
304 void 
305 Launcher::Job::setQueue(const std::string & queue)
306 {
307   _queue = queue;
308 }
309
310 void
311 Launcher::Job::setExclusive(bool exclusive)
312 {
313   _exclusive = exclusive;
314 }
315
316 void
317 Launcher::Job::setExclusiveStr(const std::string & exclusiveStr)
318 {
319   if (exclusiveStr == "true")
320     _exclusive = true;
321   else if (exclusiveStr == "false")
322     _exclusive = false;
323   else
324     throw LauncherException(std::string("Invalid boolean value for exclusive: ") + exclusiveStr);
325 }
326
327 std::string 
328 Launcher::Job::getWorkDirectory()
329 {
330   return _work_directory;
331 }
332
333 std::string 
334 Launcher::Job::getLocalDirectory()
335 {
336   return _local_directory;
337 }
338
339 std::string
340 Launcher::Job::getResultDirectory()
341 {
342   return _result_directory;
343 }
344
345 const std::list<std::string> & 
346 Launcher::Job::get_in_files()
347 {
348   return _in_files;
349 }
350
351 const std::list<std::string> & 
352 Launcher::Job::get_out_files()
353 {
354   return _out_files;
355 }
356
357 std::string 
358 Launcher::Job::getMaximumDuration()
359 {
360   return _maximum_duration;
361 }
362
363 // For COORM
364 std::string
365 Launcher::Job::getLauncherFile()
366 {
367         return _launcher_file;
368 }
369 std::string
370 Launcher::Job::getLauncherArgs()
371 {
372         return _launcher_args;
373 }
374
375 resourceParams 
376 Launcher::Job::getResourceRequiredParams()
377 {
378   return _resource_required_params;
379 }
380
381 std::string 
382 Launcher::Job::getQueue()
383 {
384   return _queue;
385 }
386
387 bool
388 Launcher::Job::getExclusive()
389 {
390   return _exclusive;
391 }
392
393 std::string
394 Launcher::Job::getExclusiveStr() const
395 {
396   return _exclusive ? "true" : "false";
397 }
398
399 void 
400 Launcher::Job::checkMaximumDuration(const std::string & maximum_duration)
401 {
402   std::string result("");
403   std::string edt_value = maximum_duration;
404   std::size_t pos = edt_value.find(":");
405
406   if (edt_value != "") {
407     if (pos == edt_value.npos) {
408       throw LauncherException("[Launcher::Job::checkMaximumDuration] Error on definition: " + edt_value);
409     }
410     std::string begin_edt_value = edt_value.substr(0, pos);
411     std::string mid_edt_value = edt_value.substr(pos, 1);
412     std::string end_edt_value = edt_value.substr(pos + 1, edt_value.npos);
413   
414     long value;
415     std::istringstream iss(begin_edt_value);
416     if (!(iss >> value)) {
417       result = "[Launcher::Job::checkExpectedDuration] Error on definition ! : " + edt_value;
418     }
419     else if (value < 0) {
420       result = "[Launcher::Job::checkExpectedDuration] Error on definition time is negative ! : " + value;
421     }
422     std::istringstream iss_2(end_edt_value);
423     if (!(iss_2 >> value)) {
424       result = "[Launcher::Job::checkExpectedDuration] Error on definition ! : " + edt_value;
425     }
426     else if (value < 0) {
427       result = "[Launcher::Job::checkExpectedDuration] Error on definition time is negative ! : " + value;
428     }
429     if (mid_edt_value != ":") {
430       result = "[Launcher::Job::checkExpectedDuration] Error on definition ! :" + edt_value;
431     }
432   }
433   if (result != "")
434     throw LauncherException(result);
435 }
436
437 void 
438 Launcher::Job::checkResourceRequiredParams(const resourceParams & resource_required_params)
439 {
440   // nb_proc has be to > 0
441   if (resource_required_params.nb_proc <= 0)
442   {
443     std::string message("[Launcher::Job::checkResourceRequiredParams] proc number is not > 0 ! ");
444     throw LauncherException(message);
445   }
446 }
447
448 long 
449 Launcher::Job::convertMaximumDuration(const std::string & edt)
450 {
451   long hh, mm, ret;
452
453   if( edt.size() == 0 )
454     return -1;
455
456   std::string::size_type pos = edt.find(":");
457   std::string h = edt.substr(0,pos);
458   std::string m = edt.substr(pos+1,edt.size()-pos+1);
459   std::istringstream issh(h);
460   issh >> hh;
461   std::istringstream issm(m);
462   issm >> mm;
463   ret = hh*60 + mm;
464   ret = ret * 60;
465
466   return ret;
467 }
468
469 std::string 
470 Launcher::Job::getLaunchDate()
471 {
472   time_t rawtime;
473   time(&rawtime);
474   std::string launch_date = ctime(&rawtime);
475   int i = 0 ;
476   for (;i < launch_date.size(); i++) 
477     if (launch_date[i] == '/' ||
478         launch_date[i] == '-' ||
479         launch_date[i] == ':' ||
480         launch_date[i] == ' ') 
481       launch_date[i] = '_';
482   launch_date.erase(--launch_date.end()); // Last caracter is a \n
483
484   return launch_date;
485 }
486
487 std::string
488 Launcher::Job::updateJobState()
489 {
490
491   if (_state != "FINISHED" &&
492       _state != "ERROR"    &&
493       _state != "FAILED")
494   {
495 #ifdef WITH_LIBBATCH
496     if (_batch_job_id.getReference() != "undefined")
497     {
498       // A batch manager has been affected to the job
499       Batch::JobInfo job_info = _batch_job_id.queryJob();
500       Batch::Parametre par = job_info.getParametre();
501       _state = par[Batch::STATE].str();
502       _assigned_hostnames = (par.find(Batch::ASSIGNEDHOSTNAMES) == par.end())?
503                             "" : par[Batch::ASSIGNEDHOSTNAMES].str();
504       LAUNCHER_MESSAGE("State received is: " << par[Batch::STATE].str());
505     }
506 #endif
507   }
508   return _state;
509 }
510
511 #ifdef WITH_LIBBATCH
512 Batch::Job * 
513 Launcher::Job::getBatchJob()
514 {
515   update_job();
516   return _batch_job;
517 }
518
519 Batch::Parametre
520 Launcher::Job::common_job_params()
521 {
522   Batch::Parametre params;
523
524   params[Batch::NAME] = getJobName();
525   params[Batch::NBPROC] = _resource_required_params.nb_proc;
526   params[Batch::NBPROCPERNODE] = _resource_required_params.nb_proc_per_node;
527
528   // Memory in megabytes
529   if (_resource_required_params.mem_mb > 0)
530   {
531     params[Batch::MAXRAMSIZE] = _resource_required_params.mem_mb;
532   }
533
534   // We define a default directory based on user time
535   if (_work_directory == "")
536   {
537     const size_t BUFSIZE = 32;
538     char date[BUFSIZE];
539     time_t curtime = time(NULL);
540     strftime(date, BUFSIZE, "%Y_%m_%d__%H_%M_%S", localtime(&curtime));
541     _work_directory = std::string("$HOME/Batch/workdir_");
542     _work_directory += date;
543   }
544   params[Batch::WORKDIR] = _work_directory;
545
546   // Parameters for COORM
547   params[Batch::LAUNCHER_FILE] = _launcher_file;
548   params[Batch::LAUNCHER_ARGS] = _launcher_args;
549
550   // If result_directory is not defined, we use HOME environnement
551   if (_result_directory == "")
552     _result_directory = getenv("HOME");
553
554   // _in_files
555   std::list<std::string> in_files(_in_files);
556   in_files.push_back(_job_file);
557   if (_env_file != "")
558           in_files.push_back(_env_file);
559   for(std::list<std::string>::iterator it = in_files.begin(); it != in_files.end(); it++)
560   {
561     std::string file = *it;
562
563     // local file -> If file is not an absolute path, we apply _local_directory
564     std::string local_file;
565     if (file.substr(0, 1) == std::string("/"))
566       local_file = file;
567     else
568 #ifndef WIN32
569       local_file = _local_directory + "/" + file;
570 #else
571           local_file = file;
572 #endif
573     
574     // remote file -> get only file name from in_files
575     size_t found = file.find_last_of("/");
576     std::string remote_file = _work_directory + "/" + file.substr(found+1);
577
578     params[Batch::INFILE] += Batch::Couple(local_file, remote_file);
579   }
580    
581   // _out_files
582   for(std::list<std::string>::iterator it = _out_files.begin(); it != _out_files.end(); it++)
583   {
584     std::string file = *it;
585
586     // local file 
587     size_t found = file.find_last_of("/");
588     std::string local_file = _result_directory +  "/" + file.substr(found+1);
589
590     // remote file -> If file is not an absolute path, we apply _work_directory
591     std::string remote_file;
592     if (file.substr(0, 1) == std::string("/"))
593       remote_file = file;
594     else
595       remote_file = _work_directory + "/" + file;
596
597     params[Batch::OUTFILE] += Batch::Couple(local_file, remote_file);
598   }
599
600   // Time
601   if (_maximum_duration_in_second != -1)
602     params[Batch::MAXWALLTIME] = _maximum_duration_in_second / 60;
603
604   // Queue
605   if (_queue != "")
606     params[Batch::QUEUE] = _queue;
607
608   // Exclusive
609   if (getExclusive())
610     params[Batch::EXCLUSIVE] = true;
611
612   // Specific parameters
613   std::map<std::string, std::string>::iterator it = _specific_parameters.find("LoalLevelerJobType");
614   if (it != _specific_parameters.end())
615     params["LL_JOBTYPE"] = it->second;
616   return params;
617 }
618
619 void 
620 Launcher::Job::setBatchManagerJobId(Batch::JobId batch_manager_job_id)
621 {
622   _batch_job_id = batch_manager_job_id;
623 }
624
625 Batch::JobId 
626 Launcher::Job::getBatchManagerJobId()
627 {
628   return _batch_job_id;
629 }
630 #endif
631
632 void
633 Launcher::Job::addToXmlDocument(xmlNodePtr root_node)
634 {
635   // Begin job
636   xmlNodePtr job_node = xmlNewChild(root_node, NULL, xmlCharStrdup("job"), NULL);
637   xmlNewProp(job_node, xmlCharStrdup("type"), xmlCharStrdup(getJobType().c_str()));
638   xmlNewProp(job_node, xmlCharStrdup("name"), xmlCharStrdup(getJobName().c_str()));
639
640   // Add user part
641   xmlNodePtr node = xmlNewChild(job_node, NULL, xmlCharStrdup("user_part"), NULL);
642
643   xmlNewChild(node, NULL, xmlCharStrdup("job_file"),         xmlCharStrdup(getJobFile().c_str()));
644   xmlNewChild(node, NULL, xmlCharStrdup("env_file"),         xmlCharStrdup(getEnvFile().c_str()));
645   xmlNewChild(node, NULL, xmlCharStrdup("work_directory"),   xmlCharStrdup(getWorkDirectory().c_str()));
646   xmlNewChild(node, NULL, xmlCharStrdup("local_directory"),  xmlCharStrdup(getLocalDirectory().c_str()));
647   xmlNewChild(node, NULL, xmlCharStrdup("result_directory"), xmlCharStrdup(getResultDirectory().c_str()));
648
649   // Parameters for COORM
650   xmlNewChild(node, NULL, xmlCharStrdup("launcher_file"), xmlCharStrdup(getLauncherFile().c_str()));
651
652   // Files
653   xmlNodePtr files_node = xmlNewChild(node, NULL, xmlCharStrdup("files"), NULL);
654   std::list<std::string> in_files  = get_in_files();
655   std::list<std::string> out_files = get_out_files();
656   for(std::list<std::string>::iterator it = in_files.begin(); it != in_files.end(); it++)
657     xmlNewChild(files_node, NULL, xmlCharStrdup("in_file"), xmlCharStrdup((*it).c_str()));
658   for(std::list<std::string>::iterator it = out_files.begin(); it != out_files.end(); it++)
659     xmlNewChild(files_node, NULL, xmlCharStrdup("out_file"), xmlCharStrdup((*it).c_str()));
660
661   // Resource part
662   resourceParams resource_params = getResourceRequiredParams();
663   xmlNodePtr res_node = xmlNewChild(node, NULL, xmlCharStrdup("resource_params"), NULL);
664   xmlNewChild(res_node, NULL, xmlCharStrdup("name"),   xmlCharStrdup(resource_params.name.c_str()));
665   xmlNewChild(res_node, NULL, xmlCharStrdup("hostname"),   xmlCharStrdup(resource_params.hostname.c_str()));
666   xmlNewChild(res_node, NULL, xmlCharStrdup("OS"),   xmlCharStrdup(resource_params.OS.c_str()));
667   std::ostringstream nb_proc_stream;
668   std::ostringstream nb_node_stream;
669   std::ostringstream nb_proc_per_node_stream;
670   std::ostringstream cpu_clock_stream;
671   std::ostringstream mem_mb_stream;
672   nb_proc_stream << resource_params.nb_proc;
673   nb_node_stream << resource_params.nb_node;
674   nb_proc_per_node_stream << resource_params.nb_proc_per_node;
675   cpu_clock_stream << resource_params.cpu_clock;
676   mem_mb_stream << resource_params.mem_mb;
677   xmlNewChild(res_node, NULL, xmlCharStrdup("nb_proc"),            xmlCharStrdup(nb_proc_stream.str().c_str()));
678   xmlNewChild(res_node, NULL, xmlCharStrdup("nb_node"),            xmlCharStrdup(nb_node_stream.str().c_str()));
679   xmlNewChild(res_node, NULL, xmlCharStrdup("nb_proc_per_node"),   xmlCharStrdup(nb_proc_per_node_stream.str().c_str()));
680   xmlNewChild(res_node, NULL, xmlCharStrdup("cpu_clock"),          xmlCharStrdup(cpu_clock_stream.str().c_str()));
681   xmlNewChild(res_node, NULL, xmlCharStrdup("mem_mb"),             xmlCharStrdup(mem_mb_stream.str().c_str()));
682
683   xmlNewChild(node, NULL, xmlCharStrdup("maximum_duration"), xmlCharStrdup(getMaximumDuration().c_str()));
684   xmlNewChild(node, NULL, xmlCharStrdup("queue"),            xmlCharStrdup(getQueue().c_str()));
685   xmlNewChild(node, NULL, xmlCharStrdup("exclusive"),        xmlCharStrdup(getExclusiveStr().c_str()));
686
687   // For COORM
688   xmlNewChild(node, NULL, xmlCharStrdup("launcher_args"), xmlCharStrdup(getLauncherArgs().c_str()));
689
690   // Specific parameters part
691   xmlNodePtr specific_parameters_node = xmlNewChild(node, NULL, xmlCharStrdup("specific_parameters"), NULL);
692   std::map<std::string, std::string> specific_parameters = getSpecificParameters();
693   for(std::map<std::string, std::string>::iterator it = specific_parameters.begin(); it != specific_parameters.end(); it++)
694   {
695     xmlNodePtr specific_parameter_node = xmlNewChild(specific_parameters_node, NULL, xmlCharStrdup("specific_parameter"), NULL);
696     xmlNewChild(specific_parameter_node, NULL, xmlCharStrdup("name"), xmlCharStrdup((it->first).c_str()));
697     xmlNewChild(specific_parameter_node, NULL, xmlCharStrdup("value"), xmlCharStrdup((it->second).c_str()));
698   }
699
700   // Run part
701   xmlNodePtr run_node = xmlNewChild(job_node, NULL, xmlCharStrdup("run_part"), NULL);
702   xmlNewChild(run_node, NULL, xmlCharStrdup("job_state"), xmlCharStrdup(getState().c_str()));
703   ParserResourcesType resource_definition = getResourceDefinition();
704   xmlNewChild(run_node, NULL, xmlCharStrdup("resource_choosed_name"), xmlCharStrdup(resource_definition.Name.c_str()));
705
706 #ifdef WITH_LIBBATCH
707   Batch::JobId job_id = getBatchManagerJobId();
708   xmlNewChild(run_node, NULL, xmlCharStrdup("job_reference"), xmlCharStrdup(job_id.getReference().c_str()));
709 #endif
710 }
711
712 void 
713 Launcher::Job::addSpecificParameter(const std::string & name,
714                                       const std::string & value)
715 {
716   _specific_parameters[name] = value;
717 }
718
719 const std::map<std::string, std::string> &
720 Launcher::Job::getSpecificParameters()
721 {
722   return _specific_parameters;
723 }
724
725 void
726 Launcher::Job::checkSpecificParameters()
727 {
728 }