Project

General

Profile

pbs_script.sh

Marco Mambelli, 01/26/2019 09:16 PM

 
1
#!/bin/bash
2
# PBS job wrapper generated by pbs_submit.sh
3
# on Thu Jan 24 11:00:07 EST 2019
4
#
5
# stgcmd = no
6
# proxy_string = /var/lib/condor-ce/spool/5903/0/cluster4325903.proc0.subproc0/credential_CMSG-v1_0.main_411868
7
# proxy_local_file = /var/lib/condor-ce/spool/5903/0/cluster4325903.proc0.subproc0/credential_CMSG-v1_0.main_411868
8
#
9
# PBS directives:
10
#PBS -S /bin/bash
11
#PBS -o /dev/null
12
#PBS -e /dev/null
13
#PBS -l mem=96000mb
14
#PBS -q cms-d
15
#PBS -l walltime=48:00:00
16
#PBS -N cmsanalysis
17
#PBS -o $HOME/$PBS_JOBID.stdout
18
#PBS -e $HOME/$PBS_JOBID.stderr
19
#PBS -l nodes=1:ppn=24
20
#PBS -m n
21

    
22
# Setting the environment:
23
export "HOME=/home/cmspilot"
24
export "CONDORCE_COLLECTOR_HOST=hammer-osg.rcac.purdue.edu:9619"
25
export "OSG_GRID=/cvmfs/oasis.opensciencegrid.org/osg-software/osg-wn-client/3.4/current/el7-x86_64/"
26
export "OSG_SQUID_LOCATION=squid2.rcac.purdue.edu:3128"
27
export "OSG_SITE_READ="
28
export "OSG_APP=/apps/osg"
29
export "OSG_HOSTNAME=hammer-osg.rcac.purdue.edu"
30
export "OSG_DATA=UNAVAILABLE"
31
export "OSG_WN_TMP=/tmp"
32
export "OSG_STORAGE_ELEMENT=False"
33
export "OSG_SITE_NAME=Purdue-Hammer"
34
export "GLOBUS_LOCATION=/usr"
35
export "OSG_DEFAULT_SE=cms-gridftp.rcac.purdue.edu"
36
export "OSG_SITE_WRITE="
37
export ""
38
GLOBUS_LOCATION="/usr"
39
OSG_APP="/apps/osg"
40
OSG_DATA="UNAVAILABLE"
41
OSG_DEFAULT_SE="cms-gridftp.rcac.purdue.edu"
42
OSG_GRID="/cvmfs/oasis.opensciencegrid.org/osg-software/osg-wn-client/3.4/current/el7-x86_64/"
43
OSG_HOSTNAME="hammer-osg.rcac.purdue.edu"
44
OSG_SITE_NAME="Purdue-Hammer"
45
OSG_SITE_READ=""
46
OSG_SITE_WRITE=""
47
OSG_SQUID_LOCATION="squid2.rcac.purdue.edu:3128"
48
OSG_STORAGE_ELEMENT="False"
49
OSG_WN_TMP="/tmp"
50
export GLOBUS_LOCATION
51
export OSG_APP
52
export OSG_DATA
53
export OSG_DEFAULT_SE
54
export OSG_GRID
55
export OSG_HOSTNAME
56
export OSG_SITE_NAME
57
export OSG_SITE_READ
58
export OSG_SITE_WRITE
59
export OSG_SQUID_LOCATION
60
export OSG_STORAGE_ELEMENT
61
export OSG_WN_TMP
62

    
63
old_home=`pwd`
64
new_home=${old_home}/home_bl_hammer-osg.rcac.purdue.edu_9619_hammer-osg.rcac.purdue.edu#4325920.0#1548345596
65
mkdir $new_home
66
trap 'wait $job_pid; cd $old_home; rm -rf $new_home; exit 255' 1 2 3 15 24
67
trap 'wait $job_pid; cd $old_home; rm -rf $new_home' 0
68
# Copy into new home any shared input sandbox file
69
cp "/var/lib/condor-ce/spool/5903/0/cluster4325903.proc0.subproc0/credential_CMSG-v1_0.main_411868" "$new_home/bl_2b4d886016e9.proxy" &> /dev/null
70
# Move into new home any relative input sandbox file
71
export HOME=$new_home
72
cd $new_home
73
# Resetting proxy to local position
74
export X509_USER_PROXY=$new_home/bl_2b4d886016e9.proxy
75

    
76
# Command to execute:
77
export NODE_COUNT=24
78
 /var/lib/condor-ce/spool/5903/0/cluster4325903.proc0.subproc0/glidein_startup.sh "-v" "std" "-name" "gfactory_instance" "-entry" "CMSHTPC_T2_US_Purdue_HammerC" "-clientname" "CMSG-v1_0.main" "-schedd" "schedd_glideins3@gfactory-1.t2.ucsd.edu" "-proxy" "OSG" "-factory" "SDSC" "-web" "http://gfactory-1.t2.ucsd.edu/factory/stage" "-sign" "4fedf40f84facf72c63fd3cadcc1611f464f5951" "-signentry" "7f2880403391b4c6851517c2d52bf331d370f278" "-signtype" "sha1" "-descript" "description.j1neBA.cfg" "-descriptentry" "description.j1neBA.cfg" "-dir" "OSG" "-param_GLIDEIN_Client" "CMSG-v1_0.main" "-submitcredid" "411868" "-slotslayout" "fixed" "-clientweb" "http://vocms080.cern.ch/vofrontend/stage" "-clientsign" "873889b7a19aca68bc335f90a166994622b29672" "-clientsigntype" "sha1" "-clientdescript" "description.j1lbWN.cfg" "-clientgroup" "main" "-clientwebgroup" "http://vocms080.cern.ch/vofrontend/stage/group_main" "-clientsigngroup" "b9c9dfe5fde79b96235dc83ccdb0e7d63d87542a" "-clientdescriptgroup" "description.j1lbWN.cfg" "-param_CONDOR_VERSION" "8.dot,6.dot,3" "-param_GLIDEIN_Glexec_Use" "OPTIONAL" "-param_CMS_GLIDEIN_VERSION" "17" "-param_GLIDEIN_Job_Max_Time" "14400" "-param_GLIDECLIENT_ReqNode" "gfactory.minus,1.dot,t2.dot,ucsd.dot,edu" "-param_GLIDEIN_CLAIM_WORKLIFE_DYNAMIC" "cpus.star,.open,6.star,3600.close," "-param_USE_PSS" "True" "-param_MEMORY_USAGE_METRIC" "ifthenelse.open,ProportionalSetSizeKb.eq,.question,.eq,UNDEFINED.comma,.open,ResidentSetSize.nbsp,.plus,1023.close,/1024.comma,.open,ProportionalSetSizeKb.nbsp,.plus,.nbsp,1023.close,/1024.close," "-param_GLIDEIN_CCB" "vocms0806.dot,cern.dot,ch.colon,9621.minus,9720.semicolon,cmssrv258.dot,fnal.dot,gov.colon,9621.minus,9720" "-param_GLIDEIN_Max_Idle" "600" "-param_GLIDEIN_Monitoring_Enabled" "False" "-param_CONDOR_ARCH" "default" "-param_UPDATE_COLLECTOR_WITH_TCP" "True" "-param_MIN_DISK_GBS" "1" "-param_GLIDEIN_Max_Tail" "600" "-param_USE_MATCH_AUTH" "True" "-param_CONDOR_OS" "default" "-param_GLIDEIN_Report_Failed" "NEVER" "-param_GLIDEIN_Collector" "cmssrv221.dot,fnal.dot,gov.colon,9621.minus,9720.semicolon,vocms0815.dot,cern.dot,ch.colon,9621.minus,9720" "-cluster" "7239623" "-subcluster" "4" < "/dev/null" > "/var/lib/condor-ce/spool/5903/0/cluster4325903.proc0.subproc0/_condor_stdout" 2> "/var/lib/condor-ce/spool/5903/0/cluster4325903.proc0.subproc0/_condor_stderr" &
79
job_pid=$!
80

    
81
# Wait for the user job to finish
82
wait $job_pid
83
user_retcode=$?
84

    
85
# Move all relative outputsand paths out of temp home
86
cd $new_home
87
# Move any remapped outputsand file to shared directories
88

    
89
# Remove the staged files, if any
90
rm "bl_2b4d886016e9.proxy" 2> /dev/null
91
cd $old_home
92
rm -f /var/lib/condor-ce/spool/5903/0/cluster4325903.proc0.subproc0/credential_CMSG-v1_0.main_411868
93

    
94
exit $user_retcode