Skip to content

Instantly share code, notes, and snippets.

@rpetit3
Last active September 8, 2016 15:13
Show Gist options
  • Save rpetit3/bb885b3965d650e338fd5bf007d772ad to your computer and use it in GitHub Desktop.
Save rpetit3/bb885b3965d650e338fd5bf007d772ad to your computer and use it in GitHub Desktop.
An example outline for submitting jobs to SGE on Loma.
#! /bin/bash
#$ -wd YOUR_WORKING_DIRECTORY
#$ -V # << Imports current environment variables
#$ -N YOUR_JOB_NAME
#$ -S /bin/bash # << which shell to use
#$ -pe orte NUM_CPU # << Loma has 20 slots to give, if more than 10 only one job will run
#$ -o YOUR_JOB_STDOUT
#$ -e YOUR_JOB_STDERR
# Example Environment Variables
export PATH=/home/rpetit/bin:$PATH
export PYTHONPATH=/home/rpetit/libs/python:$PYTHONPATH
# Command
/home/rpetit/bin/SOME_COMMAND ARG1 ARG2 ... ARGN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment