MATLAB: Are there memory limitations for MATLAB 6.0 (R12) on SGI64 machines

32-bit64-biterroririx64MATLABmemorysgi64

Are there memory limitations for MATLAB 6.0 (R12) on SGI64 machines?

Best Answer

MATLAB 5.3 (R11) was available in a 64-bit build, however MATLAB 6.0 (R12) is only available as a 32-bit application. The reason for this difference is that the MATLAB 6.0 (R12) IDE desktop requires a Java Virtual Machine (JVM) to run, whereas MATLAB R11 did not. SGI does not produce a 64-bit JVM at this point, so it seemed there was no advantage to supporting a 64-bit version of MATLAB 6.0 (R12).
Because MATLAB 6.0 (R12) is a 32-bit application, it cannot take full advantage of the available memory on 64-bit SGI machines. Here are the main issues:
1. When running under a 64-bit SGI machine, in MATLAB R11 you can run either the SGI build (32-bit) or the SGI64 build. With the 64-bit build you can have a heap size of up to 2^40. Space is not an issue. However, there are some 32-bit limitations. The number of pointers in a given matrix cannot exceed 2^32 elements, and the precision is still out to 15 digits.
2. With MATLAB 6.0 (R12) we have ONLY the 32-bit build and in theory the heap size of up to 2^31 is allowed. Actually, the 2^31 includes all text, stack, shared libraries, and the heap.
As an example, let's look at some typical memory limits set by a user:
cputime unlimited
filesize unlimited
datasize unlimited
stacksize 524288 kbytes
coredumpsize unlimited
memoryuse 524288 kbytes
vmemoryuse unlimited
descriptors 200
threads 1024
As you can see, this user has a very large stack size, namely 524288 KB. That is 25% of the available space. We believe that when the program is mapped this space is not available for the heap.
In order to alleviate the problem, you can try decreasing the stack space to say 65536 KBi.e. 65 MB. MATLAB does not need such a huge stack space. It uses the heap for most of its storage.
You can set this in $MATLAB/bin/.matlab6rc.sh (where $MATLAB is the root MATLAB directory) under the SGI section to be:
limit stacksize 65536k
You can try it first from the command line to see if it helps.