ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CRAB/python/crab_help.py
Revision: 1.39
Committed: Tue Nov 6 10:13:18 2007 UTC (17 years, 5 months ago) by spiga
Content type: text/x-python
Branch: MAIN
CVS Tags: CRAB_2_0_2_pre5, CRAB_2_0_2_pre4, CRAB_2_0_2_pre3, CRAB_2_0_2_pre2
Changes since 1.38: +0 -3 lines
Log Message:
removed temporary hack

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 spiga 1.34
12 nsmirnov 1.1 import tempfile
13    
14     ###########################################################################
15     def usage():
16     usa_string = common.prog_name + """ [options]
17 slacapra 1.3
18     The most useful general options (use '-h' to get complete help):
19    
20 slacapra 1.26 -create -- Create all the jobs.
21     -submit n -- Submit the first n available jobs. Default is all.
22     -status -- check status of all jobs.
23 slacapra 1.20 -getoutput|-get [range] -- get back the output of all jobs: if range is defined, only of selected jobs
24 slacapra 1.4 -kill [range] -- kill submitted jobs
25 fanzago 1.12 -cancelAndResubmit [range] -- kill and resubmit submitted jobs
26 slacapra 1.4 -clean -- gracefully cleanup the idrectory of a task
27     -testJdl [range] -- check if resources exist which are compatible with jdl
28 slacapra 1.27 -list [range] -- show technical job details
29 slacapra 1.4 -postMortem [range] -- provide a file with information useful for post-mortem analysis of the jobs
30 slacapra 1.20 -printId [range] -- print the job SID
31     -continue|-c [dir] -- Apply command to task stored in [dir].
32 slacapra 1.33 -h [format] -- Detailed help. Formats: man (default), tex, html, txt.
33 nsmirnov 1.1 -cfg fname -- Configuration file name. Default is 'crab.cfg'.
34 slacapra 1.4 -debug N -- set the verbosity level to N
35 nsmirnov 1.1 -v -- Print version and exit.
36    
37 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
38    
39 nsmirnov 1.1 Example:
40 slacapra 1.26 crab -create -submit 1
41 nsmirnov 1.1 """
42 slacapra 1.20 print
43 nsmirnov 1.1 sys.exit(2)
44    
45     ###########################################################################
46     def help(option='man'):
47     help_string = """
48     =pod
49    
50     =head1 NAME
51    
52     B<CRAB>: B<C>ms B<R>emote B<A>nalysis B<B>uilder
53    
54 slacapra 1.3 """+common.prog_name+""" version: """+common.prog_version_str+"""
55 nsmirnov 1.1
56 slacapra 1.19 This tool B<must> be used from an User Interface and the user is supposed to
57 fanzago 1.37 have a valid Grid certificate.
58 nsmirnov 1.1
59     =head1 SYNOPSIS
60    
61 slacapra 1.13 B<"""+common.prog_name+"""> [I<options>] [I<command>]
62 nsmirnov 1.1
63     =head1 DESCRIPTION
64    
65 fanzago 1.37 CRAB is a Python program intended to simplify the process of creation and submission into Grid environment of CMS analysis jobs.
66 nsmirnov 1.1
67 slacapra 1.3 Parameters for CRAB usage and configuration are provided by the user changing the configuration file B<crab.cfg>.
68 nsmirnov 1.1
69 fanzago 1.37 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.
70 nsmirnov 1.1
71 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.
72 nsmirnov 1.1
73 slacapra 1.13 CRAB web page is available at
74    
75     I<http://cmsdoc.cern.ch/cms/ccs/wm/www/Crab/>
76 slacapra 1.6
77 slacapra 1.19 =head1 HOW TO RUN CRAB FOR THE IMPATIENT USER
78    
79     Please, read all anyway!
80    
81     Source B<crab.(c)sh> from the CRAB installation area, which have been setup either by you or by someone else for you.
82    
83     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>
84    
85 spiga 1.25 ~>crab -create
86 slacapra 1.19 create all jobs (no submission!)
87    
88 spiga 1.25 ~>crab -submit 2 -continue [ui_working_dir]
89 slacapra 1.19 submit 2 jobs, the ones already created (-continue)
90    
91 slacapra 1.26 ~>crab -create -submit 2
92 slacapra 1.19 create _and_ submit 2 jobs
93    
94 spiga 1.25 ~>crab -status
95 slacapra 1.19 check the status of all jobs
96    
97 spiga 1.25 ~>crab -getoutput
98 slacapra 1.19 get back the output of all jobs
99    
100 slacapra 1.20 =head1 RUNNING CMSSW WITH CRAB
101 nsmirnov 1.1
102 slacapra 1.3 =over 4
103    
104     =item B<A)>
105    
106 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>.
107 slacapra 1.3
108     =item B<B)>
109    
110 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.
111    
112     The most important parameters are the following (see below for complete description of each parameter):
113    
114     =item B<Mandatory!>
115    
116     =over 6
117    
118     =item B<[CMSSW]> section: datasetpath, pset, splitting parameters, output_file
119    
120     =item B<[USER]> section: output handling parameters, such as return_data, copy_data etc...
121    
122     =back
123    
124     =item B<Run it!>
125    
126 fanzago 1.37 You must have a valid voms-enabled Grid proxy. See CRAB web page for details.
127 slacapra 1.20
128     =back
129    
130 slacapra 1.19 =head1 HOW TO RUN ON CONDOR-G
131    
132     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.
133    
134 fanzago 1.37 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).
135 slacapra 1.19
136     =head2 B<Requirements:>
137    
138     =over 2
139    
140     =item installed and running local Condor scheduler
141    
142     (either installed by the local Sysadmin or self-installed using the VDT user interface: http://www.uscms.org/SoftwareComputing/UserComputing/Tutorials/vdt.html)
143    
144     =item locally available LCG or OSG UI installation
145    
146 fanzago 1.37 for authentication via Grid certificate proxies ("voms-proxy-init -voms cms" should result in valid proxy)
147 slacapra 1.19
148     =item set of the environment variable EDG_WL_LOCATION to the edg directory of the local LCG or OSG UI installation
149    
150     =back
151    
152     =head2 B<What the Condor-G mode can do:>
153    
154     =over 2
155    
156     =item submission directly to a single OSG site,
157    
158     the requested dataset has to be published correctly by the site in the local and global services
159    
160     =back
161    
162     =head2 B<What the Condor-G mode cannot do:>
163    
164     =over 2
165    
166     =item submit jobs if no condor scheduler is running on the submission machine
167    
168     =item submit jobs if the local condor installation does not provide Condor-G capabilities
169    
170     =item submit jobs to more than one site in parallel
171    
172     =item submit jobs to a LCG site
173    
174 fanzago 1.37 =item support Grid certificate proxy renewal via the myproxy service
175 slacapra 1.19
176     =back
177    
178     =head2 B<CRAB configuration for Condor-G mode:>
179    
180     The CRAB configuration for the Condor-G mode only requires changes in crab.cfg:
181 nsmirnov 1.1
182 slacapra 1.19 =over 2
183 slacapra 1.3
184 slacapra 1.19 =item select condor_g Scheduler:
185 slacapra 1.4
186 slacapra 1.19 scheduler = condor_g
187 slacapra 1.4
188 slacapra 1.19 =item select the domain for a single OSG site:
189 nsmirnov 1.1
190 slacapra 1.19 CE_white_list = "one of unl.edu,ufl.edu,ucsd.edu,wisc.edu,purdue.edu,ultralight.org,mit.edu"
191 slacapra 1.4
192 slacapra 1.19 =back
193 slacapra 1.4
194     =head1 COMMAND
195    
196     =over 4
197    
198 slacapra 1.26 =item B<-create>
199 slacapra 1.4
200 slacapra 1.26 Create the jobs: from version 1_3_0 it is only possible to create all jobs.
201     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.
202 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).
203     See also I<-continue>.
204    
205     =item B<-submit n>
206    
207     Submit n jobs: 'n' is either a positive integer or 'all'. Default is all.
208 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.
209 slacapra 1.4 See also I<-continue>.
210    
211     =item B<-continue [dir] | -c [dir]>
212    
213     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.
214     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.
215    
216 slacapra 1.26 =item B<-status>
217 nsmirnov 1.1
218 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.
219 nsmirnov 1.1
220 slacapra 1.20 =item B<-getoutput|-get [range]>
221 nsmirnov 1.1
222 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.
223 nsmirnov 1.1
224 slacapra 1.4 =item B<-resubmit [range]>
225 nsmirnov 1.1
226 fanzago 1.37 Resubmit jobs which have been previously submitted and have been either I<killed> or are I<aborted>. See I<range> below for syntax.
227     The resubmit option can be used only with CRAB without server. For the server this option will be implemented as soon as possible
228 nsmirnov 1.1
229 slacapra 1.4 =item B<-kill [range]>
230 nsmirnov 1.1
231 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.
232 nsmirnov 1.1
233 slacapra 1.4 =item B<-testJdl [range]>
234 nsmirnov 1.1
235 slacapra 1.4 Check if the job can find compatible resources. It's equivalent of doing I<edg-job-list-match> on edg.
236 nsmirnov 1.1
237 slacapra 1.20 =item B<-printId [range]>
238    
239 fanzago 1.37 Just print the SID (Grid job identifier) of the job(s) or the taskId if you are using CRAB with the server
240 slacapra 1.20
241 slacapra 1.4 =item B<-postMortem [range]>
242 nsmirnov 1.1
243 fanzago 1.37 Produce a file (via I<edg-job-logging-info -v 2>) which might help in understanding Grid related problem for a job.
244 nsmirnov 1.1
245 slacapra 1.13 =item B<-list [range]>
246    
247     Dump technical informations about jobs: for developers only.
248    
249 slacapra 1.4 =item B<-clean [dir]>
250 nsmirnov 1.1
251 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)!
252 nsmirnov 1.1
253 slacapra 1.4 =item B<-help [format] | -h [format]>
254 nsmirnov 1.1
255 slacapra 1.4 This help. It can be produced in three different I<format>: I<man> (default), I<tex> and I<html>.
256 nsmirnov 1.1
257 slacapra 1.4 =item B<-v>
258 nsmirnov 1.1
259 slacapra 1.4 Print the version and exit.
260 nsmirnov 1.1
261 slacapra 1.4 =item B<range>
262 nsmirnov 1.1
263 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.
264 slacapra 1.4 Example: 1,3-5,8 = {1,3,4,5,8}
265 nsmirnov 1.1
266 slacapra 1.6 =back
267    
268 slacapra 1.4 =head1 OPTION
269 nsmirnov 1.1
270 slacapra 1.6 =over 4
271    
272 slacapra 1.4 =item B<-cfg [file]>
273 nsmirnov 1.1
274 slacapra 1.4 Configuration file name. Default is B<crab.cfg>.
275 nsmirnov 1.1
276 slacapra 1.4 =item B<-debug [level]>
277 nsmirnov 1.1
278 slacapra 1.13 Set the debug level: high number for high verbosity.
279 nsmirnov 1.1
280 slacapra 1.6 =back
281    
282 slacapra 1.5 =head1 CONFIGURATION PARAMETERS
283    
284 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> .
285 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.
286 slacapra 1.6 Mandatory parameters are flagged with a *.
287 slacapra 1.5
288     B<[CRAB]>
289 slacapra 1.6
290 slacapra 1.13 =over 4
291 slacapra 1.5
292 slacapra 1.6 =item B<jobtype *>
293 slacapra 1.5
294 slacapra 1.26 The type of the job to be executed: I<cmssw> jobtypes are supported
295 slacapra 1.6
296     =item B<scheduler *>
297    
298 fanzago 1.37 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)
299 slacapra 1.5
300 mcinquil 1.35 =item B<server_mode>
301    
302     To use the CRAB-server mode put 1 in this field. If the server_mode key is equal to 0 crab works, as usual, in standalone way.
303    
304     =item B<server_name>
305    
306     The name of the server that you want to use plus the path of the server storage (eg: hostname/data/cms/). For the server names that are dedicated to the user analysis you have to contact the CRAB\' developers (use hyper-news mailing list).
307    
308 slacapra 1.5 =back
309    
310 slacapra 1.20 B<[CMSSW]>
311    
312     =over 4
313    
314 slacapra 1.22 =item B<datasetpath *>
315 slacapra 1.20
316 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.
317 slacapra 1.20
318 slacapra 1.22 =item B<pset *>
319 slacapra 1.20
320 slacapra 1.22 the ParameterSet to be used
321 slacapra 1.20
322 slacapra 1.26 =item I<Of the following three parameter exactly two must be used, otherwise CRAB will complain.>
323 slacapra 1.20
324 slacapra 1.22 =item B<total_number_of_events *>
325    
326 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>.
327 slacapra 1.22
328 slacapra 1.26 =item B<events_per_job*>
329 slacapra 1.22
330 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.
331 slacapra 1.22
332     =item B<number_of_jobs *>
333    
334     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.
335    
336     =item B<output_file *>
337    
338     the output files produced by your application (comma separated list).
339 slacapra 1.20
340 slacapra 1.23 =item B<pythia_seed>
341    
342     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> .
343    
344 slacapra 1.24 =item B<vtx_seed>
345    
346     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>.
347    
348 slacapra 1.30 =item B<g4_seed>
349    
350     Seed for randome generation of Geant4 SimHits I<untracked uint32 g4SimHits = x>. The treatment is that of I<vtx_seed> above
351    
352     =item B<mix_seed>
353    
354     Seed for randome generation of mixing module I<untracked uint32 mix = x>. The treatment is that of I<vtx_seed> above
355    
356     =item B<first_run>
357    
358     First run to be generated in a generation jobs. Relevant only for no-input workflow.
359    
360 slacapra 1.31 =item B<executable>
361 slacapra 1.30
362 slacapra 1.31 The name of the executable to be run on remote WN. The default is cmsrun. The executable is either to be found on the release area of the WN, or has been built on user working area on the UI and is (automatically) shipped to WN. If you want to run a script (which might internally call I<cmsrun>, use B<USER.script_exe> instead.
363 slacapra 1.30
364     =item I<DBS and DLS parameters:>
365    
366     =item B<use_dbs_1>
367    
368     To use DBS1 instead of default DBS2
369 slacapra 1.6
370 slacapra 1.26 =item B<dbs_url>
371 slacapra 1.6
372 slacapra 1.30 The URL of the DBS query page. For expert only. (both DBS1 and DBS2)
373    
374 slacapra 1.26 =item B<dbs_instance>
375 slacapra 1.6
376 slacapra 1.30 The instance of DBS to be accessed at a given URL. For expert only. For DBS1 only.
377 slacapra 1.6
378 slacapra 1.26 =item B<dls_type>
379 slacapra 1.6
380 slacapra 1.30 Type of DLS: can be DLI or mysql. For expert only. For DBS1 only
381 slacapra 1.6
382 slacapra 1.26 =item B<dls_endpoint>
383 slacapra 1.6
384 slacapra 1.30 Access point for DLS. For expert only. For DBS1 only
385 slacapra 1.13
386     =back
387    
388     B<[USER]>
389    
390     =over 4
391    
392 slacapra 1.6 =item B<additional_input_files>
393    
394 mcinquil 1.35 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.
395 slacapra 1.6
396 slacapra 1.31 =item B<script_exe>
397    
398 mcinquil 1.35 A user script that will be run on WN (instead of default cmsrun). It\'s up to the user to setup properly the script itself to run on WN enviroment. CRAB guarantees that the CMSSW environment is setup (eg scram is in the path) and that the modified pset.cfg will be placed in the working directory, with name CMSSW.cfg . The script itself will be added automatically to the input sandbox.
399 slacapra 1.31
400 slacapra 1.6 =item B<ui_working_dir>
401    
402     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.
403    
404 mcinquil 1.35 =item B<thresholdLevel>
405    
406     This has to be a value between 0 and 100, that indicates the percentage of task completeness (jobs in a ended state are complete, even if failed). The server will notify the user by e-mail (look at the field: B<eMail>) when the task will reach the specified threshold. Works just with the server_mode = 1.
407    
408     =item B<eMail>
409    
410     The server will notify the specified e-mail when the task will reaches the specified B<thresholdLevel>. A notification is also sended when the task will reach the 100\% of completeness. This field can also be a list of e-mail: "B<eMail = user1@cern.ch, user2@cern.ch>". Works just with the server_mode = 1.
411    
412 slacapra 1.6 =item B<return_data *>
413    
414     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>.
415    
416     =item B<outputdir>
417    
418 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 .
419 slacapra 1.6
420     =item B<logdir>
421    
422 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 .
423 slacapra 1.6
424     =item B<copy_data *>
425    
426     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.
427    
428     =item B<storage_element>
429    
430     To be used together with I<copy_data>. Storage Element name.
431    
432     =item B<storage_path>
433    
434     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.
435    
436     =item B<register_data>
437    
438 fanzago 1.37 Not more supported.
439 slacapra 1.6
440     =item B<use_central_bossDB>
441    
442     Use central BOSS DB instead of one for each task: the DB must be already been setup. See installation istruction for more details.
443    
444     =item B<use_boss_rt>
445    
446     Use BOSS real time monitoring.
447    
448     =back
449    
450 slacapra 1.5 B<[EDG]>
451 nsmirnov 1.1
452 slacapra 1.13 =over 4
453 slacapra 1.6
454 slacapra 1.13 =item B<RB>
455 slacapra 1.6
456 slacapra 1.29 Which RB you want to use instead of the default one, as defined in the configuration of your UI. 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.
457     You can use any other RB which is available, if you provide the proper configuration files. Eg, for RB XYZ, you should provide I<edg_wl_ui.conf.CMS_XYZ> and I<edg_wl_ui_cmd_var.conf.CMS_XYZ> for EDG RB, or I<glite.conf.CMS_XYZ> for glite WMS. These files are searched for in the current working directory, and, if not found, on crab web page. So, if you put your private configuration files in the working directory, they will be used, even if they are not available on crab web page.
458     Please get in contact with crab team if you wish to provide your RB or WMS as a service to the CMS community.
459 slacapra 1.6
460 slacapra 1.14 =item B<proxy_server>
461    
462     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.
463    
464 slacapra 1.26 =item B<role>
465    
466     The role to be set in the VOMS. See VOMS documentation for more info.
467    
468 slacapra 1.27 =item B<group>
469    
470     The group to be set in the VOMS, See VOMS documentation for more info.
471    
472 slacapra 1.28 =item B<dont_check_proxy>
473    
474     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.
475    
476 slacapra 1.6 =item B<requirements>
477    
478     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.
479    
480 slacapra 1.27 =item B<additional_jdl_parameters:>
481    
482     Any other parameters you want to add to jdl file: comma separated list, each
483 mcinquil 1.35 item B<must> be complete, including the closing ";".
484     With this field it\'s also possible to specify which WMS you want to use, adding the parameter "additional_jdl_parameters = WMProxyEndpoints ={"https://hostname:port/pathcode"};" where "hostname" is WMS\' name, the "port" generally is 7443 and the "pathcode" should be something like "glite_wms_wmproxy_server".
485 slacapra 1.27
486 slacapra 1.6 =item B<max_cpu_time>
487    
488     Maximum CPU time needed to finish one job. It will be used to select a suitable queue on the CE. Time in minutes.
489    
490     =item B<max_wall_clock_time>
491    
492     Same as previous, but with real time, and not CPU one.
493    
494     =item B<CE_black_list>
495    
496 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,....)
497 slacapra 1.6
498     =item B<CE_white_list>
499    
500 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,....)
501    
502     =item B<SE_black_list>
503    
504 fanzago 1.37 All the SE (Storage Element) whose name contains the following strings (comma separated list) will not be considered for submission.It works only if a datasetpath is specified.
505 slacapra 1.27
506     =item B<SE_white_list>
507    
508 fanzago 1.37 Only the SE (Storage Element) whose name contains the following strings (comma separated list) will be considered for submission.It works only if a datasetpath is specified
509 slacapra 1.6
510     =item B<virtual_organization>
511    
512 mcinquil 1.35 You don\'t want to change this: it\'s cms!
513 slacapra 1.6
514     =item B<retry_count>
515    
516 fanzago 1.37 Number of time the Grid will try to resubmit your job in case of Grid related problem.
517 slacapra 1.6
518 slacapra 1.27 =item B<shallow_retry_count>
519    
520 fanzago 1.37 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.
521 slacapra 1.27
522 slacapra 1.30 =item B<maxtarballsize>
523    
524     Maximum size of tar-ball in Mb. If bigger, an error will be generated. The actual limit is that on the RB input sandbox. Default is 9.5 Mb (sandbox limit is 10 Mb)
525    
526 slacapra 1.6 =back
527    
528 nsmirnov 1.1 =head1 FILES
529    
530 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.
531 nsmirnov 1.1
532 slacapra 1.6 I<crab> creates by default a working directory 'crab_0_E<lt>dateE<gt>_E<lt>timeE<gt>'
533 nsmirnov 1.1
534     I<crab> saves all command lines in the file I<crab.history>.
535    
536     =head1 HISTORY
537    
538 fanzago 1.37 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.
539 nsmirnov 1.1
540     =head1 AUTHORS
541    
542     """
543     author_string = '\n'
544     for auth in common.prog_authors:
545     #author = auth[0] + ' (' + auth[2] + ')' + ' E<lt>'+auth[1]+'E<gt>,\n'
546     author = auth[0] + ' E<lt>' + auth[1] +'E<gt>,\n'
547     author_string = author_string + author
548     pass
549     help_string = help_string + author_string[:-2] + '.'\
550     """
551    
552     =cut
553 slacapra 1.19 """
554 nsmirnov 1.1
555     pod = tempfile.mktemp()+'.pod'
556     pod_file = open(pod, 'w')
557     pod_file.write(help_string)
558     pod_file.close()
559    
560     if option == 'man':
561     man = tempfile.mktemp()
562     pod2man = 'pod2man --center=" " --release=" " '+pod+' >'+man
563     os.system(pod2man)
564     os.system('man '+man)
565     pass
566     elif option == 'tex':
567     fname = common.prog_name+'-v'+common.prog_version_str
568     tex0 = tempfile.mktemp()+'.tex'
569     pod2tex = 'pod2latex -full -out '+tex0+' '+pod
570     os.system(pod2tex)
571     tex = fname+'.tex'
572     tex_old = open(tex0, 'r')
573     tex_new = open(tex, 'w')
574     for s in tex_old.readlines():
575     if string.find(s, '\\begin{document}') >= 0:
576     tex_new.write('\\title{'+common.prog_name+'\\\\'+
577     '(Version '+common.prog_version_str+')}\n')
578     tex_new.write('\\author{\n')
579     for auth in common.prog_authors:
580     tex_new.write(' '+auth[0]+
581     '\\thanks{'+auth[1]+'} \\\\\n')
582     tex_new.write('}\n')
583     tex_new.write('\\date{}\n')
584     elif string.find(s, '\\tableofcontents') >= 0:
585     tex_new.write('\\maketitle\n')
586     continue
587     elif string.find(s, '\\clearpage') >= 0:
588     continue
589     tex_new.write(s)
590     tex_old.close()
591     tex_new.close()
592     print 'See '+tex
593     pass
594     elif option == 'html':
595     fname = common.prog_name+'-v'+common.prog_version_str+'.html'
596     pod2html = 'pod2html --title='+common.prog_name+\
597     ' --infile='+pod+' --outfile='+fname
598     os.system(pod2html)
599     print 'See '+fname
600     pass
601 slacapra 1.33 elif option == 'txt':
602     fname = common.prog_name+'-v'+common.prog_version_str+'.txt'
603     pod2text = 'pod2text '+pod+' '+fname
604     os.system(pod2text)
605     print 'See '+fname
606     pass
607 nsmirnov 1.1
608     sys.exit(0)