Octave

Octave

GNU Octave is software featuring a high-level programming language, primarily intended for numerical computations. Octave helps in solving linear and nonlinear problems numerically, and for performing other numerical experiments using a language that is mostly compatible with MATLAB.

 

Slurm Script

#!/bin/bash
#SBATCH --job-name=hello_octave
#SBATCH --output=Octaveslurm.out
#SBATCH --error=Octaveslurm.err
#SBATCH --partition=CUIQue
#SBATCH -N 1 # Total number of nodes requested (16 cores/node)
#SBATCH -n 16 # Total number of mpi tasks requested
#SBATCH -t 00:50:00

module load octave/6.3.0

octave --silent --eval hello

 

The code Hello.m

[status, host] = system('hostname');
printf('Hello world from %s\n', host);

A = [1 3 5; 2 5 1; 2 3 8]
inv(A)
det(A)

 

Submit the job to the scheduler as

sbatch OctaveScript.slurm

For managing your “job” , refer to this guide.

For more on OCTAVE, refer to their official documentation
https://wiki.octave.org/Using_Octave