Octave

Octave is a high-level interpreted language compatible with most MATLAB code. It is primarily intended for numerical computations. It provides capabilities for the numerical solution of linear and nonlinear problems, and for performing other numerical experiments. It also provides extensive graphics capabilities for data visualization and manipulation. See http://www.gnu.org/software/octave/ for further details.

Availability on Wesley

  Version    Date Installed    Setup Module  
3.6.4Jun 27, 2013octave or octave/3.6.4
3.6.1May 1, 2012octave/3.6.1
3.2.4Sept. 8, 2011octave/3.2.4

To use octave you must first load the module for the version you want to use as specified in the table above. For example, the following will always load the latest version,

module load octave

while the following will load version 3.4.2 specifically.

module load octave/3.2.4

Note: if you used octave before Wesley began using Modules to manage software then you may have octave explicitly added to your PATH in one or more of your .bashrc, .bash_profile, .cshrc or .login files in your home directory. These references to octave should be removed so they do not interfere with the above module commands.

Running octave Interactively on the headnode

After the module is loaded you can start an interactive octave session by entering the command:

octave

Submitting batch jobs to the queue to be run on compute nodes

Let's assume that you have saved your octave program to a file named array.oct and that the following command will successfully run it interactively:

octave array.oct 1000

(note that this example program takes one numerical argument, 1000 in the above example)

There are two possible methods for submitting this job to the queue.

Using native PBS/Torque scheduler commands:

First, create a Torque/PBS qsub script. In this example we will name it array.qsub and it contains the following four lines:

#!/bin/bash -l
module load octave
cd $PBS_O_WORKDIR
octave --silent --no-window-system array.oct 1000

Next, submit it to the queue with the following qsub command:

qsub -l walltime=2:30:00 array.qsub

Note: The walltime=2:30:00 tells the queueing system that this job should only be allowed to run for a maximum of 2 hours and 30 minutes, after which it should be automatically killed. Be sure to adjust your walltime appropriately.

Using a SHARCNET like sqsub command

An sqsub command similar to that used by SHARCNET is also available.

module load octave
sqsub -r 2.5h -o %J.array octave --silent array.oct 1000