<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Here is what I can say :<br>
     * the default size of the stack is 5 000 000 doubles, which
    corresponds to 40 MB that can be entirely filled with a <span
      class="apple-style-span"><span style="font-size: 11pt;
        font-family: "Arial","sans-serif";"> dense
        square </span></span><span class="apple-style-span"><span
        style="font-size: 11pt; font-family:
        "Arial","sans-serif";">2236 x 2236 </span></span><span
      class="apple-style-span"><span style="font-size: 11pt;
        font-family: "Arial","sans-serif";">matrix;</span></span><br>
     * the upper limit of the size of the stack is <span
      class="apple-style-span"><span style="font-size: 11pt;
        font-family: "Arial","sans-serif";">250 000
        000</span></span> doubles, which corresponds to 2 GB that can be
    entirely filled with a <span class="apple-style-span"><span
        style="font-size: 11pt; font-family:
        "Arial","sans-serif";"> dense square </span></span><span
      class="apple-style-span"><span style="font-size: 11pt;
        font-family: "Arial","sans-serif";">15811 x
        15811</span></span><span class="apple-style-span"><span
        style="font-size: 11pt; font-family:
        "Arial","sans-serif";"> </span></span><span
      class="apple-style-span"><span style="font-size: 11pt;
        font-family: "Arial","sans-serif";">matrix.</span></span><br>
    <br>
    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 :<br>
    <br>
    <a
      href="http://www.scilab.org/fr/products/scilab/download/5.3.0-beta-3">http://www.scilab.org/fr/products/scilab/download/5.3.0-beta-3</a><br>
    <br>
    It may fix your bug. If not, please report it on our bug tracker :<br>
    <br>
    <a href="http://bugzilla.scilab.org/index.cgi">http://bugzilla.scilab.org/index.cgi</a><br>
    <br>
    Best regards,<br>
    <br>
    Michaël Baudin<br>
    <br>
    PS<br>
    <br>
    <span class="apple-style-span"><span style="font-size: 13.5pt;"></span></span><span
      style="font-size: 11pt; font-family:
      "Arial","sans-serif";">function mstr =
      stacksize2memory ( sz )</span><span style="font-size: 13.5pt;"><br>
    </span><span style="font-size: 11pt; font-family:
      "Arial","sans-serif";"> // Converts the size
      of the stack to the corresponding memory in the OS</span><span
      style="font-size: 13.5pt;"><br>
    </span><span style="font-size: 11pt; font-family:
      "Arial","sans-serif";"> m = sz * 64 / 8</span><span
      style="font-size: 13.5pt;"><br>
    </span><span style="font-size: 11pt; font-family:
      "Arial","sans-serif";"> if ( m < 10^3 )
      then</span><span style="font-size: 13.5pt;"><br>
    </span><span style="font-size: 11pt; font-family:
      "Arial","sans-serif";">   mstr = msprintf("%d
      B",floor(m))</span><span style="font-size: 13.5pt;"><br>
    </span><span style="font-size: 11pt; font-family:
      "Arial","sans-serif";"> elseif ( m < 10^6 )
      then</span><span style="font-size: 13.5pt;"><br>
    </span><span style="font-size: 11pt; font-family:
      "Arial","sans-serif";">   m = m/1.e3</span><span
      style="font-size: 13.5pt;"><br>
    </span><span style="font-size: 11pt; font-family:
      "Arial","sans-serif";">   mstr = msprintf("%d
      kB",floor(m))</span><span style="font-size: 13.5pt;"><br>
    </span><span style="font-size: 11pt; font-family:
      "Arial","sans-serif";"> elseif ( m < 10^9 )
      then</span><span style="font-size: 13.5pt;"><br>
    </span><span style="font-size: 11pt; font-family:
      "Arial","sans-serif";">   m = m/1.e6</span><span
      style="font-size: 13.5pt;"><br>
    </span><span style="font-size: 11pt; font-family:
      "Arial","sans-serif";">   mstr = msprintf("%d
      MB",floor(m))</span><span style="font-size: 13.5pt;"><br>
    </span><span style="font-size: 11pt; font-family:
      "Arial","sans-serif";"> else</span><span
      style="font-size: 13.5pt;"><br>
    </span><span style="font-size: 11pt; font-family:
      "Arial","sans-serif";">   m = m/1.e9</span><span
      style="font-size: 13.5pt;"><br>
    </span><span style="font-size: 11pt; font-family:
      "Arial","sans-serif";">   mstr = msprintf("%d
      GB",floor(m))</span><span style="font-size: 13.5pt;"><br>
    </span><span style="font-size: 11pt; font-family:
      "Arial","sans-serif";"> end</span><span
      style="font-size: 13.5pt;"><br>
    </span><span style="font-size: 11pt; font-family:
      "Arial","sans-serif";">endfunction</span><span
      style="font-size: 13.5pt;"><br>
      <br>
    </span><span style="font-size: 11pt; font-family:
      "Arial","sans-serif";">sz = 5000000;</span><span
      style="font-size: 13.5pt;"><br>
    </span><span style="font-size: 11pt; font-family:
      "Arial","sans-serif";">stacksize2memory (sz)
      // 40 MB</span><span style="font-size: 13.5pt;"><br>
    </span><span style="font-size: 11pt; font-family:
      "Arial","sans-serif";">n = floor(sqrt(sz)) //
      ~2236 x 2236</span><span style="font-size: 13.5pt;"><br>
      <br>
    </span><span style="font-size: 11pt; font-family:
      "Arial","sans-serif";">sz = 250000000;</span><span
      style="font-size: 13.5pt;"><br>
    </span><span style="font-size: 11pt; font-family:
      "Arial","sans-serif";">stacksize2memory (sz)
      // 2 GB</span><span style="font-size: 13.5pt;"><br>
    </span><span style="font-size: 11pt; font-family:
      "Arial","sans-serif";">n = floor(sqrt(sz)) //
      ~15811 x 15811<br>
      <br>
    </span>Le 09/09/2010 12:08, Collewet Guylaine a écrit :
    <blockquote
      cite="mid:CC095B4E0F846648814B6F067704C64D02007D55@aven2"
      type="cite">
      <pre wrap="">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 [<a class="moz-txt-link-freetext" href="mailto:michael.baudin@scilab.org">mailto:michael.baudin@scilab.org</a>]
Date: mer. 08/09/2010 16:15
À: <a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
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 :
</pre>
      <blockquote type="cite">
        <pre wrap="">
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

</pre>
      </blockquote>
      <pre wrap="">

</pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Michaël Baudin
Ingénieur de développement
<a class="moz-txt-link-abbreviated" href="mailto:michael.baudin@scilab.org">michael.baudin@scilab.org</a>
-------------------------
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

</pre>
  </body>
</html>