Re: [Lapackpp-devel] Memory Allocation
Status: Beta
Brought to you by:
cstim
|
From: kevin c. <kev...@gm...> - 2005-09-16 10:17:17
|
Thanks, I will try and make such an example.
Kevin.
---------- Forwarded message ----------
From: Christian Stimming <sti...@tu...>
Date: 16-Sep-2005 11:11
Subject: Re: [Lapackpp-devel] Memory Allocation
To: kev...@gm...
Cc: lap...@li...
Dear Kevin,
thanks for sending the code. However, this code is not (yet) a
standalone example, because you are using many constants that come from
somewhere else. So far I don't yet fully understand the problem. If you
get a segfault, is it possible to obtain a backtrace about where exactly
this segfault occurs? In code like this I would always suspect at first
that some matrix offsets might be out of bounds, which should just as
well give you a segfault. Other than that, the line "LaGenMatDouble
V(D_rows,D_rows);" looks perfectly fine.
Or in other words: I don't know of a segfault in the "normal
construction" of the LaGenMatDouble, aside from when the program really
runs out of memory (for sure this is not a stack/heap problem here, as
the data array is always on the heap). You would need to provide a real
standalone example demonstration of the problem if you need more
assistance from me.
Regards,
Christian
kevin channon schrieb:
> Hi,
>
> The code that I am using is below. The aim is to define a matrix,
> V, of size D_rows x D_rows and fill a diagonal band of width ~ M with
> values and then the rest with zeros. It is symmetric, so I calculate
> the diagonal and super-diagonal elements and then copy these into the
> correct sub-diagonal elements.
>
> ...
>
> This is the offending section of code. It will work fine until I get
> to N ~ 128 and then gives a segmentation fault. I can make the fault
> go away again by choosing a sufficiently large M (which reduces the
> size of D_rows), but this is not really practical, as M is a
> meaningful parameter in my model!
>
> Cheers,
> Kevin
>
>
|