Versions Compared

Key

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

...

A batch or serial job is generally run on a single node. The following is a very simple example of a non-parallel batch job using Matlab functions. 

Info

Matlab's Parallel toolbox does not work well if you set a shell preference in your SGE request. If you otherwise use a #$ -S <shell> designation in your SGE scripts, it is best to remove them when submitting parallel Matlab jobs.

Code Block
languagebash
titleSimple Matlab batch job: mat-test.sh
#!/bin/bash
# The name of the job:
#$ -N MatlabTest
# Name of the output log file:
#$ -o matjob.log
# Combining output/error messages into one file:
#$ -j y
# Specifying the Queue
#$ -q UI
# One needs to tell the queue system to use the current directory as the working directory
#$ -cwd
# The command(s) to be executed:
matlab -nodisplay -nodesktop -nojvm -r batch
# Note after -r is the name of the routine or function

...