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.4 | jun 27, 2013 | octave or octave/3.6.4 |
3.6.1 | may 1, 2012 | octave/3.6.1 |
3.2.4 | sept. 8, 2011 | octave/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