Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle location of log files for different systems #46

Closed
askask opened this issue Aug 31, 2017 · 2 comments
Closed

Handle location of log files for different systems #46

askask opened this issue Aug 31, 2017 · 2 comments

Comments

@askask
Copy link
Contributor

askask commented Aug 31, 2017

In PBS, if you pass

  • nothing: a file a file [jobname].[o|e][jobid] in your home directory
  • -o/-e with an existing directory, it will write a file [jobname].[o|e][jobid] in that directory
  • -o/-e with a filename in an existing directory, it will use that filename, if the parent directory doesn't exist, nothing is written

You need to pass -joe to combine stdout and stderr
To write nothing, the you need to use the -k option
Variable "$PBS_JOBID" in the path will be replaced by the job id

In LFS, if you pass

  • nothing: nothing is written
  • -oo/-eo with an existing directory, it will write a file [jobid].out in that directory
  • -oo/-eo with a filename in an existing directory, it will use that filename, if the parent directory doesn't exist, nothing is written

Stderr is written to the same file as stdout if you don't pass -eo/-e; it seems that also happens if you pass the same directory to both -oo and -eo.
%J in the path will be replaced by the job id, and %I by the array index

BE should make sure that if you use the same options, the same files are written with all systems.

@vinjana
Copy link
Contributor

vinjana commented Oct 4, 2017

Did you try that out for LSF and output to a single file? It seems not to work!

echo "echo stderr > /dev/stderr; echo stdout > /dev/stdout" | bsub -o test1.out -e test1.err
echo "echo stderr > /dev/stderr; echo stdout > /dev/stdout" | bsub -o test2.out
echo "echo stderr > /dev/stderr; echo stdout > /dev/stdout" | bsub -o test3.out -e test3.err

The only command that produces "stderr" in some file is the third one!

@vinjana vinjana moved this from In Progress to Backlog in The BatchEuphoria Project Oct 4, 2017
@fkaercher
Copy link
Member

fkaercher commented Nov 2, 2017

@vinjana when using > /dev/stdout and > /dev/stderr it seems to overwrite the previous output.
I tried it with the following commands and it worked:

# writes both to test1.out
echo 'echo stderr 1>&2; echo stdout' | bsub -o test1.out -e test1.out

# writes both to test2.out
echo 'echo stderr 1>&2; echo stdout' | bsub -o test2.out

# writes to test3.out and test3.err respectively
echo 'echo stderr 1>&2; echo stdout' | bsub -o test3.out -e test3.err

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

3 participants