dmwm / CRAB2

CRAB2
2 stars 11 forks source link

jobs wrapper should autodetect stdout/stderr location for OSB #859

Closed ericvaandering closed 10 years ago

ericvaandering commented 10 years ago

Original Savannah ticket 99661 reported by belforte on Sat Jan 5 10:20:23 2013.

this will be general and definitive fix for https://savannah.cern.ch/bugs/index.php?99641

as Igor indicated: -------- Original Message -------- Subject: Re: submit-2 testing Resent-Date: Thu, 3 Jan 2013 18:18:32 +0100 (CET) Resent-From: <stefano.belforte@cern.ch> Date: Thu, 3 Jan 2013 09:18:22 -0800 From: Igor Sfiligoi <sfiligoi@fnal.gov> To: Stefano Belforte <stefano.belforte@cern.ch> CC: James Letts <letts@physics.ucsd.edu>

You should use the /proc instance instead.

Else, you are replacing an undocumented behavior with another.

/proc/$$/fd/1 points to the stdout

/proc/$$/fd/2 points to the stderr.

You can either just plain copy them over if CMSSW_${NJob}.stdout does not exist.

As for double file return... not clear how to get rid of it in pure Condor. Maybe you should just explicitly truncate/rename them in your script?

My 2c, Igor

sfiligoi@e6500:~/tmp$ cat >a.sh

!/bin/bash

ls -l /proc/$$/fd/1 ls -l /proc/$$/fd/2 sfiligoi@e6500:~/tmp$ chmod a+x a.sh sfiligoi@e6500:~/tmp$ ./a.sh lrwx------ 1 sfiligoi sfiligoi 64 Jan 3 09:11 /proc/3878/fd/1 -> /dev/pts/0 lrwx------ 1 sfiligoi sfiligoi 64 Jan 3 09:11 /proc/3878/fd/2 -> /dev/pts/0 sfiligoi@e6500:~/tmp$ ./a.sh >a.out 2>a.err sfiligoi@e6500:~/tmp$ cat a.out l-wx------ 1 sfiligoi sfiligoi 64 Jan 3 09:11 /proc/3881/fd/1 -> /home/sfiligoi/tmp/a.out l-wx------ 1 sfiligoi sfiligoi 64 Jan 3 09:11 /proc/3881/fd/2 -> /home/sfiligoi/tmp/a.err

ericvaandering commented 10 years ago

Comment by belforte on Wed Jun 5 12:26:07 2013

fix tested and committed, now use /proc/$$/fd as suggested

/local/reps/CMSSW/COMP/CRAB/python/Scheduler.py,v <-- Scheduler.py new revision: 1.106; previous revision: 1.105

ericvaandering commented 10 years ago

Closed by belforte on Fri Jul 12 04:59:14 2013

ericvaandering commented 10 years ago

Comment by belforte on Fri Jul 12 04:59:14 2013

released in Crab client 2_8_8