[Scilab-Dev] Issue with stack in a toolbox

Jonathan Blanchard BlanchardJ at ieee.org
Fri May 15 23:59:49 CEST 2009


Hi,

Are you certain that m1 and n1 are not big enough to cause a lack of
stack space? By default, I think Scilab only allocated 50 meg or
something.

You can print stuff to the prompt with sciprint and scierror. scierror
will raise an error obviously. (They are in the output_stream module)
IIRC you need to include there respective header scierror.h and sciprint.h.


Jonathan Blanchard

On Fri, May 15, 2009 at 6:17 PM, Vincent Lejeune
<vincent.lejeune at institutoptique.fr> wrote:
> Hi,
>
> I am facing another problem in my journey inside the writing of a toolbox.
> I need to create a custom type that need to be manipuled with SciLab command
> line. In fact this is a pointer (to a matrix of double stored in gpu
> memory), so I used the CreateVarFromPtr() function to store it in the stack.
>
> But when I'm trying to retrieve it afterward, SciLab is complaining about a
> stack overflow, and ask me to change its size. However, this is just a lone
> pointer, it shouldnt eat all the stack by itself...
>
> The code is in attachment. Further investigations shows that the line :
>
> "CreateVar(Rhs+1,MATRIX_OF_DOUBLE_DATATYPE,&m1,&n1,&l1);"
>
> is making trouble, but I suspect that the source of the problem is lying in
> a misuse of the retrieve of the value, as my custom "fromGPU" function
> doesnt work as planed (in debug mode).
>
> By the way, how can I print something to the SciLab prompt ?
>
> Thx for help !
>



More information about the dev mailing list