207 |
|
txt += '#\n' |
208 |
|
txt += '# Copy Input Data from SE to this WN\n' |
209 |
|
txt += '#\n' |
210 |
< |
txt +='lcg-cp --vo $VO lfn:$input_lfn file:`pwd`/$the_ntuple 2>&1\n' |
211 |
< |
txt +='copy_input_exit_status=$?\n' |
212 |
< |
txt +='echo "COPY_INPUT_EXIT_STATUS = $copy_input_exit_status"\n' |
213 |
< |
txt +='if [ $copy_input_exit_status -ne 0 ]; then \n' |
214 |
< |
txt +=' echo "Problems with copying to WN" \n' |
215 |
< |
txt +='else \n' |
216 |
< |
txt +=' echo "input copied into WN" \n' |
217 |
< |
txt +='fi \n' |
210 |
> |
### changed by georgia (put a loop copying more than one input files per jobs) |
211 |
> |
txt +='for input_file in $cur_file_list \n' |
212 |
> |
txt +='do \n' |
213 |
> |
txt +=' lcg-cp --vo $VO lfn:$input_lfn/$input_file file:`pwd`/$input_file 2>&1\n' |
214 |
> |
txt +=' copy_input_exit_status=$?\n' |
215 |
> |
txt +=' echo "COPY_INPUT_EXIT_STATUS = $copy_input_exit_status"\n' |
216 |
> |
txt +=' if [ $copy_input_exit_status -ne 0 ]; then \n' |
217 |
> |
txt +=' echo "Problems with copying to WN" \n' |
218 |
> |
txt +=' else \n' |
219 |
> |
txt +=' echo "input copied into WN" \n' |
220 |
> |
txt +=' fi \n' |
221 |
> |
txt +='done \n' |
222 |
> |
### copy a set of PU ntuples (same for each jobs -- but accessed randomly) |
223 |
> |
txt +='for file in $cur_pu_list \n' |
224 |
> |
txt +='do \n' |
225 |
> |
txt +=' lcg-cp --vo $VO lfn:$pu_lfn/$file file:`pwd`/$file 2>&1\n' |
226 |
> |
txt +=' copy_input_exit_status=$?\n' |
227 |
> |
txt +=' echo "COPY_INPUT_PU_EXIT_STATUS = $copy_input_pu_exit_status"\n' |
228 |
> |
txt +=' if [ $copy_input_pu_exit_status -ne 0 ]; then \n' |
229 |
> |
txt +=' echo "Problems with copying pu to WN" \n' |
230 |
> |
txt +=' else \n' |
231 |
> |
txt +=' echo "input pu files copied into WN" \n' |
232 |
> |
txt +=' fi \n' |
233 |
> |
txt +='done \n' |
234 |
> |
txt +='\n' |
235 |
> |
txt +='### Check SCRATCH space available on WN : \n' |
236 |
> |
txt +='df -h \n' |
237 |
|
return txt |
238 |
|
|
239 |
|
def wsCopyOutput(self): |
249 |
|
txt += 'if [ $exe_result -eq 0 ]; then\n' |
250 |
|
txt += ' for out_file in $file_list ; do\n' |
251 |
|
txt += ' echo "Trying to copy output file to $SE "\n' |
252 |
< |
txt += ' echo "lcg-cp --vo cms -t 30 file://`pwd`/$out_file gsiftp://${SE}${SE_PATH}$out_file"\n' |
252 |
> |
txt += ' echo "lcg-cp --vo cms -t 1200 file://`pwd`/$out_file gsiftp://${SE}${SE_PATH}$out_file"\n' |
253 |
|
# txt += ' echo "globus-url-copy file://`pwd`/$out_file gsiftp://${SE}${SE_PATH}$out_file"\n' |
254 |
< |
txt += ' exitstring=`lcg-cp --vo cms -t 30 file://\`pwd\`/$out_file gsiftp://${SE}${SE_PATH}$out_file 2>&1`\n' |
254 |
> |
txt += ' exitstring=`lcg-cp --vo cms -t 1200 file://\`pwd\`/$out_file gsiftp://${SE}${SE_PATH}$out_file 2>&1`\n' |
255 |
|
# txt += ' exitstring=`globus-url-copy file://\`pwd\`/$out_file gsiftp://${SE}${SE_PATH}$out_file 2>&1`\n' |
256 |
|
txt += ' copy_exit_status=$?\n' |
257 |
|
txt += ' echo "COPY_EXIT_STATUS = $copy_exit_status"\n' |
345 |
|
jdl = common.job_list[nj].jdlFilename() |
346 |
|
cmd = 'edg-job-list-match ' + self.configOpt_() + jdl |
347 |
|
cmd_out = runCommand(cmd,0,10) |
348 |
+ |
if not cmd_out: |
349 |
+ |
raise CrabException("ERROR: "+cmd+" failed!") |
350 |
+ |
|
351 |
|
return self.parseListMatch_(cmd_out, jdl) |
352 |
|
|
353 |
|
def parseListMatch_(self, out, jdl): |
631 |
|
|
632 |
|
if self.EDG_cpu_time: |
633 |
|
if (req == 'Requirement = '): |
634 |
< |
req = req + ' && other.GlueCEPolicyMaxCPUTime>='+self.EDG_cpu_time |
634 |
> |
req = req + ' other.GlueCEPolicyMaxCPUTime>='+self.EDG_cpu_time |
635 |
|
else: |
636 |
< |
req = req + 'other.GlueCEPolicyMaxCPUTime>='+self.EDG_cpu_time |
636 |
> |
req = req + ' && other.GlueCEPolicyMaxCPUTime>='+self.EDG_cpu_time |
637 |
|
if (req != 'Requirement = '): |
638 |
|
req = req + ';\n' |
639 |
|
jdl.write(req) |