Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Wiki Markup
{jenkins-plugin-info:sge-cloud-plugin}
Excerpt

Submits builds to the Sun Grid Engine (SGE) batch scheduler.  Both the open source version of SGE 2011.11 and the commercial Univa Grid Engine (UGE) 8.3.1 are supported.

...

In Manage Jenkins > Configure System, add Environment Variables:

For open source SGE:

Name

Value

SGE_ROOT

/path/to/sge

SGE_BIN

/path/to/sge/bin/linux-x64

For commercial UGE:

Name

Value

SGE_ROOT

/path/to/uge

SGE_BIN

/path/to/uge/bin/lx-amd64 or .../darwin-x64 or .../win-x86

SGE_CELL

Your cell name

SGE_CLUSTER_NAME

Your cluster name

SGE_EXECD_PORT

64455

SGE_QMASTER_PORT

64444

Environment Variable Troubleshooting

The SGE error message:

Code Block

Unable to initialize environment because of error: cell directory "/path/to/sge/default" doesn't exist

...

By default, the exit status of the last command determines the success or failure of the build step.  For example, the following script would be inappropriately considered a success:

Code Block

ls /nonexistent    # Error, exit status 2
echo "This echo command succeeds with exit status 0 despite the error on the previous line"

If you prefer that your job fail and halt upon the first nonzero exit status, use the Bash -e option.  The following script will fail upon the first error:

Code Block

set -e
ls /nonexistent    # Error, exit status 2
echo "This is never executed because the above ls command failed."

...

So that you can see the qsub command that was used to submit jobs, the SGE Plugin prints the qsub command to the Jenkins job Console Output:

Code Block

Submitting SGE job using the command:
    "$SGE_BIN/qsub" ...    # Options not shown in docs because they will undoubtedly be out-of-date

It is possible to specify additional qsub command line options within the Run job on SGE build script on lines beginning with #$. For example:

Code Block

#$ -P project_name

While this might sometimes be useful, it can cause trouble if your Run job on SGE build step inadvertently contains #$.  In particular, this can happen if you comment out a line that begins with $:

Code Block

#$SOME_COMMAND

There is no such qsub command line option SOME_COMMAND, so you get the unhelpful message:

Code Block

qsub: Unknown option

Job States

...

Exit status above 128 indicates that a signal terminated the job.  See the Github sge-cloud-plugin wiki for Job Exit Status for an explanation of some exit statuses.

Finally, when the Jenkins SGE plugin could not even submit the job to SGE, the job is given the state:

...

sge-cloud-plugin was forked from lsf-cloud-plugin and modified to work with SGE instead of LSF. sge-cloud-plugin being used in industrial production on Wave Computing's Grid Engine compute farm.

...