GNU Octave 3.8.2 Source Installation
GNU Octave is a high-level language, primarily intended for numerical computations. It makes a very good alternative to MATLAB.
Download from ftp://ftp.gnu.org/gnu/octave/
wget ftp://ftp.gnu.org/gnu/octave/octave-3.8.2.tar.bz2
Extract to /usr/local/src/OCTAVE
cd /usr/local/src/OCTAVE
tar xvjf octave-3.8.2.tar.bz2
Several applications should already be installed prior to installing Octave. These should have their paths set via environment modules. Change to source directory run and load the following environment module files.
cd octave-3.8.2
module load atlas
module load java
module load lapack
module load blas
module load openmpi-gcc
module load pcre
Run configuration from the following script...
../config
The script has the following options.
#!/bin/bash
install=$(basename $(pwd) | sed 's%-%/%')
CFLAGS="-m64 -g -Wall -fPIC" ./configure --prefix=/usr/local/$install --enable-shared --enable-docs=yes --with-umfpack="-lumfpack -lsuitesparseconfig --disable-readline"
... and Install
make
make check
make install
Create module files
nano .desc
nano .version
nano .base
ln -s .base 3.6.4
The .base file takes the following form.
#%Module1.0#####################################################################
##
## $name modulefile
##
set ver [lrange [split [ module-info name ] / ] 1 1 ]
set name [lrange [split [ module-info name ] / ] 0 0 ]
set loading [module-info mode load]
set desc [join [read [ open "/usr/local/Modules/modulefiles/$name/.desc" ] ] ]
proc ModulesHelp { } {
puts stderr "\tThis module sets the envinronment for $name v$ver"
}
module-whatis "$desc (v$ver)"
if { $loading && ![ is-loaded lapack ] || ![ is-loaded atlas ] } {
module load lapack
}
#prepend-path --delim " " CPPFLAGS -I/usr/local/$name/$ver/include
#prepend-path --delim " " LDFLAGS -L/usr/local/$name/$ver/lib
prepend-path LD_LIBRARY_PATH /usr/local/$name/$ver/lib
#prepend-path MANPATH /usr/local/$name/$ver/share/man
prepend-path PATH /usr/local/$name/$ver/bin