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

Peng Du eddy.pdu at gmail.com
Mon Nov 15 00:35:16 CET 2010


Thanks Mathieu,

The stacksize() solve the my previous issue with the error of "exceeded
stacksize". And this new problem occurred when I tried to read another file.

So if what you described is the actual cause, I guess the stacksize I am
using satisfies Scilab, but it cannot meet the actual requirement hence
comes the invalid index error. Unfortunately I am not able to increase the
size anymore because it already reaches the limit of my desktop. So maybe
Lucas could give it a go and see if it works.

Anyway, I can always separate one large file into several smaller ones.

Regards,

Peng


On 14 November 2010 23:19, Mathieu Dubois <mathieu.dubois at limsi.fr> wrote:

> 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
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20101114/19415014/attachment.htm>


More information about the users mailing list