Re: [Rd] dgTMatrix Segmentation Fault

2021-06-10 Thread Martin Maechler
> Ben Bolker > on Wed, 9 Jun 2021 21:11:18 -0400 writes: > Nice! Indeed -- and thanks a lot, Dario (and Martin Morgan !) for getting down to the root problem. so, indeed a bug in Matrix (though "far away" from 'dgTMatrix'). Thank you once more! Martin Maechler > On 6/9/21

Re: [Rd] dgTMatrix Segmentation Fault

2021-06-09 Thread Ben Bolker
Nice! On 6/9/21 9:00 PM, Dario Strbenac via R-devel wrote: Good day, Thanks to handy hints from Martin Morgan, I ran R under gdb and checked for any numeric overflow. We pinpointed the cause: (gdb) info locals i = 0 j = 10738 m = 20 n = 5 ans = 0x5b332790 aa = 0x5b3327c0 Th

Re: [Rd] dgTMatrix Segmentation Fault

2021-06-09 Thread Dario Strbenac via R-devel
Good day, Thanks to handy hints from Martin Morgan, I ran R under gdb and checked for any numeric overflow. We pinpointed the cause: (gdb) info locals i = 0 j = 10738 m = 20 n = 5 ans = 0x5b332790 aa = 0x5b3327c0 There is a line of C code in dgeMatrix.c for (i = 0; i < m; i++) a

Re: [Rd] dgTMatrix Segmentation Fault

2021-06-09 Thread Serguei Sokol
Le 08/06/2021 à 18:32, Martin Maechler a écrit : Dario Strbenac on Tue, 8 Jun 2021 09:00:04 + writes: > Good day, Indeed, changing the logical test is a > workaround to the problem. However, a segmentation fault > means that the software tried to access an invalid memory

Re: [Rd] dgTMatrix Segmentation Fault

2021-06-08 Thread Martin Maechler
> Dario Strbenac > on Tue, 8 Jun 2021 09:00:04 + writes: > Good day, Indeed, changing the logical test is a > workaround to the problem. However, a segmentation fault > means that the software tried to access an invalid memory > location, so I think the original pr

Re: [Rd] dgTMatrix Segmentation Fault

2021-06-08 Thread Dario Strbenac
Good day, Indeed, changing the logical test is a workaround to the problem. However, a segmentation fault means that the software tried to access an invalid memory location, so I think the original problem should be addressed in Matrix package, regardless. -

Re: [Rd] dgTMatrix Segmentation Fault

2021-06-07 Thread Sokol Serguei
Le 07/06/2021 à 09:00, Dario Strbenac a écrit : Good day, I notice that summing rows of a large dgTMatrix fails. library(Matrix) aMatrix <- new("dgTMatrix", i = as.integer(sample(20, 1)-1), j = as.integer(sample(5, 1)-1), x = rnorm(1), Dim =

[Rd] dgTMatrix Segmentation Fault

2021-06-07 Thread Dario Strbenac
Good day, I notice that summing rows of a large dgTMatrix fails. library(Matrix) aMatrix <- new("dgTMatrix", i = as.integer(sample(20, 1)-1), j = as.integer(sample(5, 1)-1), x = rnorm(1), Dim = c(20L, 5L) ) totals <- rowSu