[Scilab-users] Reintroducing stacksize on Scilab 6 ? was (Re: multiple element by element between large matrix and vector)

Antoine Monmayrant antoine.monmayrant at laas.fr
Wed Mar 23 09:58:25 CET 2016


Le 09/28/2015 12:01 PM, Clément David a écrit :
> Hello all,
>
>> Also, if you don't already know about it, stacksize is a handy Scilab
>> function if you're working with large data arrays.  "stacksize max"
>> will
>> either give you the biggest Scilab stack that can be had or crash
>> your
>> machine, depending on your version (it appears to work in the current
>> version).  "stacksize(nnn)" will set your stacksize to nnn, without
>> crashing your machine (to my knowledge).  "stacksize" will report the
>> current stacksize.
> As a reference, David posted a bug on that
> http://bugzilla.scilab.org/show_bug.cgi?id=14176 and he targets Scilab
> 6.
>
> So I have a question on your needs for Scilab 6. There is currently no
> more stacksize as all the system's memory is available. To protect
> users, I suggested to re-introduce `stacksize` with a changed behavior
> :
>
>   * M=stacksize(N) : will set N * sizeof(double) bytes available on the
> Scilab datatypes raw memory
>                      will return M the previous sett'ed value
>   * stacksize('max') : will disable any memory restriction
>
> ## Why re-introducing `stacksize` ?
>
> On my Linux system (with 8Go of RAM and some applications started),
> allocating all my memory (like with `zeros(2**30,2**3)`) slow my
> computer down and succeed after a lot of time. Reducing the memory
> available to Scilab using `stacksize` will help user discover algorithm
> or memory issues more rapidly and without swapping most of the other
> applications *by default* .
>
> My point is not to limit the available memory issue but ease language
> usage for new-comers by protect them against typo or mis-design
> algorithms.



>
> Awaiting your opinion,

Fine by me.
Also, as I just mention on this bug report 
http://bugzilla.scilab.org/show_bug.cgi?id=14266 we should keep 
stacksize in 6.0 as it was not deprecated in 5.5.2.

Cheers,

Antoine
>
> --
> Clément <david> David
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>



More information about the users mailing list