ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CRAB/python/crab_help.py
Revision: 1.28
Committed: Wed Oct 25 15:40:37 2006 UTC (18 years, 6 months ago) by slacapra
Content type: text/x-python
Branch: MAIN
CVS Tags: CRAB_1_5_1_pre1, CRAB_1_5_0, CRAB_1_5_0_pre9, CRAB_1_5_0_pre8, CRAB_1_5_0_pre7, CRAB_1_5_0_pre6, CRAB_1_5_0_pre5, CRAB_1_5_0_pre4, CRAB_1_5_0_pre3, CRAB_1_5_0_pre2, CRAB_1_4_2, CRAB_1_5_0_pre1, CRAB_1_4_1, CRAB_1_4_1_pre2, CRAB_1_4_1_pre1
Branch point for: branch_1_4_1
Changes since 1.27: +4 -0 lines
Log Message:
add new card <EDG.dont_check_proxy> which swich off the proxy check (as well as proxy delegation) as requested by Brian Bockelman

File Contents

# User Rev Content
1 nsmirnov 1.1
2     ###########################################################################
3     #
4     # H E L P F U N C T I O N S
5     #
6     ###########################################################################
7    
8     import common
9    
10     import sys, os, string
11     import tempfile
12    
13     ###########################################################################
14     def usage():
15     usa_string = common.prog_name + """ [options]
16 slacapra 1.3
17     The most useful general options (use '-h' to get complete help):
18    
19 slacapra 1.26 -create -- Create all the jobs.
20     -submit n -- Submit the first n available jobs. Default is all.
21     -status -- check status of all jobs.
22 slacapra 1.20 -getoutput|-get [range] -- get back the output of all jobs: if range is defined, only of selected jobs
23 slacapra 1.4 -kill [range] -- kill submitted jobs
24 fanzago 1.12 -cancelAndResubmit [range] -- kill and resubmit submitted jobs
25 slacapra 1.4 -clean -- gracefully cleanup the idrectory of a task
26     -testJdl [range] -- check if resources exist which are compatible with jdl
27 slacapra 1.27 -list [range] -- show technical job details
28 slacapra 1.4 -postMortem [range] -- provide a file with information useful for post-mortem analysis of the jobs
29 slacapra 1.20 -printId [range] -- print the job SID
30     -continue|-c [dir] -- Apply command to task stored in [dir].
31 nsmirnov 1.1 -h [format] -- Detailed help. Formats: man (default), tex, html.
32     -cfg fname -- Configuration file name. Default is 'crab.cfg'.
33 slacapra 1.4 -debug N -- set the verbosity level to N
34 nsmirnov 1.1 -v -- Print version and exit.
35    
36 slacapra 1.4 "range" has syntax "n,m,l-p" which correspond to [n,m,l,l+1,...,p-1,p] and all possible combination
37    
38 nsmirnov 1.1 Example:
39 slacapra 1.26 crab -create -submit 1
40 nsmirnov 1.1 """
41 slacapra 1.20 print
42 nsmirnov 1.1 sys.exit(2)
43    
44     ###########################################################################
45     def help(option='man'):
46     help_string = """
47     =pod
48    
49     =head1 NAME
50    
51     B<CRAB>: B<C>ms B<R>emote B<A>nalysis B<B>uilder
52    
53 slacapra 1.3 """+common.prog_name+""" version: """+common.prog_version_str+"""
54 nsmirnov 1.1
55 slacapra 1.19 This tool B<must> be used from an User Interface and the user is supposed to
56 slacapra 1.3 have a valid GRID certificate.
57 nsmirnov 1.1
58     =head1 SYNOPSIS
59    
60 slacapra 1.13 B<"""+common.prog_name+"""> [I<options>] [I<command>]
61 nsmirnov 1.1
62     =head1 DESCRIPTION
63    
64 slacapra 1.3 CRAB is a Python program intended to simplify the process of creation and submission into grid environment of CMS analysis jobs.
65 nsmirnov 1.1
66 slacapra 1.3 Parameters for CRAB usage and configuration are provided by the user changing the configuration file B<crab.cfg>.
67 nsmirnov 1.1
68 slacapra 1.3 CRAB generates scripts and additional data files for each job. The produced scripts are submitted directly to the Grid. CRAB makes use of BOSS to interface to the grid scheduler, as well as for logging and bookkeeping and eventually real time monitoring.
69 nsmirnov 1.1
70 slacapra 1.26 CRAB support any CMSSW based executable, with any modules/libraries, including the user provided one, and deals with the output produced by the executable. Up to version 1_2_1, also ORCA (and FAMOS) based executable were supported. CRAB provides an interface with CMS data discovery services (DBS and DLS), which are completely hidden to the final user. It also splits a task (such as analyzing a whole dataset) into smaller jobs, according with user requirements.
71 nsmirnov 1.1
72 slacapra 1.13 CRAB web page is available at
73    
74     I<http://cmsdoc.cern.ch/cms/ccs/wm/www/Crab/>
75 slacapra 1.6
76 slacapra 1.19 =head1 HOW TO RUN CRAB FOR THE IMPATIENT USER
77    
78     Please, read all anyway!
79    
80     Source B<crab.(c)sh> from the CRAB installation area, which have been setup either by you or by someone else for you.
81    
82     Modify the CRAB configuration file B<crab.cfg> according to your need: see below for a complete list: in particular set your jobtype (orca or famos) and fill the corresponding section. A template and commented B<crab.cfg> can be found on B<$CRABDIR/python/crab.cfg>
83    
84 spiga 1.25 ~>crab -create
85 slacapra 1.19 create all jobs (no submission!)
86    
87 spiga 1.25 ~>crab -submit 2 -continue [ui_working_dir]
88 slacapra 1.19 submit 2 jobs, the ones already created (-continue)
89    
90 slacapra 1.26 ~>crab -create -submit 2
91 slacapra 1.19 create _and_ submit 2 jobs
92    
93 spiga 1.25 ~>crab -status
94 slacapra 1.19 check the status of all jobs
95    
96 spiga 1.25 ~>crab -getoutput
97 slacapra 1.19 get back the output of all jobs
98    
99 slacapra 1.20 =head1 RUNNING CMSSW WITH CRAB
100 nsmirnov 1.1
101 slacapra 1.3 =over 4
102    
103     =item B<A)>
104    
105 slacapra 1.26 Develop your code in your CMSSW working area. Do anything which is needed to run interactively your executable, including the setup of run time environment (I<eval `scramv1 runtime -sh|csh`>), a suitable I<ParameterSet>, etc. It seems silly, but B<be extra sure that you actaully did compile your code> I<scramv1 b>.
106 slacapra 1.3
107     =item B<B)>
108    
109 slacapra 1.20 Source B<crab.(c)sh> from the CRAB installation area, which have been setup either by you or by someone else for you. Modify the CRAB configuration file B<crab.cfg> according to your need: see below for a complete list.
110    
111     The most important parameters are the following (see below for complete description of each parameter):
112    
113     =item B<Mandatory!>
114    
115     =over 6
116    
117     =item B<[CMSSW]> section: datasetpath, pset, splitting parameters, output_file
118    
119     =item B<[USER]> section: output handling parameters, such as return_data, copy_data etc...
120    
121     =back
122    
123     =item B<Run it!>
124    
125     You must have a valid voms-enabled grid proxy. See CRAB web page for details.
126    
127     =back
128    
129 slacapra 1.19 =head1 HOW TO RUN ON CONDOR-G
130    
131     The B<Condor-G> mode for B<CRAB> is a special submission mode next to the standard Resource Broker submission. It is designed to submit jobs directly to a site and not using the Resource Broker.
132    
133     Due to the nature of this submission possibility, the B<Condor-G> mode is restricted to OSG sites within the CMS grid, currently the 7 US T2: Florida(ufl.edu), Nebraska(unl.edu), San Diego(ucsd.edu), Purdue(purdue.edu), Wisconsin(wisc.edu), Caltech(ultralight.org), MIT(mit.edu).
134    
135     =head2 B<Requirements:>
136    
137     =over 2
138    
139     =item installed and running local Condor scheduler
140    
141     (either installed by the local Sysadmin or self-installed using the VDT user interface: http://www.uscms.org/SoftwareComputing/UserComputing/Tutorials/vdt.html)
142    
143     =item locally available LCG or OSG UI installation
144    
145     for authentication via grid certificate proxies ("voms-proxy-init -voms cms" should result in valid proxy)
146    
147     =item set of the environment variable EDG_WL_LOCATION to the edg directory of the local LCG or OSG UI installation
148    
149     =back
150    
151     =head2 B<What the Condor-G mode can do:>
152    
153     =over 2
154    
155     =item submission directly to a single OSG site,
156    
157     the requested dataset has to be published correctly by the site in the local and global services
158    
159     =back
160    
161     =head2 B<What the Condor-G mode cannot do:>
162    
163     =over 2
164    
165     =item submit jobs if no condor scheduler is running on the submission machine
166    
167     =item submit jobs if the local condor installation does not provide Condor-G capabilities
168    
169     =item submit jobs to more than one site in parallel
170    
171     =item submit jobs to a LCG site
172    
173     =item support grid certificate proxy renewal via the myproxy service
174    
175     =back
176    
177     =head2 B<CRAB configuration for Condor-G mode:>
178    
179     The CRAB configuration for the Condor-G mode only requires changes in crab.cfg:
180 nsmirnov 1.1
181 slacapra 1.19 =over 2
182 slacapra 1.3
183 slacapra 1.19 =item select condor_g Scheduler:
184 slacapra 1.4
185 slacapra 1.19 scheduler = condor_g
186 slacapra 1.4
187 slacapra 1.19 =item select the domain for a single OSG site:
188 nsmirnov 1.1
189 slacapra 1.19 CE_white_list = "one of unl.edu,ufl.edu,ucsd.edu,wisc.edu,purdue.edu,ultralight.org,mit.edu"
190 slacapra 1.4
191 slacapra 1.19 =back
192 slacapra 1.4
193     =head1 COMMAND
194    
195     =over 4
196    
197 slacapra 1.26 =item B<-create>
198 slacapra 1.4
199 slacapra 1.26 Create the jobs: from version 1_3_0 it is only possible to create all jobs.
200     The maximum number of jobs depens on dataset and splittig directives. This set of identical jobs accessing the same dataset are defined as a task.
201 slacapra 1.4 This command create a directory with default name is I<crab_0_date_time> (can be changed via ui_working_dir parameter, see below). Inside this directory it is placed whatever is needed to submit your jobs. Also the output of your jobs (once finished) will be place there (see after). Do not cancel by hand this directory: rather use -clean (see).
202     See also I<-continue>.
203    
204     =item B<-submit n>
205    
206     Submit n jobs: 'n' is either a positive integer or 'all'. Default is all.
207 slacapra 1.26 The first 'n' suitable jobs will be submitted. This option must be used in conjunction with -create (to create and submit immediately) or with -continue, to submit previously created jobs. Failure to do so will stop CRAB and generate an error message.
208 slacapra 1.4 See also I<-continue>.
209    
210     =item B<-continue [dir] | -c [dir]>
211    
212     Apply the action on the task stored on directory [dir]. If the task directory is the standard one (crab_0_date_time), the more recent in time is taken. Any other directory must be specified.
213     Basically all commands (but -create) need -continue, so it is automatically assumed, with exception of -submit, where it must be explicitly used. Of course, the standard task directory is used in this case.
214    
215 slacapra 1.26 =item B<-status>
216 nsmirnov 1.1
217 slacapra 1.26 Check the status of the jobs, in all states. If BOSS real time monitor is enabled, also some real time information are available, otherwise all the info will be available only after the output retrieval.
218 nsmirnov 1.1
219 slacapra 1.20 =item B<-getoutput|-get [range]>
220 nsmirnov 1.1
221 slacapra 1.20 Retrieve the output declared by the user via the output sandbox. By default the output will be put in task working dir under I<res> subdirectory. This can be changed via config parameters. B<Be extra sure that you have enough free space>. See I<range> below for syntax.
222 nsmirnov 1.1
223 slacapra 1.4 =item B<-resubmit [range]>
224 nsmirnov 1.1
225 slacapra 1.4 Resubmit jobs which have been previously submitted and have been either I<killed> or are I<aborted>. See I<range> below for syntax.
226 nsmirnov 1.1
227 slacapra 1.4 =item B<-kill [range]>
228 nsmirnov 1.1
229 slacapra 1.4 Kill (cancel) jobs which have been submitted to the scheduler. A range B<must> be used in all cases, no default value is set.
230 nsmirnov 1.1
231 slacapra 1.4 =item B<-testJdl [range]>
232 nsmirnov 1.1
233 slacapra 1.4 Check if the job can find compatible resources. It's equivalent of doing I<edg-job-list-match> on edg.
234 nsmirnov 1.1
235 slacapra 1.20 =item B<-printId [range]>
236    
237 slacapra 1.26 Just print the SID (grid job identifier) of the job(s).
238 slacapra 1.20
239 slacapra 1.4 =item B<-postMortem [range]>
240 nsmirnov 1.1
241 slacapra 1.19 Produce a file (via I<edg-job-logging-info -v 2>) which might help in understanding grid related problem for a job.
242 nsmirnov 1.1
243 slacapra 1.13 =item B<-list [range]>
244    
245     Dump technical informations about jobs: for developers only.
246    
247 slacapra 1.4 =item B<-clean [dir]>
248 nsmirnov 1.1
249 slacapra 1.26 Clean up (i.e. erase) the task working directory after a check whether there are still running jobs. In case, you are notified and asked to kill them or retrieve their output. B<Warning> this will possibly delete also the output produced by the task (if any)!
250 nsmirnov 1.1
251 slacapra 1.4 =item B<-help [format] | -h [format]>
252 nsmirnov 1.1
253 slacapra 1.4 This help. It can be produced in three different I<format>: I<man> (default), I<tex> and I<html>.
254 nsmirnov 1.1
255 slacapra 1.4 =item B<-v>
256 nsmirnov 1.1
257 slacapra 1.4 Print the version and exit.
258 nsmirnov 1.1
259 slacapra 1.4 =item B<range>
260 nsmirnov 1.1
261 slacapra 1.13 The range to be used in many of the above commands has the following syntax. It is a comma separated list of jobs ranges, each of which may be a job number, or a job range of the form first-last.
262 slacapra 1.4 Example: 1,3-5,8 = {1,3,4,5,8}
263 nsmirnov 1.1
264 slacapra 1.6 =back
265    
266 slacapra 1.4 =head1 OPTION
267 nsmirnov 1.1
268 slacapra 1.6 =over 4
269    
270 slacapra 1.4 =item B<-cfg [file]>
271 nsmirnov 1.1
272 slacapra 1.4 Configuration file name. Default is B<crab.cfg>.
273 nsmirnov 1.1
274 slacapra 1.4 =item B<-debug [level]>
275 nsmirnov 1.1
276 slacapra 1.13 Set the debug level: high number for high verbosity.
277 nsmirnov 1.1
278 slacapra 1.6 =back
279    
280 slacapra 1.5 =head1 CONFIGURATION PARAMETERS
281    
282 spiga 1.25 All the parameter describe in this section can be defined in the CRAB configuration file. The configuration file has different sections: [CRAB], [USER], etc. Each parameter must be defined in its proper section. An alternative way to pass a config parameter to CRAB is via command line interface; the syntax is: crab -SECTION.key value . For example I<crab -USER.outputdir MyDirWithFullPath> .
283 slacapra 1.5 The parameters passed to CRAB at the creation step are stored, so they cannot be changed by changing the original crab.cfg . On the other hand the task is protected from any accidental change. If you want to change any parameters, this require the creation of a new task.
284 slacapra 1.6 Mandatory parameters are flagged with a *.
285 slacapra 1.5
286     B<[CRAB]>
287 slacapra 1.6
288 slacapra 1.13 =over 4
289 slacapra 1.5
290 slacapra 1.6 =item B<jobtype *>
291 slacapra 1.5
292 slacapra 1.26 The type of the job to be executed: I<cmssw> jobtypes are supported
293 slacapra 1.6
294     =item B<scheduler *>
295    
296 slacapra 1.27 The scheduler to be used: I<edg> is the standard grid one. Other choice are I<glite> or I<glitecoll> for bulk submission or I<condor_g> (see specific paragraph)
297 slacapra 1.5
298     =back
299    
300 slacapra 1.20 B<[CMSSW]>
301    
302     =over 4
303    
304 slacapra 1.22 =item B<datasetpath *>
305 slacapra 1.20
306 slacapra 1.22 the path of processed dataset as defined on the DBS. It comes with the format I</PrimaryDataset/DataTier/Process> . In case no input is needed I<None> must be specified.
307 slacapra 1.20
308 slacapra 1.22 =item B<pset *>
309 slacapra 1.20
310 slacapra 1.22 the ParameterSet to be used
311 slacapra 1.20
312 slacapra 1.26 =item I<Of the following three parameter exactly two must be used, otherwise CRAB will complain.>
313 slacapra 1.20
314 slacapra 1.22 =item B<total_number_of_events *>
315    
316 slacapra 1.26 the number of events to be processed. To access all available events, use I<-1>. Of course, the latter option is not viable in case of no input. In this case, the total number of events will be used to split the task in jobs, together with I<event_per_job>.
317 slacapra 1.22
318 slacapra 1.26 =item B<events_per_job*>
319 slacapra 1.22
320 slacapra 1.26 number of events to be accessed by each job. Since a job cannot cross the boundary of a fileblock it might be that the actual number of events per job is not exactly what you asked for. It can be used also with No input.
321 slacapra 1.22
322     =item B<number_of_jobs *>
323    
324     Define the number of job to be run for the task. The number of event for each job is computed taking into account the total number of events required as well as the granularity of EventCollections. Can be used also with No input.
325    
326     =item B<output_file *>
327    
328     the output files produced by your application (comma separated list).
329 slacapra 1.20
330 slacapra 1.23 =item B<pythia_seed>
331    
332     If the job is pythia based, and has I<untracked uint32 sourceSeed = x> in the ParameterSet, the seed value can be changed using this parameter. Each job will have a different seed, of the type I<pythia_seed>I<$job_number> .
333    
334 slacapra 1.24 =item B<vtx_seed>
335    
336     Seed for random number generation used for vertex smearing: to be used only if PSet has I<untracked uint32 VtxSmeared = x>. It is modified if and only if also I<pythia_seed> is set. As for I<pythia_seed> the actual seed will be of the type I<vtx_seed>I<$job_number>.
337    
338 slacapra 1.26 =item I<DBS and DLS parameters.>
339 slacapra 1.6
340 slacapra 1.26 =item B<dbs_url>
341 slacapra 1.6
342 slacapra 1.26 The URL of the DBS query page. For expert only.
343 slacapra 1.6
344 slacapra 1.26 =item B<dbs_instance>
345 slacapra 1.6
346 slacapra 1.26 The instance of DBS to be accessed at a given URL. For expert only.
347 slacapra 1.6
348 slacapra 1.26 =item B<dls_type>
349 slacapra 1.6
350 slacapra 1.26 Type of DLS: can be DLI or mysql. For expert only.
351 slacapra 1.6
352 slacapra 1.26 =item B<dls_endpoint>
353 slacapra 1.6
354 slacapra 1.26 Access point for DLS. For expert only.
355 slacapra 1.13
356     =back
357    
358     B<[USER]>
359    
360     =over 4
361    
362 slacapra 1.6 =item B<additional_input_files>
363    
364 slacapra 1.26 Any additional input file you want to ship to WN: comma separated list. These are the files which might be needed by your executable: they will be placed in the WN working dir. You don't need to specify the I<ParameterSet> you are using, which will be included automatically. Wildcards are allowed.
365 slacapra 1.6
366     =item B<ui_working_dir>
367    
368     Name of the working directory for the current task. By default, a name I<crab_0_(date)_(time)> will be used. If this card is set, any CRAB command which require I<-continue> need to specify also the name of the working directory. A special syntax is also possible, to reuse the name of the dataset provided before: I<ui_working_dir : %(dataset)s> . In this case, if eg the dataset is SingleMuon, the ui_working_dir will be set to SingleMuon as well.
369    
370     =item B<return_data *>
371    
372     The output produced by the ORCA executable on WN is returned (via output sandbox) to the UI, by issuing the I<-getoutput> command. B<Warning>: this option should be used only for I<small> output, say less than 10MB, since the sandbox cannot accomodate big files. Depending on Resource Broker used, a size limit on output sandbox can be applied: bigger files will be truncated. To be used in alternative to I<copy_data>.
373    
374     =item B<outputdir>
375    
376 slacapra 1.9 To be used together with I<return_data>. Directory on user interface where to store the ORCA output. Full path is mandatory, "~/" is not allowed: the defaul location of returned output is ui_working_dir/res .
377 slacapra 1.6
378     =item B<logdir>
379    
380 slacapra 1.9 To be used together with I<return_data>. Directory on user interface where to store the ORCA standard output and error. Full path is mandatory, "~/" is not allowed: the defaul location of returned output is ui_working_dir/res .
381 slacapra 1.6
382     =item B<copy_data *>
383    
384     The output (only the ORCA one, not the std-out and err) is copied to a Storage Element of your choice (see below). To be used as an alternative to I<return_data> and recomended in case of large output.
385    
386     =item B<storage_element>
387    
388     To be used together with I<copy_data>. Storage Element name.
389    
390     =item B<storage_path>
391    
392     To be used together with I<copy_data>. Path where to put output files on Storage Element. Full path is needed, and the directory must be writeable by all.
393    
394     =item B<register_data>
395    
396     To be used together with I<copy_data>. Register output files to RLS catalog: for advanced LCG users.
397    
398     =item B<lfn_dir>
399    
400     To be used together with I<register_data>. Path for the Logical File Name.
401    
402     =item B<use_central_bossDB>
403    
404     Use central BOSS DB instead of one for each task: the DB must be already been setup. See installation istruction for more details.
405    
406     =item B<use_boss_rt>
407    
408     Use BOSS real time monitoring.
409    
410     =back
411    
412 slacapra 1.5 B<[EDG]>
413 nsmirnov 1.1
414 slacapra 1.13 =over 4
415 slacapra 1.6
416     =item B<lcg_version>
417 nsmirnov 1.1
418 slacapra 1.6 Version of LCG middleware to be used.
419 nsmirnov 1.1
420 slacapra 1.13 =item B<RB>
421 slacapra 1.6
422 slacapra 1.13 Which RB you want to use instead of the default one. The ones available for CMS are I<CERN> and I<CNAF>: the configuration files needed to change the broker will be automatically downloaded from CRAB web page and used. If the files are already present on the working directory they will be used.
423 slacapra 1.6
424 slacapra 1.14 =item B<proxy_server>
425    
426     The proxy server to which you delegate the responsibility to renew your proxy once expired. The default is I<myproxy.cern.ch> : change only if you B<really> know what you are doing.
427    
428 slacapra 1.26 =item B<role>
429    
430     The role to be set in the VOMS. See VOMS documentation for more info.
431    
432 slacapra 1.27 =item B<group>
433    
434     The group to be set in the VOMS, See VOMS documentation for more info.
435    
436 slacapra 1.28 =item B<dont_check_proxy>
437    
438     If you do not want CRAB to check your proxy. The creation of the proxy (with proper lenght), its delegation to a myproxyserver is your responsability.
439    
440 slacapra 1.6 =item B<requirements>
441    
442     Any other requirements to be add to JDL. Must be written in compliance with JDL syntax (see LCG user manual for further info). No requirement on Computing element must be set.
443    
444 slacapra 1.27 =item B<additional_jdl_parameters:>
445    
446     Any other parameters you want to add to jdl file: comma separated list, each
447     item B<must> be complete, including the closing ";"
448    
449 slacapra 1.6 =item B<max_cpu_time>
450    
451     Maximum CPU time needed to finish one job. It will be used to select a suitable queue on the CE. Time in minutes.
452    
453     =item B<max_wall_clock_time>
454    
455     Same as previous, but with real time, and not CPU one.
456    
457     =item B<CE_black_list>
458    
459 slacapra 1.27 All the CE (Computing Element) whose name contains the following strings (comma separated list) will not be considered for submission. Use the dns domain (eg fnal, cern, ifae, fzk, cnaf, lnl,....)
460 slacapra 1.6
461     =item B<CE_white_list>
462    
463 slacapra 1.27 Only the CE (Computing Element) whose name contains the following strings (comma separated list) will be considered for submission. Use the dns domain (eg fnal, cern, ifae, fzk, cnaf, lnl,....)
464    
465     =item B<SE_black_list>
466    
467     All the SE (Storage Element) whose name contains the following strings (comma separated list) will not be considered for submission.
468    
469     =item B<SE_white_list>
470    
471     Only the SE (Storage Element) whose name contains the following strings (comma separated list) will be considered for submission.
472 slacapra 1.6
473     =item B<virtual_organization>
474    
475     You don't want to change this: it's cms!
476    
477     =item B<retry_count>
478    
479     Number of time the grid will try to resubmit your job in case of grid related problem.
480    
481 slacapra 1.27 =item B<shallow_retry_count>
482    
483     Number of time shallow resubmission the grid will try: resubmissions are tried B<only> if the job aborted B<before> start. So you are guaranteed that your jobs run strictly once.
484    
485 slacapra 1.6 =back
486    
487 nsmirnov 1.1 =head1 FILES
488    
489 slacapra 1.6 I<crab> uses a configuration file I<crab.cfg> which contains configuration parameters. This file is written in the INI-style. The default filename can be changed by the I<-cfg> option.
490 nsmirnov 1.1
491 slacapra 1.6 I<crab> creates by default a working directory 'crab_0_E<lt>dateE<gt>_E<lt>timeE<gt>'
492 nsmirnov 1.1
493     I<crab> saves all command lines in the file I<crab.history>.
494    
495     =head1 HISTORY
496    
497 fanzago 1.15 B<CRAB> is a tool for the CMS analysis on the grid environment. It is based on the ideas from CMSprod, a production tools implemented originally by Nikolai Smirnov.
498 nsmirnov 1.1
499     =head1 AUTHORS
500    
501     """
502     author_string = '\n'
503     for auth in common.prog_authors:
504     #author = auth[0] + ' (' + auth[2] + ')' + ' E<lt>'+auth[1]+'E<gt>,\n'
505     author = auth[0] + ' E<lt>' + auth[1] +'E<gt>,\n'
506     author_string = author_string + author
507     pass
508     help_string = help_string + author_string[:-2] + '.'\
509     """
510    
511     =cut
512 slacapra 1.19 """
513 nsmirnov 1.1
514     pod = tempfile.mktemp()+'.pod'
515     pod_file = open(pod, 'w')
516     pod_file.write(help_string)
517     pod_file.close()
518    
519     if option == 'man':
520     man = tempfile.mktemp()
521     pod2man = 'pod2man --center=" " --release=" " '+pod+' >'+man
522     os.system(pod2man)
523     os.system('man '+man)
524     pass
525     elif option == 'tex':
526     fname = common.prog_name+'-v'+common.prog_version_str
527     tex0 = tempfile.mktemp()+'.tex'
528     pod2tex = 'pod2latex -full -out '+tex0+' '+pod
529     os.system(pod2tex)
530     tex = fname+'.tex'
531     tex_old = open(tex0, 'r')
532     tex_new = open(tex, 'w')
533     for s in tex_old.readlines():
534     if string.find(s, '\\begin{document}') >= 0:
535     tex_new.write('\\title{'+common.prog_name+'\\\\'+
536     '(Version '+common.prog_version_str+')}\n')
537     tex_new.write('\\author{\n')
538     for auth in common.prog_authors:
539     tex_new.write(' '+auth[0]+
540     '\\thanks{'+auth[1]+'} \\\\\n')
541     tex_new.write('}\n')
542     tex_new.write('\\date{}\n')
543     elif string.find(s, '\\tableofcontents') >= 0:
544     tex_new.write('\\maketitle\n')
545     continue
546     elif string.find(s, '\\clearpage') >= 0:
547     continue
548     tex_new.write(s)
549     tex_old.close()
550     tex_new.close()
551     print 'See '+tex
552     pass
553     elif option == 'html':
554     fname = common.prog_name+'-v'+common.prog_version_str+'.html'
555     pod2html = 'pod2html --title='+common.prog_name+\
556     ' --infile='+pod+' --outfile='+fname
557     os.system(pod2html)
558     print 'See '+fname
559     pass
560    
561     sys.exit(0)