Thread: [Lapackpp-devel] Bug?
Status: Beta
Brought to you by:
cstim
|
From: Jan K. <kor...@gm...> - 2010-09-18 16:08:41
|
Hello,
I intended to use Lapack++ in my CFD project for diploma thesis. But I
found something stange. This simple code crashes, segfault...
#include <stdio.h>
#include <lapackpp/gmd.h> // LaGenMatDouble
using namespace std;
int main() {
LaGenMatDouble matrix ( 25440, 25440 );
cout << matrix(0, 8675);
return 0;
}
I don't know what's going on. I am using version 2.5.3 Are you able to
reproduce the bug or is it just me?
Thank you for your answer.
Sincerely
Jan Korous
|
|
From: Dee <de...@de...> - 2010-09-18 17:39:03
|
Hello,
I get this result:
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Aborted
The problem is in
#5 0x00007ffff75c721e in __cxa_throw () from /usr/lib/libstdc++.so.6
#6 0x00007ffff75c76ad in operator new(unsigned long) () from
/usr/lib/libstdc++.so.6
#7 0x00007ffff75c7769 in operator new[](unsigned long) () from
/usr/lib/libstdc++.so.6
#8 0x00007ffff7bbfa19 in VectorDouble::VectorDouble(unsigned int) ()
from /usr/lib/liblapackpp.so.14
---Type <return> to continue, or q <return> to quit---
#9 0x00007ffff7ba3761 in LaGenMatDouble::LaGenMatDouble(int, int) ()
from /usr/lib/liblapackpp.so.14
#10 0x0000000000400a87 in main () at lap.cpp:9
So I suppose the resulting vector of size 647193600 is too big for the
stack (or heap).
Greetings
Dee
-------- Original-Nachricht --------
Betreff: [Lapackpp-devel] Bug?
Von: Jan Korous <kor...@gm...>
An: lap...@li...
Datum: 18.09.2010 18:08
> Hello,
> I intended to use Lapack++ in my CFD project for diploma thesis. But I
> found something stange. This simple code crashes, segfault...
>
> #include <stdio.h>
> #include <lapackpp/gmd.h> // LaGenMatDouble
>
> using namespace std;
> int main() {
> LaGenMatDouble matrix ( 25440, 25440 );
> cout << matrix(0, 8675);
> return 0;
> }
>
> I don't know what's going on. I am using version 2.5.3 Are you able to
> reproduce the bug or is it just me?
>
> Thank you for your answer.
>
> Sincerely
> Jan Korous
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> lapackpp-devel mailing list
> lap...@li...
> https://lists.sourceforge.net/lists/listinfo/lapackpp-devel
|
|
From: Jan K. <kor...@gm...> - 2010-09-18 18:24:42
|
That's strange. If I got bad_alloc, I would understand but I didn't.
Matter of fact I can access most of the matrix members, even matrix (
25439, 25439 )...
Bad luck :-(
On Sat, Sep 18, 2010 at 7:10 PM, Dee <de...@de...> wrote:
> Hello,
>
> I get this result:
>
> terminate called after throwing an instance of 'std::bad_alloc'
> what(): std::bad_alloc
> Aborted
>
> The problem is in
>
> #5 0x00007ffff75c721e in __cxa_throw () from /usr/lib/libstdc++.so.6
> #6 0x00007ffff75c76ad in operator new(unsigned long) () from
> /usr/lib/libstdc++.so.6
> #7 0x00007ffff75c7769 in operator new[](unsigned long) () from
> /usr/lib/libstdc++.so.6
> #8 0x00007ffff7bbfa19 in VectorDouble::VectorDouble(unsigned int) ()
> from /usr/lib/liblapackpp.so.14
> ---Type <return> to continue, or q <return> to quit---
> #9 0x00007ffff7ba3761 in LaGenMatDouble::LaGenMatDouble(int, int) ()
> from /usr/lib/liblapackpp.so.14
> #10 0x0000000000400a87 in main () at lap.cpp:9
>
> So I suppose the resulting vector of size 647193600 is too big for the
> stack (or heap).
>
> Greetings
> Dee
>
>
> -------- Original-Nachricht --------
> Betreff: [Lapackpp-devel] Bug?
> Von: Jan Korous <kor...@gm...>
> An: lap...@li...
> Datum: 18.09.2010 18:08
>
>> Hello,
>> I intended to use Lapack++ in my CFD project for diploma thesis. But I
>> found something stange. This simple code crashes, segfault...
>>
>> #include <stdio.h>
>> #include <lapackpp/gmd.h> // LaGenMatDouble
>>
>> using namespace std;
>> int main() {
>> LaGenMatDouble matrix ( 25440, 25440 );
>> cout << matrix(0, 8675);
>> return 0;
>> }
>>
>> I don't know what's going on. I am using version 2.5.3 Are you able to
>> reproduce the bug or is it just me?
>>
>> Thank you for your answer.
>>
>> Sincerely
>> Jan Korous
>>
>> ------------------------------------------------------------------------------
>> Start uncovering the many advantages of virtual appliances
>> and start using them to simplify application deployment and
>> accelerate your shift to cloud computing.
>> http://p.sf.net/sfu/novell-sfdev2dev
>> _______________________________________________
>> lapackpp-devel mailing list
>> lap...@li...
>> https://lists.sourceforge.net/lists/listinfo/lapackpp-devel
>
|
|
From: Dee <de...@de...> - 2010-09-18 18:40:28
|
I thought your program crashes? So how could you access the matrix
members? Or better how could be sure where it crashes? Further the
behaviour could be different on different systems.
If you use gcc please compile with the -g switch and run gdb to check
where the segfault appears.
Greetings
Dee
-------- Original-Nachricht --------
Betreff: Re: [Lapackpp-devel] Bug?
Von: Jan Korous <kor...@gm...>
An: Dee <de...@de...>
Datum: 18.09.2010 20:24
> That's strange. If I got bad_alloc, I would understand but I didn't.
> Matter of fact I can access most of the matrix members, even matrix (
> 25439, 25439 )...
>
> Bad luck :-(
>
> On Sat, Sep 18, 2010 at 7:10 PM, Dee <de...@de...> wrote:
>> Hello,
>>
>> I get this result:
>>
>> terminate called after throwing an instance of 'std::bad_alloc'
>> what(): std::bad_alloc
>> Aborted
>>
>> The problem is in
>>
>> #5 0x00007ffff75c721e in __cxa_throw () from /usr/lib/libstdc++.so.6
>> #6 0x00007ffff75c76ad in operator new(unsigned long) () from
>> /usr/lib/libstdc++.so.6
>> #7 0x00007ffff75c7769 in operator new[](unsigned long) () from
>> /usr/lib/libstdc++.so.6
>> #8 0x00007ffff7bbfa19 in VectorDouble::VectorDouble(unsigned int) ()
>> from /usr/lib/liblapackpp.so.14
>> ---Type <return> to continue, or q <return> to quit---
>> #9 0x00007ffff7ba3761 in LaGenMatDouble::LaGenMatDouble(int, int) ()
>> from /usr/lib/liblapackpp.so.14
>> #10 0x0000000000400a87 in main () at lap.cpp:9
>>
>> So I suppose the resulting vector of size 647193600 is too big for the
>> stack (or heap).
>>
>> Greetings
>> Dee
>>
>>
>> -------- Original-Nachricht --------
>> Betreff: [Lapackpp-devel] Bug?
>> Von: Jan Korous <kor...@gm...>
>> An: lap...@li...
>> Datum: 18.09.2010 18:08
>>
>>> Hello,
>>> I intended to use Lapack++ in my CFD project for diploma thesis. But I
>>> found something stange. This simple code crashes, segfault...
>>>
>>> #include <stdio.h>
>>> #include <lapackpp/gmd.h> // LaGenMatDouble
>>>
>>> using namespace std;
>>> int main() {
>>> LaGenMatDouble matrix ( 25440, 25440 );
>>> cout << matrix(0, 8675);
>>> return 0;
>>> }
>>>
>>> I don't know what's going on. I am using version 2.5.3 Are you able to
>>> reproduce the bug or is it just me?
>>>
>>> Thank you for your answer.
>>>
>>> Sincerely
>>> Jan Korous
>>>
>>> ------------------------------------------------------------------------------
>>> Start uncovering the many advantages of virtual appliances
>>> and start using them to simplify application deployment and
>>> accelerate your shift to cloud computing.
>>> http://p.sf.net/sfu/novell-sfdev2dev
>>> _______________________________________________
>>> lapackpp-devel mailing list
>>> lap...@li...
>>> https://lists.sourceforge.net/lists/listinfo/lapackpp-devel
>
|