User Tools

Site Tools


computing:batch:jobscriptexample

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
computing:batch:jobscriptexample [2016/08/08 18:09] iwncomputing:batch:jobscriptexample [2017/05/29 15:41] – [Example 2] iwn
Line 218: Line 218:
 <file text submitExample2.sh> <file text submitExample2.sh>
  
-#!/bin/bash+#! /bin/bash
 # https://wiki.chipp.ch/twiki/bin/view/CmsTier3/HowToSubmitJobs # https://wiki.chipp.ch/twiki/bin/view/CmsTier3/HowToSubmitJobs
 # run with qsub -q all.q submitAnalysis.sh # run with qsub -q all.q submitAnalysis.sh
  
-printf "#######################################################\n" +printf "###################################################\n" 
-printf "##   Run Analysis with config %.20s   ##\n" $1 +printf "##   Run Analysis with input %-20s##\n" $1 
-printf "#######################################################\n"+printf "###################################################\n"
  
 DBG=2 # debugging level DBG=2 # debugging level
Line 231: Line 231:
 OUTFILES="*.png" OUTFILES="*.png"
 TOPWORKDIR=/scratch/`whoami` TOPWORKDIR=/scratch/`whoami`
-JOBDIR=$INPUT 
 JOBDIR="analysis/$1" JOBDIR="analysis/$1"
 BASEDIR="/shome/myusername/CMSSW_5_3_24/src/myAnalysisFolder" BASEDIR="/shome/myusername/CMSSW_5_3_24/src/myAnalysisFolder"
Line 243: Line 242:
 SEUSERSUBDIR="analysis/$1" SEUSERSUBDIR="analysis/$1"
 SEOUTFILES="*.root" SEOUTFILES="*.root"
-HN_NAME=`whoami` +USER_SE_HOME="root://t3dcachedb.psi.ch:1094/pnfs/psi.ch/cms/trivcat/store/user/$USER
-USER_SRM_HOME="root://t3dcachedb.psi.ch:1094/pnfs/psi.ch/cms/trivcat/store/user+SERESULTDIR=$USER_SE_HOME/$SEUSERSUBDIR
-# USER_SRM_HOME="srm://t3se01.psi.ch:8443/srm/managerv2?SFN=/pnfs/psi.ch/cms/trivcat/store/user+
-SERESULTDIR=$USER_SRM_HOME/$HN_NAME/$SEUSERSUBDIR+
  
  
  
 ##### MONITORING/DEBUG INFORMATION ######################################## ##### MONITORING/DEBUG INFORMATION ########################################
 +
 +# write job report (stdout of this script)
 +mkdir -p /shome/myusername/CMSSW_5_3_24/src/myAnalysisFolder/analysis
 +#$ -o /shome/myusername/CMSSW_5_3_24/src/myAnalysisFolder/analysis
 +#$ -e /shome/myusername/CMSSW_5_3_24/src/myAnalysisFolder/analysis
  
 DATE_START=`date +%s` DATE_START=`date +%s`
Line 371: Line 373:
     done     done
 fi fi
 +
  
 # copy large files to $SERESULTDIR # copy large files to $SERESULTDIR
Line 380: Line 383:
         srmdebug="-v"         srmdebug="-v"
     fi     fi
-    echo "here1" >> myout.txt 
     for n in $SEOUTFILES; do     for n in $SEOUTFILES; do
-        echo "here2" >> myout.txt 
         if test ! -e $WORKDIR/$n; then         if test ! -e $WORKDIR/$n; then
             echo "WARNING: Cannot find output file $WORKDIR/$n. Ignoring it" >&2             echo "WARNING: Cannot find output file $WORKDIR/$n. Ignoring it" >&2
         else         else
             echo "xrdcp -f $WORKDIR/$n $SERESULTDIR/$n" >&2             echo "xrdcp -f $WORKDIR/$n $SERESULTDIR/$n" >&2
-            xrdcp -f $WORKDIR/$n $SERESULTDIR/$n +            xrdcp $srmdebug -$DBG -$WORKDIR/$n $SERESULTDIR/$n
-#             lcg-cp $srmdebug -b -D srmv2 $WORKDIR/$n $SERESULTDIR/$n+
             if test $? -ne 0; then             if test $? -ne 0; then
                 echo "ERROR: Failed to copy $WORKDIR/$n to $SERESULTDIR/$n" >&2                 echo "ERROR: Failed to copy $WORKDIR/$n to $SERESULTDIR/$n" >&2
Line 415: Line 415:
  
 </file> </file>
- 
computing/batch/jobscriptexample.txt · Last modified: 2017/06/07 20:59 by iwn