This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
guide:compiling_octave [2011/12/06 11:12] hamish [Prerequisite] |
guide:compiling_octave [2021/12/09 16:42] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Compiling Octave 3.4.3 from Source ====== | ||
| + | This guide is written for the Sun Tsessbe Cluster. The reader is advise to read through the INSTALL file located in the Octave Source Folder before proceeding with this guide. Also it recommended to make use of temporary or scratch directory to do all the compilation in (i.e. ~/scratch or / | ||
| + | export LD_LIBRARY_PATH=$HOME/ | ||
| + | export LD_LIBRARY_PATH=$HOME/ | ||
| + | export PATH=$HOME/ | ||
| + | export LDFLAGS=" | ||
| + | export CPPFLAGS=" | ||
| + | export CXXFLAGS=$CPPFLAGS | ||
| + | export F77=gfortran | ||
| - | ====== BROKEN DO NOT USE ====== | + | log out and in again, |
| + | $ gcc --version | ||
| + | gcc (GCC) 4.6.2 | ||
| + | | ||
| - | ====== Compiling Octave from Source ====== | ||
| - | ====== BROKEN DO NOT USE ====== | + | ===== Prerequisites |
| - | + | ||
| - | This guide is written as to try and help CHPC users who are struggling to compile the Octave version required for their codes. This guide is written for the Sun Tsessbe Cluster. The reader is advise to read through the INSTALL file located in the Octave Source they wish to install before proceeding with this guide. | + | |
| - | + | ||
| - | Before you begin, make sure your bash environmental variable are set correctly, for [[quick: | + | |
| - | + | ||
| - | Also note that for this guide, all binary and libraries are installed home directory, i.e prefix=$HOME. My setup | + | |
| - | $ export PATH=/ | + | |
| - | $ export LD_LIBRARY_PATH=/ | + | |
| - | $ export LD_LIBRARY_PATH=/ | + | |
| - | $ gcc --version | + | |
| - | gcc (GCC) 4.3.4 | + | |
| - | + | ||
| - | ===== Prerequisite | + | |
| Before you build Octave, you some libraries need to be built | Before you build Octave, you some libraries need to be built | ||
| Line 55: | Line 53: | ||
| | | ||
| --> ALL PRECISIONS 3180834 268 (0.008%) 0 (0.000%) | --> ALL PRECISIONS 3180834 268 (0.008%) 0 (0.000%) | ||
| - | | ||
| - | Copy Library your lib directory | ||
| - | $cp lib* $HOME/lib | ||
| - | |||
| For more information visit [[ http:// | For more information visit [[ http:// | ||
| - | === FFTW === | + | === PCRE - Perl Compatible Regular Expressions |
| - | + | ||
| - | "FFTW is a C subroutine library for computing the discrete Fourier transform (DFT)" [[http:// | + | |
| - | + | ||
| - | $ cd ~/scratch | + | |
| - | $ wget http:// | + | |
| - | $ tar -xf fftw-3.3.tar.gz | + | |
| - | $ cd fftw-3.3 | + | |
| - | $ mkdir BUILD | + | |
| - | $ cd BUILD | + | |
| - | $ export F77=gfortran | + | |
| - | $ export FFLAGS=-fPIC | + | |
| - | $ ../ | + | |
| - | $ make | + | |
| - | $ make check #test it | + | |
| - | $ make install #only if all tests are passed | + | |
| + | From the [[http:// | ||
| + | === FFTW === | ||
| + | Refer to [[guide: | ||
| === binutils and libtools (optional) === | === binutils and libtools (optional) === | ||
| Line 107: | Line 89: | ||
| # If all the tests are passed, install into you home directory | # If all the tests are passed, install into you home directory | ||
| $ make install | $ make install | ||
| - | | ||
| - | The tool is required, as if the default ld is used error of the following nature occur during the octave build | ||
| - | $ / | ||
| - | use a later version of ld should hopefully avoid this error... | ||
| If you have not already add the following line in your .bashrc file | If you have not already add the following line in your .bashrc file | ||
| Line 131: | Line 109: | ||
| Since the ftp is blocked on the Tsessbe login node, make use of an http mirror to download octave. | Since the ftp is blocked on the Tsessbe login node, make use of an http mirror to download octave. | ||
| $ cd ~/ | $ cd ~/ | ||
| - | $ wget http:// | + | $ wget http:// |
| - | $ tar -xf octave-3.4.0.tar.bz2 | + | $ tar -xf octave-3.4.3.tar.bz2 |
| | | ||
| ===== Configuration ===== | ===== Configuration ===== | ||
| - | At the time this guide was written, the f77 compiler was broken [?]: | + | $ cd ~/ |
| - | $ f77 --help | + | |
| - | / | + | |
| - | Try `/ | + | |
| - | | + | |
| - | / | + | |
| - | / | + | |
| - | + | ||
| - | So gfortran will be used in its place, | + | |
| - | $ cd ~/ | + | |
| $ mkdir BUILD | $ mkdir BUILD | ||
| $ cd BUILD | $ cd BUILD | ||
| - | $ export F77=gfortran | + | $ ../ |
| - | $ ../ | + | |
| - | $ ../configure --prefix=$HOME --without-fftw3 --without-fftw3f --without-umfpack --enable-static | + | |
| - | + | ||
| - | Options explained | + | |
| - | * --- prefix=$HOME, | + | |
| - | * ---without-fftw3 --without-fftw3f, | + | |
| - | + | ||
| - | / | + | |
| - | / | + | |
| - | + | ||
| - | * --without-umfpack (is the UMFPACK library available? | + | |
| After configuration is complete, alot of warning about missing librarys are given | After configuration is complete, alot of warning about missing librarys are given | ||
| Line 171: | Line 129: | ||
| * g++: Internal error: Killed (program cc1plus) | * g++: Internal error: Killed (program cc1plus) | ||
| wait a while and then make again, as the process was killed by the usage limiter which runs on the login node. If nessary try the approach shown in [[guide: | wait a while and then make again, as the process was killed by the usage limiter which runs on the login node. If nessary try the approach shown in [[guide: | ||
| + | |||
| + | ===== Check ===== | ||
| + | |||
| + | $ make check | ||
| + | |||
| + | notable failures are | ||
| + | scripts/ | ||
| + | scripts/ | ||
| + | PASS | ||
| + | |||
| + | Summary: | ||
| + | |||
| + | PASS 6829 | ||
| + | FAIL 11 | ||
| + | |||
| + | |||
| + | ===== Install ===== | ||
| + | |||
| + | $ make install | ||
| + | | ||
| + | Add the following to the end of your .bashrc file | ||
| + | |||
| + | # for Octave 3.4.3 installed in $HOME | ||
| + | export LD_LIBRARY_PATH=$HOME/ | ||
| + | | ||
| + | Log in and out, then | ||
| + | $ octave --version | ||
| + | GNU Octave, version 3.4.3 | ||
| + | Copyright (C) 2011 John W. Eaton and others. | ||