(file) Return to replay CVS log (file) (dir) Up to [HallC] / geant_gep

 1 brash 1.1 #!/bin/sh
 2           num_events=$1
 3           output_file=$2
 4           iseed1=$3
 5           type=$4
 6           home=/group/c-gep/brash/geant_gep/
 7           hbook_dir=$home
 8           mkdir -p $type
 9           rm -f 'error_'$type
10           rm -f 'espace_batch_'$type
11           rm -f 'jsub_file_'$type
12           rm -f 'output_'$type
13           echo $output_file > $type/geant_hbookname.dat
14           # Write the gffgo.dat file
15             echo 'LIST  ! This is an example to test PISA interactively' > $type/gffgo.dat
16             echo 'CUTS .010 .010  .05  .05  .05  .010  .010 1.e+4 1.e+4 .01 7.e-8 !track thresh' >> $type/gffgo.dat
17             echo 'GEOM    1 01 06 1 06 ! Y/N INIT ! Int med ! Ext med ! Geom Print ! Hall med' >> $type/gffgo.dat
18             echo 'RNDM  '$iseed1 >> $type/gffgo.dat
19             echo 'SWIT  0    2' >> $type/gffgo.dat
20             echo 'ANNI  0' >> $type/gffgo.dat
21             echo 'BREM  0' >> $type/gffgo.dat
22 brash 1.1   echo 'COMP  0' >> $type/gffgo.dat
23             echo 'DRAY  0' >> $type/gffgo.dat
24             echo 'LOSS  2' >> $type/gffgo.dat
25             echo 'MULS  1' >> $type/gffgo.dat
26             echo 'HADR  1' >> $type/gffgo.dat
27             echo 'PAIR  0' >> $type/gffgo.dat
28             echo 'PHOT  0' >> $type/gffgo.dat
29             echo 'DCAY  0' >> $type/gffgo.dat
30             echo 'TRIG  500' >> $type/gffgo.dat
31             echo 'END' >> $type/gffgo.dat
32           #
33           #### Writes file espace_batch_####
34           #
35           #  echo '#!/bin/sh'                                             > geant_gep3_batch_$type
36             echo 'export LD_LIBRARY_PATH=/apps/lib:$LD_LIBRARY_PATH' > geant_gep3_batch_$type
37           #  echo 'env > env_output' >> geant_gep3_batch_$type
38           #  echo 'env | grep LD_LIBRARY_PATH > env_output2' >> geant_gep3_batch_$type
39             echo $home'/bin/fppsim 2>error_'$type' >output_'$type'   << EOF'  >> geant_gep3_batch_$type
40             echo '0' >> geant_gep3_batch_$type
41             echo 'trig '$num_events >> geant_gep3_batch_$type
42             echo 'exit' >> geant_gep3_batch_$type
43 brash 1.1   echo 'EOF'                                                  >> geant_gep3_batch_$type
44             echo 'cp error_'$type  $home'/'                             >> geant_gep3_batch_$type
45             echo 'cp output_'$type $home'/'                             >> geant_gep3_batch_$type
46           #  echo 'cp env_output '$home'/'                               >> geant_gep3_batch_$type
47           #  echo 'cp env_output2 '$home'/'                               >> geant_gep3_batch_$type
48             echo 'cp '$output_file' ' $hbook_dir'/'                     >> geant_gep3_batch_$type
49             echo 'rm -fr '$home'/'$type     >> geant_gep3_batch_$type
50           chmod a+x geant_gep3_batch_$type
51           #
52           #### Writes the jsub command file
53           #
54             echo 'PROJECT: halla_'$exp                                > jsub_file_$type
55             echo 'JOBNAME: geant_gep3_batch_'$type                                >> jsub_file_$type
56             echo 'MAIL : brash@jlab.org'                             >> jsub_file_$type
57             echo 'COMMAND: '$home'/geant_gep3_batch_'$type                  >> jsub_file_$type
58             echo 'OS: linux'                                    >> jsub_file_$type
59           #  echo 'QUEUE:redhat52 '                                    >> jsub_file_$type
60             echo 'OTHER_FILES:'                                         >> jsub_file_$type
61             echo $home'/hdr_gep.dat '$home'/geant_kinematics.dat '$home'/gffgo.dat '$home'/'$type'/geant_hbookname.dat' >> jsub_file_$type
62             echo 'INPUT_FILES:'  >> jsub_file_$type
63             echo 'INPUT_DATA:'  >> jsub_file_$type
64 brash 1.1 #
65           #### Submits the job to farms 
66           #
67           jsub jsub_file_$type
68           

Analyzer/Replay: Mark Jones, Documents: Stephen Wood
Powered by
ViewCVS 0.9.2-cvsgraph-1.4.0