title: How to direct qsub output stream to pwd instead of home
body: <p>After entering a qsub command, the output stream is updated in my home directory  as it runs. This causes two problems for me:</p>
  
  <p>1) My /home/brian folder is slow, even writing a few text characters.  Utilities with a significant amount of output text are depressingly slow. However, my job files are in /tmp/brian and this location is very fast and local to the compute nodes.</p>
  
  <p>2) If I run myscript.sh in /tmp/brian, I'd like the output stream to update in the same folder as it runs, so I can check the results without having to go search in a different folder than the job. </p>
  
  <p>I've tried this and several permutations of the qsub command:</p>
  
  <pre><code>cd /tmp/brian
  set HOME=`pwd`
  qsub -j oe -k oe -d `pwd` -w `pwd` -v "HOME=`pwd`,PBS_O_HOME=`pwd`" "./my_script.sh"
  </code></pre>
  
  <p>I can set the -e and -o options to place the streams in /tmp/brian after the run, but I can't get it to update in /tmp during the run, only my home folder.</p>
  
  <p>If I type the "env" command within my_script.sh, I get these:</p>
  
  <pre><code>HOME=/home/brian
  PWD=/tmp/brian
  PBS_O_HOME=/tmp/brian
  PBS_O_INITDIR=/tmp/brian
  PBS_O_WORKDIR=/tmp/brian
  </code></pre>
  
  <p>The $HOME environment variable is set incorrectly, despite passing it explicitly. Perhaps there's a config file somewhere overriding my settings?</p>