Search code examples
rcluster-computingshqsubrscript

I'm not getting an error message in my qsub error log even though I'm running into an error


Here is my .sh script

#PBS -N Polygenic
#PBS -S /bin/bash
#PBS -l walltime=8:00:00
#PBS -l nodes=1:ppn=8
#PBS -l mem=4gb
#PBS -o $HOME/${PBS_JOBNAME}.o${PBS_JOBID}.log
#PBS -e $HOME/${PBS_JOBNAME}.e${PBS_JOBID}.err

module load R
Rscript /group/stranger-lab/ebeiter/PolygenicAdaptationCode-master/Example/Run_Files/exampleHeightRunFile.R

I know that my Rscript is running into an error at line 71 out of 390 because I have run it outside of the cluster and it stops then. But when I look into my error log, it's completely blank. The job takes about 6 hours to run and what I've been doing is just running it on my 4GB Ram Macbook but that is taking so much time and the pipe is breaking to my shell and I'm timing out. I want to submit it as a job to the cluster as a qsub but I'm not getting any feedback on the errors in my log so I can't do that. What is going wrong?


Solution

  • I would suggest redirect errors from Rscript. I run it like

    Rscript >>output.txt 2>&1 script.R
    

    in the PBS script. I suspect Rscript errors are not caught by the scheduler.