armstrtw / CppBugs

c++ version of BUGS
29 stars 5 forks source link

radon1 test failure #8

Open jhjourdan opened 12 years ago

jhjourdan commented 12 years ago

On my machine, the radon1 test fails :

/usr/bin/time -o ./benchmark.output --append --format="%e %U %S" ./radon1

error: max(): object has no elements

terminate called after throwing an instance of 'std::logic_error' what():
make: *\ [benchmark] Erreur 6

Thanks !

armstrtw commented 12 years ago

hmm, what OS and what version of armadillo do you have installed, and what gcc are you using?

-Whit

On Tue, Jul 3, 2012 at 3:26 AM, jhjourdan reply@reply.github.com wrote:

On my machine, the radon1 test fails :

/usr/bin/time -o ./benchmark.output --append --format="%e %U %S" ./radon1

error: max(): object has no elements

terminate called after throwing an instance of 'std::logic_error' what(): make: *\ [benchmark] Erreur 6

Thanks !


Reply to this email directly or view it on GitHub: https://github.com/armstrtw/CppBugs/issues/8

jhjourdan commented 12 years ago

I am using Fedora 16, with the last version of armadillo (3.2.3), and gcc 4.6.3.

Here is a stack trace obtained by disabling optimisations and enabling -g :

0 0x00007ffff7083285 in __GI_raise (sig=6)

at ../nptl/sysdeps/unix/sysv/linux/raise.c:64

1 0x00007ffff7084b9b in __GI_abort () at abort.c:91

2 0x00007ffff795ac5d in __gnu_cxx::__verbose_terminate_handler ()

at ../../../../libstdc++-v3/libsupc++/vterminate.cc:95

3 0x00007ffff7958e16 in cxxabiv1::terminate (handler=)

at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:40

4 0x00007ffff7958e43 in std::terminate ()

at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:50

5 0x00007ffff7958f3e in cxxabiv1::cxa_throw (obj=0x65b0a0,

tinfo=<optimized out>, dest=<optimized out>)
at ../../../../libstdc++-v3/libsupc++/eh_throw.cc:83

6 0x0000000000411f0a in arma::arma_stop<char const*> (x=@0x7fffffffd888)

at ../../armadillo-3.2.3/include/armadillo_bits/debug.hpp:117

7 0x000000000040f425 in arma::arma_check<char [30]> (state=true, x=...)

at ../../armadillo-3.2.3/include/armadillo_bits/debug.hpp:346

8 0x000000000040b1ef in arma::Mat::max (this=0x7fffffffdd20)

at ../../armadillo-3.2.3/include/armadillo_bits/Mat_meat.hpp:4871

9 0x00000000004067e4 in main () at radon1.cpp:111

BR, Jacques-Henri Jourdan

Le 03/07/2012 20:57, Whit Armstrong a écrit :

hmm, what OS and what version of armadillo do you have installed, and what gcc are you using?

-Whit

On Tue, Jul 3, 2012 at 3:26 AM, jhjourdan reply@reply.github.com wrote:

On my machine, the radon1 test fails :

/usr/bin/time -o ./benchmark.output --append --format="%e %U %S" ./radon1

error: max(): object has no elements

terminate called after throwing an instance of 'std::logic_error' what(): make: *\ [benchmark] Erreur 6

Thanks !


Reply to this email directly or view it on GitHub: https://github.com/armstrtw/CppBugs/issues/8


Reply to this email directly or view it on GitHub: https://github.com/armstrtw/CppBugs/issues/8#issuecomment-6743319

armstrtw commented 12 years ago

Just guessing but it looks like that kind of error could happen if an empty matrix is created for the radon dataset.

Did you down load the data and modify the file location in the source code?

string file("/home/warmstrong/dvl/scripts/mcmc/radon/srrs.csv");

-Whit

jhjourdan commented 12 years ago

Ok, sorry, I should have looked into the radon1.cpp file !

I was assuming test cases were self-contained. BTW, would it be possible to include these data in the git repo ?

BR,

JH

Le 05/07/2012 03:25, Whit Armstrong a écrit :

Just guessing but it looks like that kind of error could happen if an empty matrix is created for the radon dataset.

Did you down load the data and modify the file location in the source code?

string file("/home/warmstrong/dvl/scripts/mcmc/radon/srrs.csv");

-Whit


Reply to this email directly or view it on GitHub: https://github.com/armstrtw/CppBugs/issues/8#issuecomment-6770101

armstrtw commented 12 years ago

Ok, sorry, I should have looked into the radon1.cpp file ! no worries.

I was assuming test cases were self-contained. BTW, would it be possible to include these data in the git repo ?

most of the test cases are self-contained. However, the radon dataset is pretty large.

In my rcppbugs example, I read the file directly off of the website, but it's a little harder to do that in c++. https://github.com/armstrtw/rcppbugs.examples/blob/master/radon.r

-Whit

BR,

JH

Le 05/07/2012 03:25, Whit Armstrong a écrit :

Just guessing but it looks like that kind of error could happen if an empty matrix is created for the radon dataset.

Did you down load the data and modify the file location in the source code?

string file("/home/warmstrong/dvl/scripts/mcmc/radon/srrs.csv");

-Whit


Reply to this email directly or view it on GitHub: https://github.com/armstrtw/CppBugs/issues/8#issuecomment-6770101


Reply to this email directly or view it on GitHub: https://github.com/armstrtw/CppBugs/issues/8#issuecomment-6773130