crash in mshm_refine

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

crash in mshm_refine

c.-2
Hi Marco,

try the following:

  msh = msh3m_structured_mesh (1:80,1:80,1:80,1,1:6);
  msh = mshm_refine (msh, 1);

on my system this crashes Octave.

Even though this problem could actually be too large to handle,
the crash should not happen, I think you should check the validity
of your pointers before writing the output mesh.

c.
Reply | Threaded
Open this post in threaded view
|

RE: crash in mshm_refine

Marco Vassallo2
> From: [hidden email]
> Subject: crash in mshm_refine

> Date: Sat, 6 Jul 2013 09:48:11 +0200
> To: [hidden email]
> CC: [hidden email]
>
> Hi Marco,
>
> try the following:
>
> msh = msh3m_structured_mesh (1:80,1:80,1:80,1,1:6);
> msh = mshm_refine (msh, 1);
>
> on my system this crashes Octave.

on my system this give an error

   error: out of memory or dimension too large for Octave's index type

which seems to occur here:

 line 334:         dolfin::refine (*r_mesh, mesh, cell_markers);

by the way, how can I use a debugger on a DLD function?

Thanks

marco
>
> Even though this problem could actually be too large to handle,
> the crash should not happen, I think you should check the validity
> of your pointers before writing the output mesh.
>
> c.
Reply | Threaded
Open this post in threaded view
|

Re: crash in mshm_refine

Carlo de Falco-2

On 6 Jul 2013, at 14:12, Marco Vassallo <[hidden email]> wrote:

> > From: [hidden email]
> > Subject: crash in mshm_refine
> > Date: Sat, 6 Jul 2013 09:48:11 +0200
> > To: [hidden email]
> > CC: [hidden email]
> >
> > Hi Marco,
> >
> > try the following:
> >
> > msh = msh3m_structured_mesh (1:80,1:80,1:80,1,1:6);
> > msh = mshm_refine (msh, 1);
> >
> > on my system this crashes Octave.
>
> on my system this give an error
>
>    error: out of memory or dimension too large for Octave's index type

that is better that what I get, at least it doesn't crash …

> which seems to occur here:
>
>  line 334:         dolfin::refine (*r_mesh, mesh, cell_markers);

sounds strange to me, I believe that error will be issued later in the
function when you resize the output matrices.

> by the way, how can I use a debugger on a DLD function?

you should run Octave in a debugger and place a breakpoint in "Fmshm_refine"
(the "F" is automatically prepended to the function name by the DEFUN_DLD macro)

If you build Octave from source to run in debug mode you can use the "run_octave"
scritpt provided in the source tree with the "-g" command-line option.

> Thanks
>
> marco

c.
Reply | Threaded
Open this post in threaded view
|

RE: crash in mshm_refine

Marco Vassallo2
> From: [hidden email]
> To: [hidden email]
> CC: [hidden email]
> Subject: Re: crash in mshm_refine
> Date: Sat, 6 Jul 2013 15:12:38 +0000
>
>
> sounds strange to me, I believe that error will be issued later in the
> function when you resize the output matrices.
>
I tried also with another system but still get the same error, and so I can't figure out
exactly where I should add the check on the resize.
 BTW, as the matrix have the same dimension as matrix in input, I don't understand why the resize isn't working.
> > by the way, how can I use a debugger on a DLD function?
>
> you should run Octave in a debugger and place a breakpoint in "Fmshm_refine"
> (the "F" is automatically prepended to the function name by the DEFUN_DLD macro)
>
> If you build Octave from source to run in debug mode you can use the "run_octave"
> scritpt provided in the source tree with the "-g" command-line option.

Thanks, very helpful.

marco

>
> c.