Enable large arrays: Build octave such that it can use arrays larger than 2Gb.: Difference between revisions

From Octave
Jump to navigation Jump to search
No edit summary
m (Undo spam edit)
Line 13: Line 13:
With this option, Octave will use internally 64-bit integers for array dimensions and indexing. However, '''all numerical libraries''' used by Octave will need to use also 64-bit integers for array dimensions and indexing, and in most cases they need to be compiled from source.
With this option, Octave will use internally 64-bit integers for array dimensions and indexing. However, '''all numerical libraries''' used by Octave will need to use also 64-bit integers for array dimensions and indexing, and in most cases they need to be compiled from source.


For details about how to compile these libraries please read the [http://adf.ly/4hRa0 GNU Octave manual].
For details about how to compile these libraries please read the [http://www.gnu.org/software/octave/doc/interpreter/Compiling-Octave-with-64_002dbit-Indexing.html#Compiling-Octave-with-64_002dbit-Indexing GNU Octave manual].


<!--
<!--

Revision as of 20:16, 12 January 2012

Note: the following only applies to systems that have 64-bit pointers (64bit architecture)

By default, the size of a single Octave array cannot exceed 2 GB of memory. Trying to create one will produce the following error:

octave:1> a = zeros(1024,1024,512);
error: memory exhausted or requested size too large for range of Octave's index type -- trying to return to prompt

You will obtain this error even if your system has enough RAM to create this array (4 GB in the above case).

To use arrays larger than 2 GB, Octave has to be configured with the option --enable-64. This option is experimental and you are (as always) encouraged to submit bug reports if you find a problem. With this option, Octave will use internally 64-bit integers for array dimensions and indexing. However, all numerical libraries used by Octave will need to use also 64-bit integers for array dimensions and indexing, and in most cases they need to be compiled from source.

For details about how to compile these libraries please read the GNU Octave manual.