qsub: command not found - dyim42/SMRT-Analysis GitHub Wiki

SMRT Analysis assumes that SGE is configured for the smrtanalysis user such that the environment variables SGE_ROOT and SGE_CELL are declared and the q-commands are in the user's path. When this is not the case, you may see the following error messages display in the file <job_id>/log/smrtpipe.log:

/bin/sh: qsub: command not found
/bin/sh: qstat: command not found
/bin/sh: qconf: command not found

Or the following error messages display in the <job_id>/log/P_Fetch/overviewRpt.log file:

# Writing stdout and stderr from Popen:
Unable to initialize environment because of error: Please set the environment variable SGE_ROOT.
Exiting.

These messages indicate that the SMRT Analysis user does not have the appropriate environment defined for the job management scheduler installed on the cluster (in this case, SGE). More specifically, the user cannot find the qsub, qstat, or qconf commands in $PATH.

To fix this problem, do the following:

  1. Download the v2.1.1 patch: http://files.pacb.com/software/smrtanalysis/2.1.1/smrtanalysis-2.1.1-patch-0.1.run

  2. Run the smrtupdater script and point it to the .run file:

bash /path/to/smrtanalysis/admin/bin/smrtupdater smrtanalysis-2.1.1-patch-0.1.run

OR

  1. To fix this manually, find out where the q-commands are:
$ which qsub
<path_to_qcommands>/qsub
  1. Create a jms.setup.sh script in $SMRT_ROOT/current/analysis/etc/jms.setup.sh and put the following lines in the script:
export SGE_ROOT=<root_name>
export SGE_CELL=<cell_name>
PATH=$PATH:<path_to_qcommads>;

Where <root_name> is usually /usr/share/gridengine in CentOS, or /var/lib/gridengine in Ubuntu, and <cell_name> is usually default if you installed SGE using yum or apt (recommended). The <path_to_qcommands> is the return from step 1.

  1. Add the jms.setup.sh to the main setup.sh file in $SMRT_ROOT/current/etc/setup.sh
CONFIG_FILES=(
  ${SEYMOUR_HOME}/analysis/etc/setup.sh
  ${SEYMOUR_HOME}/common/etc/setup.sh
  "${SEYMOUR_HOME/analysis/etc/jms.setup.sh"  <-- add this line without the quotes to the CONFIG_FILES definition
)
⚠️ **GitHub.com Fallback** ⚠️