#$ -wd /tmp #$ -j y # Number of subtasks to start #$ -t 1-8 # Check if the number of parameters is correct if [ $# -ne 6 ]; then echo "The number of arguments is not correct" echo "Please call the script with the following parameters" echo "Projectile (p,C,Co, Au, Pb)" echo "Target (p,C,Co, Au, Pb)" echo "beam kinetic energy" echo "centrality (centr/mbias)" echo "number of events" echo "file with input list" exit 1 fi # read and transform all input parameters proj=$(echo $1 | tr '[A-Z]' '[a-z]') targ=$(echo $2 | tr '[A-Z]' '[a-z]') elb=$3 trig=$(echo $4 | tr '[A-Z]' '[a-z]') nev=$5 counter=$(sed -n -e "$SGE_TASK_ID p" $6) counter5=$(printf "%05d" "$counter") seed=$(($JOB_ID+$SGE_TASK_ID+5000)) # setup filenames and directories fname="urqmd.$proj$targ.${elb}gev.$trig.$counter5" rootfile="${fname}.root" logfile="${fname}.log" _target=/hera/cbm/prod/gen/urqmd/$proj$targ/${elb}gev/$trig/ seedfile=$_target/log/SeedFile.txt #create the needed directories mkdir -p $_target/log # setup the run environment source /cvmfs/fairroot.gsi.de/cbm/bin/setup_urqmd.sh # run the urqmd production /cvmfs/fairroot.gsi.de/cbm/bin/run_urqmd.sh $proj $targ $elb $trig $nev $counter $seed $seedfile result=$? if [ "$result" = "0" ]; then # validate the root file /cvmfs/fairroot.gsi.de/cbm/bin/validate_urqmd.sh # Copy results to final destination cp -v $rootfile $_target cp -v FileInfo.txt $_target/log/FileInfo.$JOB_ID.$SGE_TASK_ID.txt else # Copy urqmd log files cp -v $logfile $_target/log # Evacuate the GE log-file cp -v $SGE_STDOUT_PATH $_target/log/$JOB_ID.$SGE_TASK_ID.log fi