[scilab-Users] FW: Help !--error 21

Mathieu Dubois mathieu.dubois at limsi.fr
Mon Nov 15 00:19:16 CET 2010


Sorry but I have no clue about this...

I know that the Linux kernel (as probably most kernels) is sometimes 
optimistic about allocating memory. Basically the kernel says "ok" when 
an application allocates memory (anticipating that other applications 
may soon release memory). So sometimes when the application really ask 
for it, the kernel is trapped.

I'm not sure that this is related (because usually some processes are 
killed in this case) but I have experienced this with an application 
that was allocating a lot of memory and not releasing it properly.

So maybe in your case scilab dynamically allocates data as your data 
grows, causing the error. This is pure speculation.

Did stacksize solve the problem? Generally I adopt behavioral debugging: 
when something works for a few data and not with many, stacksize is the 
key (if someone knows how to make a nice rime... ;)

Mathieu
Le 14/11/2010 23:54, Peng Du a écrit :
> Hi Mathieu,
>
> Thanks for bringing this up.
>
> The thing I don't understand is, if the problem roots from the size of
> data file / amount of memory being used, why it doesn't report a
> exceeded stack size error (what I asked you in
> http://comments.gmane.org/gmane.comp.mathematics.scilab.user/3075) but
> report a error of invalid index?
>
> Regards,
>
> Peng
>
>
> On 14 November 2010 22:45, Mathieu Dubois <mathieu.dubois at limsi.fr
> <mailto:mathieu.dubois at limsi.fr>> wrote:
>
>     Hello Lucas,
>
>     Peng Du reported the same problem as you.
>
>     I think is a matter of stacksize because, as Peng mentionned,
>     reading less data (so using less memory) solves it.
>
>     Did you (both) try to use
>     stacksize(1000000); // Or event bigger
>     on top of your script?
>
>     Mathieu
>
>     Le 14/11/2010 23:11, Lucas Benitez Demmler a écrit :
>
>         Hello, My name is Lucas , I'm from Argentina , and I'm a
>         frecuently user
>         of Scilab. I found a problem when I try to run "spdsolver.sci"
>         I have a problem when i want to run "SPDsolver.sci"
>         In command window appears an error after executing this:
>         !--error 21
>         Invalid index
>
>         SPDSolve file use internally a function called SPDverif but i don't
>         understand why it is not working.
>         Both files were translated form MATLAB to SCILAB and i use
>         loadmatfile
>         command to load all the variables.
>         I would like to know where the mistake is.
>         I'm sending you the .sci files for testing
>         thanks in advance for your help
>
>         Lucas Benitez Demmler
>         Universidad Tecnologica Nacional - FRHaedo - Bs As - Argentina
>
>



More information about the users mailing list