RE : [scilab-Users] amount of memory available

Michaël Baudin michael.baudin at scilab.org
Fri Sep 10 16:15:33 CEST 2010


  Here is what I can say :
  * the default size of the stack is 5 000 000 doubles, which 
corresponds to 40 MB that can be entirely filled with a dense square 
2236 x 2236 matrix;
  * the upper limit of the size of the stack is 250 000 000 doubles, 
which corresponds to 2 GB that can be entirely filled with a dense 
square 15811 x 15811 matrix.

You use a Windows XP 32 bits with Scilab 5.2.2. You should be able to 
increase your stack size up to 1.8 GB approximately, because Windows 
reserves some amount of memory for its own use. You may actually face a 
bug in Scilab 5.2.2, since there has been some activity on this side 
during the last months or so. If you will, you may try the 5.3.0-beta-3 :

http://www.scilab.org/fr/products/scilab/download/5.3.0-beta-3

It may fix your bug. If not, please report it on our bug tracker :

http://bugzilla.scilab.org/index.cgi

Best regards,

Michaël Baudin

PS

function mstr = stacksize2memory ( sz )
  // Converts the size of the stack to the corresponding memory in the OS
  m = sz * 64 / 8
  if ( m < 10^3 ) then
    mstr = msprintf("%d B",floor(m))
  elseif ( m < 10^6 ) then
    m = m/1.e3
    mstr = msprintf("%d kB",floor(m))
  elseif ( m < 10^9 ) then
    m = m/1.e6
    mstr = msprintf("%d MB",floor(m))
  else
    m = m/1.e9
    mstr = msprintf("%d GB",floor(m))
  end
endfunction

sz = 5000000;
stacksize2memory (sz) // 40 MB
n = floor(sqrt(sz)) // ~2236 x 2236

sz = 250000000;
stacksize2memory (sz) // 2 GB
n = floor(sqrt(sz)) // ~15811 x 15811

Le 09/09/2010 12:08, Collewet Guylaine a écrit :
> Hello,
>
> Thank you for your answer
>
> I am working under window XP and I would like to increase the stacksize in order to manage a huge set of elements (about 1.5 GO)
>
> In fact I did not notice that the units of stacksize function is 8 bytes, which means that 100 MO of stack corresponds in fact to 800 MO
>
> By the way, it seems that stacksize('max') does not work properly on my computer :
> -->stacksize('max')
> -->stacksize
>   ans  =
>      27130576.    33095.
> -->stacksize(1e8)
> -->stacksize
>   ans  =
>      1.000D+08    33095.
>
>
> Best regards
>
> Guylaine
>
>
> -------- Message d'origine--------
> De: Michaël Baudin [mailto:michael.baudin at scilab.org]
> Date: mer. 08/09/2010 16:15
> À: users at lists.scilab.org
> Objet : Re: [scilab-Users] amount of memory available
>
>    Hello,
>
> It actually depends on several factors, such as the operating system and
> the processes which are running at the time where you launch the
> stacksize("max") function. The upper bound is 2GB, but your 700MB are
> well under this limit, so that it should work. If you are able to close
> some other applications, you may see some increasing of the stack.
>
> But why do you want to increase the stack size, do you actually observe
> the "stack size exceeded!" message ?
>
> Best regards,
>
> Michaël Baudin
>
> Le 07/09/2010 18:21, Collewet Guylaine a écrit :
>> Hello,
>>
>> I would like to know what is the maximum amount of memory available in
>> scilab 5.2.2
>>
>> I could not get more than approximately 110 M0 using both stacksize
>> and gstacksize although the total amount of memory available on my
>> computer is 700 MO
>>
>> thanks
>>
>> Guylaine Collewet
>>
>


-- 
Michaël Baudin
Ingénieur de développement
michael.baudin at scilab.org
-------------------------
Consortium Scilab - Digiteo
Domaine de Voluceau - Rocquencourt
B.P. 105 - 78153 Le Chesnay Cedex
Tel. : 01 39 63 56 87 - Fax : 01 39 63 55 94


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20100910/963ab2fd/attachment.htm>


More information about the users mailing list