Octave is a high-level language, primarily intended for numerical computations. It provides a convenient command-line interface for solving linear and nonlinear problems numerically, and for performing other numerical experiments using a language that is mostly compatible with Matlab. It may also be used as a batch-oriented language.
Octave has extensive tools for solving common numerical linear algebra problems, finding the roots of nonlinear equations, integrating ordinary functions, manipulating polynomials, and integrating ordinary differential and differential-algebraic equations. It is easily extensible and customizable via user-defined functions written in Octave's own language, or using dynamically loaded modules written in C++, C, Fortran, or other languages.
Availability and Restrictions
The following versions of Octave are available on OSC clusters:
You can use
module spider octave to view available modules for a given machine. Feel free to contact OSC Help if you need other versions for your work.
Octave is available to all OSC users without restriction.
Publisher/Vendor/Repository and License Type
Free Software Foundation, Open source
To initialize either cluster for the use of Octave, run the following command:
module load octave
To run Octave, simply run the following command:
The following example batch script will an octave code file
mycode.o via the batch processing system. The script requests one full node of cores on Oakley and 1 hour of walltime.
#PBS -N AppNameJob #PBS -l nodes=1:ppn=12 #PBS -l walltime=01:00:00 #PBS -l software=appname module load octave cd $PBS_O_WORKDIR cp mycode.o $TMPDIR cd $TMPDIR octave < mycode.o > data.out cp data.out $PBS_O_WORKDIR
Working with Packages
See the Octave 4.0.1 documentation on working with packages.
To install a package, launch an Octave session and type the
pkg list command to see if there are any packages within your user scope. There is an issue where global packages may not be seen by particular Octave versions. To see the location of the global packages file use the command
If you are having trouble installing your own packages, you can use the system-wide packages. Due to issues with system-wide installation, you will need to copy the system-wide package installation file to your local package installation file with
cp $OCTAVE_PACKAGES $HOME/.octave_packages.
pkg list you should see packages that you can load. This is clearly not portable and needs to be reperformed within a job script if you are using packages across multiple clusters.