<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Compiling Octave with 64-bit Indexing (GNU Octave (version 5.1.0))</title> <meta name="description" content="Compiling Octave with 64-bit Indexing (GNU Octave (version 5.1.0))"> <meta name="keywords" content="Compiling Octave with 64-bit Indexing (GNU Octave (version 5.1.0))"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="makeinfo"> <link href="index.html#Top" rel="start" title="Top"> <link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index"> <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> <link href="Installation.html#Installation" rel="up" title="Installation"> <link href="Installation-Problems.html#Installation-Problems" rel="next" title="Installation Problems"> <link href="Running-Configure-and-Make.html#Running-Configure-and-Make" rel="prev" title="Running Configure and Make"> <style type="text/css"> <!-- a.summary-letter {text-decoration: none} blockquote.indentedblock {margin-right: 0em} blockquote.smallindentedblock {margin-right: 0em; font-size: smaller} blockquote.smallquotation {font-size: smaller} div.display {margin-left: 3.2em} div.example {margin-left: 3.2em} div.lisp {margin-left: 3.2em} div.smalldisplay {margin-left: 3.2em} div.smallexample {margin-left: 3.2em} div.smalllisp {margin-left: 3.2em} kbd {font-style: oblique} pre.display {font-family: inherit} pre.format {font-family: inherit} pre.menu-comment {font-family: serif} pre.menu-preformatted {font-family: serif} pre.smalldisplay {font-family: inherit; font-size: smaller} pre.smallexample {font-size: smaller} pre.smallformat {font-family: inherit; font-size: smaller} pre.smalllisp {font-size: smaller} span.nolinebreak {white-space: nowrap} span.roman {font-family: initial; font-weight: normal} span.sansserif {font-family: sans-serif; font-weight: normal} ul.no-bullet {list-style: none} --> </style> <link rel="stylesheet" type="text/css" href="octave.css"> </head> <body lang="en"> <a name="Compiling-Octave-with-64_002dbit-Indexing"></a> <div class="header"> <p> Next: <a href="Installation-Problems.html#Installation-Problems" accesskey="n" rel="next">Installation Problems</a>, Previous: <a href="Running-Configure-and-Make.html#Running-Configure-and-Make" accesskey="p" rel="prev">Running Configure and Make</a>, Up: <a href="Installation.html#Installation" accesskey="u" rel="up">Installation</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p> </div> <hr> <a name="Compiling-Octave-with-64_002dbit-Indexing-1"></a> <h3 class="section">E.3 Compiling Octave with 64-bit Indexing</h3> <p>Note: the following only applies to systems that have 64-bit pointers. Configuring Octave with <samp>--enable-64</samp> cannot magically make a 32-bit system have a 64-bit address space. </p> <p>On 64-bit systems, Octave uses 64-bit integers for indexing arrays by default. If the configure script determines that your <small>BLAS</small> library uses 32-bit integers, then operations using the following libraries are limited to arrays with dimensions that are smaller than <em>2^{31}</em> elements: </p> <ul> <li> <small>BLAS</small> </li><li> <small>LAPACK</small> </li><li> QRUPDATE </li><li> SuiteSparse </li><li> <small>ARPACK</small> </li></ul> <p>Additionally, the following libraries use <code>int</code> internally, so maximum problem sizes are always limited: </p> <ul> <li> <small>GLPK</small> </li><li> Qhull </li></ul> <p>Except for <small>GLPK</small> and Qhull, these libraries may also be configured to use 64-bit integers, but most systems do not provide packages built this way. If you wish to experiment with large arrays, the following information may be helpful. </p> <p>The following instructions were tested with the development version of Octave and GCC 4.3.4 on an x86_64 Debian system and may be out of date now. Please report any problems or corrections on the Octave bug tracker. </p> <p>The versions listed below are the versions used for testing. If newer versions of these packages are available, you should try to use them, although there may be some differences. </p> <p>All libraries and header files will be installed in subdirectories of <code>$prefix64</code> (you must choose the location of this directory). </p> <ul> <li> <small>BLAS</small> and <small>LAPACK</small> (<a href="http://www.netlib.org/lapack">http://www.netlib.org/lapack</a>) <p>Reference versions for both libraries are included in the reference <small>LAPACK</small> 3.2.1 distribution from <a href="netlib.org">netlib.org</a>. </p> <ul class="no-bullet"> <li>- Copy the file <samp>make.inc.example</samp> and name it <samp>make.inc</samp>. The options <samp>-fdefault-integer-8</samp> and <samp>-fPIC</samp> (on 64-bit CPU) have to be added to the variable <code>OPTS</code> and <code>NOOPT</code>. </li><li>- Once you have compiled this library make sure that you use it for compiling Suite Sparse and Octave. In the following we assume that you installed the <small>LAPACK</small> library as $prefix64/lib/liblapack.a. </li></ul> </li><li> QRUPDATE (<a href="https://sourceforge.net/projects/qrupdate">https://sourceforge.net/projects/qrupdate</a>) <p>In the <samp>Makeconf</samp> file: </p> <ul class="no-bullet"> <li>- Add <samp>-fdefault-integer-8</samp> to <code>FFLAGS</code>. </li><li>- Adjust the <small>BLAS</small> and <small>LAPACK</small> variables as needed if your 64-bit aware <small>BLAS</small> and <small>LAPACK</small> libraries are in a non-standard location. </li><li>- Set <code>PREFIX</code> to the top-level directory of your install tree. </li><li>- Run <code>make solib</code> to make a shared library. </li><li>- Run <code>make install</code> to install the library. </li></ul> </li><li> SuiteSparse (<a href="http://faculty.cse.tamu.edu/davis/suitesparse.html">http://faculty.cse.tamu.edu/davis/suitesparse.html</a>) <p>Pass the following options to <code>make</code> to enable 64-bit integers for <small>BLAS</small> library calls. On 64-bit Windows systems, use <code>-DLONGBLAS="long long"</code> instead. </p> <div class="example"> <pre class="example">CFLAGS='-DLONGBLAS=long' CXXFLAGS='-DLONGBLAS=long' </pre></div> <p>The SuiteSparse makefiles don’t generate shared libraries. On some systems, you can generate them by doing something as simple as </p> <div class="example"> <pre class="example">top=$(pwd) for f in *.a; do mkdir tmp cd tmp ar vx ../$f gcc -shared -o ../${f%%.a}.so *.o cd $top rm -rf tmp done </pre></div> <p>Other systems may require a different solution. </p> </li><li> <small>ARPACK</small> (<a href="https://forge.scilab.org/index.php/p/arpack-ng/">https://forge.scilab.org/index.php/p/arpack-ng/</a>) <ul class="no-bullet"> <li>- Add <samp>-fdefault-integer-8</samp> to <code>FFLAGS</code> when running configure. </li><li>- Run <code>make</code> to build the library. </li><li>- Run <code>make install</code> to install the library. </li></ul> </li><li> ATLAS instead of reference <small>BLAS</small> and <small>LAPACK</small> <p>Suggestions on how to compile ATLAS would be most welcome. </p> </li><li> <small>GLPK</small> </li><li> Qhull (<a href="http://www.qhull.org">http://www.qhull.org</a>) <p>Both <small>GLPK</small> and Qhull use <code>int</code> internally so maximum problem sizes may be limited. </p> </li><li> Octave <p>Octave’s 64-bit index support is activated with the configure option <samp>--enable-64</samp>. </p> <div class="example"> <pre class="example">./configure \ LD_LIBRARY_PATH="$prefix64/lib" \ CPPFLAGS="-I$prefix64/include" LDFLAGS="-L$prefix64/lib" \ --enable-64 </pre></div> <p>You must ensure that all Fortran sources except those in the <samp>liboctave/external/ranlib</samp> directory are compiled such that INTEGERS are 8-bytes wide. If you are using gfortran, the configure script should automatically set the Makefile variable <code><span class="nolinebreak">F77_INTEGER_8_FLAG</span></code><!-- /@w --> to <samp>-fdefault-integer-8</samp>. If you are using another compiler, you must set this variable yourself. You should NOT set this flag in <code>FFLAGS</code>, otherwise the files in <samp>liboctave/external/ranlib</samp> will be miscompiled. </p> </li><li> Other dependencies <p>Probably nothing special needs to be done for the following dependencies. If you discover that something does need to be done, please submit a bug report. </p> <ul class="no-bullet"> <li>- pcre </li><li>- zlib </li><li>- hdf5 </li><li>- fftw3 </li><li>- cURL </li><li>- GraphicsMagick++ </li><li>- OpenGL </li><li>- freetype </li><li>- fontconfig </li><li>- fltk </li></ul> </li></ul> <hr> <div class="header"> <p> Next: <a href="Installation-Problems.html#Installation-Problems" accesskey="n" rel="next">Installation Problems</a>, Previous: <a href="Running-Configure-and-Make.html#Running-Configure-and-Make" accesskey="p" rel="prev">Running Configure and Make</a>, Up: <a href="Installation.html#Installation" accesskey="u" rel="up">Installation</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p> </div> </body> </html>