User Tools

Site Tools


guide:compiling_octave_3_2_4

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
guide:compiling_octave_3_2_4 [2011/12/07 09:33]
hamish [Compiling Octave 3.2.4 from Source (Under Construction)]
guide:compiling_octave_3_2_4 [2021/12/09 16:42] (current)
Line 1: Line 1:
-====== Compiling Octave 3.2.4 from Source (Under Construction) ====== +====== Compiling Octave 3.2.4 from Source ====== 
  
-This guide is written as to aid CHPC users struggling to compile the Octave version 3.2.4 from source on the Sun Tsessbe Cluster. Its recommended that you make you use of temporary or scratch directory to do all the compilation in (i.e. ~/scratch or /tmp/$USER), as to save disk space in your home directory.+This guide is written as to aid CHPC users in compiling Octave version 3.2.4 from source on the Sun Tsessbe Cluster. Its recommended that you make you use of temporary or scratch directory to do all the compilation in (i.e. ~/scratch or /tmp/$USER), as to save disk space in your home directory.
  
 Also note that for this guide, all binary and libraries are installed home directory, i.e prefix=$HOME. Add the following lines to the end of your .bashrc file Also note that for this guide, all binary and libraries are installed home directory, i.e prefix=$HOME. Add the following lines to the end of your .bashrc file
Line 12: Line 12:
  
  
-===== Prerequisites  =====+===== Prerequisites (optional) =====
  
-=== FFTW  ===+These prerequisites are not necessary but should boost performance,  
 + 
 +=== FFTW   ===
  
 "FFTW is a C subroutine library for computing the discrete Fourier transform (DFT)" [[http://www.fftw.org/|FFTW Homepage]] "FFTW is a C subroutine library for computing the discrete Fourier transform (DFT)" [[http://www.fftw.org/|FFTW Homepage]]
Line 28: Line 30:
   $ make   $ make
   $ make check #test it   $ make check #test it
 +  $ make install
 Make single precision libraries first Make single precision libraries first
   $ cd ..   $ cd ..
Line 35: Line 38:
   $ make   $ make
   $ make check #test it   $ make check #test it
 +  $ make install
 +  
 +
 ===== Download Source ===== ===== Download Source =====
  
Line 44: Line 50:
 ===== Configuration ===== ===== Configuration =====
  
-At the time this guide was written, the f77 compiler was broken [?]: +   $ cd ~/scratch/octave-3.2.4
-   $ f77 --help +
-   /usr/bin/dirname: missing operand +
-   Try `/usr/bin/dirname --help' for more information. +
-   NOTICE: Invoking /usr/bin/f90 -f77 -ftrap=%none --help +
-   /usr/bin/f77: line 43: /usr/bin/f90: No such file or directory +
-   /usr/bin/f77: line 43: exec: /usr/bin/f90: cannot execute: No such file or directory +
-    +
-So gfortran will be used in its place, +
-   $ cd ~/scratch/octave-3.4.3+
    $ mkdir BUILD    $ mkdir BUILD
    $ cd BUILD    $ cd BUILD
-   $ export F77=gfortran +Without any prerequisites packages 
-   $ ../configure --prefix=$HOME --with-blas=$HOME/scratch/lapack-3.4.0/librefblas.a --with-lapack=$HOME/scratch/lapack-3.4.0/liblapack.a --enable-static --without-fftw3f --without-fftw3 --disable-docs +   $ ../configure --prefix=$HOME --without-framework-opengl --without-fftw 
- +With additional package/library  
-Options explained +   $ export LDFLAGS="-L$HOME/lib" 
-  * --- prefix=$HOME, configure for installation into home directory +   $ export CXXFLAGS="-L$HOME/lib" 
-  * ---without-fftw3 --without-fftw3f, Use the included fftpack library for computing Fast Fourier Transforms instead of the fftw3 library. If this option is not chosen the following build was encounter : +   ../configure --prefix=$HOME --without-framework-opengl  
- +    
-  /usr/bin/ld: /usr/local/lib/libfftw3f.a(apiplan.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC +After configuration is complete, alot of warning about missing libraries are given
-  /usr/local/lib/libfftw3f.a: could not read symbols: Bad value +
-  +
-  * --without-umfpack (is the UMFPACK library available?+
- +
- +
-After configuration is complete, alot of warning about missing librarys are given+
      
 ===== Build ===== ===== Build =====
  
    $ make    $ make
-   +
 If errors occur such as  If errors occur such as 
   * 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:compiling_gcc#compiling_gcc|Compiling GCC from Source]]. 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:compiling_gcc#compiling_gcc|Compiling GCC from Source]].
  
 +===== Test =====
 +
 +  $ make check
 +  
 +Test summary, when constructing this guide was :
 +  PASS   5428
 +  FAIL      4
 +
 +
 +===== Install =====
 +
 +  $ make install 
 +  
 +Clean up your installation files. Restore/Setup your .bashrc file,
 +  export LD_LIBRARY_PATH=$HOME/lib64:$LD_LIBRARY_PATH
 +  export LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH
 +  export PATH=$HOME/bin:$PATH
 +  
 +for running octave on the worker nodes, you may need to make a copy of the libblas libraries placed in a folder on the ld_library_path ...
 +  $ cd $HOME/lib
 +  $ cp /usr/lib64/libblas.* ./
/app/dokuwiki/data/attic/guide/compiling_octave_3_2_4.1323243187.txt.gz · Last modified: 2021/12/09 16:42 (external edit)