-
Notifications
You must be signed in to change notification settings - Fork 1
/
resubmit_Condor.csh
49 lines (40 loc) · 1.31 KB
/
resubmit_Condor.csh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/tcsh -f
# Make the grid proxy available in ~, if existing and valid
set proxy_valid=`voms-proxy-info --timeleft`
if ($proxy_valid > 10 ) then
echo "GRID proxy found, validity: $proxy_valid s"
if ($?X509_USER_PROXY) then
if ($X509_USER_PROXY != ~/x509up_u${uid}) cp $X509_USER_PROXY ~/x509up_u${uid}
else if (-e /tmp/x509up_u${uid} ) then
cp /tmp/x509up_u${uid} ~
endif
else # Last attempt: Try to see if a valid proxy already exists in ~
if ( -e ~/x509up_u${uid} ) then
setenv X509_USER_PROXY ~/x509up_u${uid}
set proxy_valid=`voms-proxy-info --timeleft`
if ($proxy_valid > 10 ) then
echo "GRID proxy found in ~, validity: $proxy_valid s"
endif
endif
if ($proxy_valid < 10 ) then
echo "Error: no valid GRID proxy found."
exit 1
endif
endif
set JOBNAME=`basename $PWD`
set queue=' -queue directory in'
foreach x (*Chunk*)
set nonomatch
set logFile = ( ${x}/log/*.log )
if ( -e $logFile[1] ) then
echo "\n${x}: job already submitted. If you want to resubmit, ensure all jobs are finished and run cleanup.csh.\nAborting."
exit 1
endif
unset nonomatch
set queue="$queue $x"
end
if (! ($1 == "") ) then
setenv _CONDOR_SCHEDD_HOST bigbird$1.cern.ch
setenv _CONDOR_CREDD_HOST bigbird$1.cern.ch
endif
condor_submit condor.sub $queue