Thanks Mathieu,<div><br></div><div>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.</div><div><br></div><div>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.</div>
<div><br></div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>Anyway, I can always separate one large file into several smaller ones.</div><div><br></div><div>Regards,</div><div><br></div><div>Peng</div>
<div><br><br><div class="gmail_quote">On 14 November 2010 23:19, Mathieu Dubois <span dir="ltr"><<a href="mailto:mathieu.dubois@limsi.fr">mathieu.dubois@limsi.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Sorry but I have no clue about this...<br>
<br>
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.<br>
<br>
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.<br>
<br>
So maybe in your case scilab dynamically allocates data as your data grows, causing the error. This is pure speculation.<br>
<br>
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... ;)<br>
<br>
Mathieu<br>
Le 14/11/2010 23:54, Peng Du a écrit :<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Hi Mathieu,<br>
<br>
Thanks for bringing this up.<br>
<br>
The thing I don't understand is, if the problem roots from the size of<br>
data file / amount of memory being used, why it doesn't report a<br>
exceeded stack size error (what I asked you in<br>
<a href="http://comments.gmane.org/gmane.comp.mathematics.scilab.user/3075" target="_blank">http://comments.gmane.org/gmane.comp.mathematics.scilab.user/3075</a>) but<br>
report a error of invalid index?<br>
<br>
Regards,<br>
<br>
Peng<br>
<br>
<br>
On 14 November 2010 22:45, Mathieu Dubois <<a href="mailto:mathieu.dubois@limsi.fr" target="_blank">mathieu.dubois@limsi.fr</a><br></div><div><div></div><div class="h5">
<mailto:<a href="mailto:mathieu.dubois@limsi.fr" target="_blank">mathieu.dubois@limsi.fr</a>>> wrote:<br>
<br>
Hello Lucas,<br>
<br>
Peng Du reported the same problem as you.<br>
<br>
I think is a matter of stacksize because, as Peng mentionned,<br>
reading less data (so using less memory) solves it.<br>
<br>
Did you (both) try to use<br>
stacksize(1000000); // Or event bigger<br>
on top of your script?<br>
<br>
Mathieu<br>
<br>
Le 14/11/2010 23:11, Lucas Benitez Demmler a écrit :<br>
<br>
Hello, My name is Lucas , I'm from Argentina , and I'm a<br>
frecuently user<br>
of Scilab. I found a problem when I try to run "spdsolver.sci"<br>
I have a problem when i want to run "SPDsolver.sci"<br>
In command window appears an error after executing this:<br>
!--error 21<br>
Invalid index<br>
<br>
SPDSolve file use internally a function called SPDverif but i don't<br>
understand why it is not working.<br>
Both files were translated form MATLAB to SCILAB and i use<br>
loadmatfile<br>
command to load all the variables.<br>
I would like to know where the mistake is.<br>
I'm sending you the .sci files for testing<br>
thanks in advance for your help<br>
<br>
Lucas Benitez Demmler<br>
Universidad Tecnologica Nacional - FRHaedo - Bs As - Argentina<br>
<br>
<br>
</div></div></blockquote>
</blockquote></div><br></div>