Re: Size limit on lapack matrix?
"Gabriel J. Brostow" <[email protected]>
| Newsgroups | gmane.comp.lib.mtl.devel |
|---|---|
| Message-ID | <[email protected]> |
This is just an update - I can't make a simple example snippet which
reproduces the problem without attaching all my messy libraries, so I
shall just avoid such large matrices for now.
llee, good point - I'm being wasteful with my memory, though I have enough
to spare. At 8 bytes/double I should need about 400Mb (or is there a 2x
overhead??), so I moved from my 512Mb machine to one with 2Gb of RAM.
The same error occurred - this time even earlier: at 5912 x 5912. I now
suspect there is some incompatibility with the behind-the-scenes memory
management of the LEDA library I'm also linking in, though that has been
quite stable in the past. My suspicion is fueled by the fact that I CAN
make and manipulate even larger matrices in a pure-MTL main() - haven't
been able to crash it yet. The problem-code links in LEDA and OpenGL.
Thanks for the response, and I'll post if I find any more clues or better
yet, an explanation,
- Gabe
On Wed, 18 Sep 2002, llee wrote:
>
> How many MB of memory in your machine? 7242x7242 doubles is about 800MB.
> It looks like that you have reach the memory limit (both real and
> virtual) of the machine.
>
> On Wed, 18 Sep 2002, Gabriel J. Brostow wrote:
>
> > I can not construct/access elements within a square matrix of size 7242.
> >
> > I'm not certain, but I suspect this problem isn't just my flawed coding.
> > I'm using VC++ 6.0 with the native compiler, but expect that's not the
> > cause either. Is there some fixed limit on matrix-sizes? Does it apply to
> > both matrix and lapack_matrix?
> >
> > I am performing SVD of 3D matrices with varying numbers of rows. I just
> > happen to have one dataset that's a little larger than the rest (~1.5x),
> > and this causes "Access Violations" in different places. I'm using
> > mtl-2.1.2-20 with all the appropriate patches.
> >
> > Below are two variants of the offending code.
> >
> > // Crash A
> > int M = 7242;
> > mtl2lapack::lapack_matrix<double>::type u(M, M); // Crashes here:
> > // stl's vector allocation dies in _Construct(_T1 _FARQ *_P, const _T2& _V)
> >
> > // Crash B
> > int M = 7242;
> > double* uPtr = new double[M * M];
> > mtl2lapack::lapack_matrix<double, mtl::external>::type u(uPtr, M, M);
> > mtl::set_value(u, 0.0); // Crashes here: inside mtl_set.h's
> > // __set(Matrix A, const T& alpha, fast::count<0>)
> >
> > and if I don't set_value() and just proceed with the call:
> > int info = mtl2lapack::gesvd('A', 'A', A, s, u, vt); // vt is 3x3
> > I get an Access Violation from within dgesvd().
> >
> > How have others dealt with this before?
> >
> > Thanks,
> >
> > -Gabriel J. Brostow
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/
> >
>
> _______________________________________________
> This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/
>
-Gabriel J. Brostow
brostowATcc.gatech.edu
_______________________________________________
This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/