1 #-------------------------------------------------------------------------------------------
2 # A script to bulk submit other scripts...
5 # % perl bulk-submit.pl <options>
8 # --cmd : Actual script to execute *including* all fixed arguments
9 # --arg : "Running" argument
10 # --min : "Running" argument : minimum value
11 # --max : "Running" argument : maximum value
14 # To submit 100 nd280 MC jobs (processing flux files 100-200) using GENIE v2.6.0, type:
15 # % perl bulk-submit.pl \
16 # --cmd 'perl submit-evg_nd280.pl --version v2.6.0' \
17 # --arg '--flux-run' \
20 # See submit-evg_nd280.pl for more nd280 MC job options.
23 # To submit 100 standard `\nu_e signal' SuperK MC jobs using GENIE v2.6.0, type:
24 # % perl bulk-submit.pl \
25 # --cmd 'perl submit-evg_sk_fhst.pl --neutrino nuesig --version v2.6.0' \
29 # See submit-evg_sk_fhst.pl for more SuperK MC job options.
31 # Costas Andreopoulos <constantinos.andreopoulos \at cern.ch>
32 # STFC, Rutherford Appleton Lab
33 #-------------------------------------------------------------------------------------------
37 $syntax = "%perl bulk-submit.pl --cmd <command> --arg <variable arg> --min <min> --max <max>";
41 if($_ eq '--cmd') { $cmd = $ARGV[$iarg+1]; }
42 if($_ eq '--arg') { $arg = $ARGV[$iarg+1]; }
43 if($_ eq '--min') { $min = $ARGV[$iarg+1]; }
44 if($_ eq '--max') { $max = $ARGV[$iarg+1]; }
47 die("** Syntax: $syntax \n") unless defined $cmd;
48 die("** Syntax: $syntax \n") unless defined $arg;
49 die("** Syntax: $syntax \n") unless defined $min;
50 die("** Syntax: $syntax \n") unless defined $max;
53 for($i=$min; $i<=$max; $i++) {
54 $full_cmd = "$cmd $arg $i";
55 print "Running: $full_cmd \n";