Sometimes when I run jobs on a PBS cluster, I'd really like the joblog (-o file) in two places. One in the $PBS_O_WORKDIR
for keeping everthing together and one ${HOME}/jobOuts/
for greping/awking/etc...
Doing a test from the command line works with tee
:
echo "hello" | qsub -o `tee $HOME/out1.o $HOME/out2.o $HOME/out3.o`
But once I try to put this in my PBS script, it does not work if I put it in a PBS script and qsub
####Parameterized PBS Script ####
#PBS -S /bin/bash
#PBS -l nodes=1
#PBS -l walltime=0:01:00
#PBS -j oe
#PBS -o `tee TEE_TEST.o TEE_TEST.${PBS_JOBID}.o`
#PBS -M me@email.com
#PBS -m abe
#PBS -V
cd $PBS_O_WORKDIR
echo `date`
Here is the qsub and error:
qsub TEST.pbs
qsub: directive error: -o `tee TEE_TEST.o TEE_TEST.${PBS_JOBID}.o`
I tried a few other things below - nothing worked.
One -o line (comma, semi colon and space):
#PBS -o ${PBS_JOBNAME}.${PBS_JOBID}.o,${HOME}/jobOuts/${PBS_JOBNAME}.${PBS_JOBID}.o
#PBS -o ${PBS_JOBNAME}.${PBS_JOBID}.o,${HOME}/jobOuts/${PBS_JOBNAME}.${PBS_JOBID}.o
#PBS -o ${PBS_JOBNAME}.${PBS_JOBID}.o ${HOME}/jobOuts/${PBS_JOBNAME}.${PBS_JOBID}.o
and two lines:
#PBS -o ${PBS_JOBNAME}.${PBS_JOBID}.o
#PBS -o ${HOME}/jobOuts/${PBS_JOBNAME}.${PBS_JOBID}.o
The two works liner just takes the 2nd -o option, and the one liners don't work.
Any suggestions? Is it possible?