[Pkg-octave-devel] Bug#706376: Bug#706376: Bug#706376: Bug#706376: Bug#706376: octave: sparse matrix n*2^16
- To: David Bateman <firstname.lastname@example.org>, email@example.com
- Cc: Ed Meyer <firstname.lastname@example.org>, Miroslaw Kwasniak <Miroslaw.Kwasniak@pwr.wroc.pl>, Octave Maintainers List <email@example.com>
- Subject: [Pkg-octave-devel] Bug#706376: Bug#706376: Bug#706376: Bug#706376: Bug#706376: octave: sparse matrix n*2^16
- From: Jordi Gutiérrez Hermoso <firstname.lastname@example.org>
- Date: Sat, 15 Jun 2013 21:59:38 -0400
- Message-id: <[🔎] CAPHS2gx6wiy4o-Hj5tMJ7sq3aVh80Z=6_t_Y26vzVy9HAX9QoQ@mail.gmail.com>
- Reply-to: Jordi Gutiérrez Hermoso <email@example.com>, firstname.lastname@example.org
- In-reply-to: <[🔎] 51BC817E.email@example.com>
- References: <20130429102522.GA28312@uv.ikem.pwr.wroc.pl> <CAPHS2gxr6tYVkJFrQqCUd=aYu93b1uV-4tG_o46vnjZ5kHw6UQ@mail.gmail.com> <CAKWV3Rr1J0LQO3Vx_ASs5epq6U1tn1+nSgjAEecePhUAKga7WA@mail.gmail.com> <CAPHS2gyTkO7BrmTO6Q9o-Tc01wuGr_LeM=0fLLiCabh+GPjdtA@mail.gmail.com> <CAKWV3RogRArufv-F8dt5ftEm5SqAmYbjdot13O2LVADGgpQu7Q@mail.gmail.com> <CAPHS2gwsVbvQuaeQLaUMosCjp4pdZgj7noEohveyGb2-tV6u3A@mail.gmail.com> <CAPHS2gzdPYpp2XscvcdOo+gC3D81JHBXujm8bfWyyxJKrdfoJA@mail.gmail.com> <CAKWV3Rr_MP6Dcqqu1HSSqjCH-3-WJhuG-ncLtXQYQjhV1kgM+A@mail.gmail.com> <CAPHS2gxqDAr6gDpkPV+4_x3v8NM=rZ9LEmnKkQWewdheSLU9-Q@mail.gmail.com> <CAKWV3RpWZ2XTnUX8t0qCmUs-YZ2zEh_YFurxbCpK=1gCCjd4cw@mail.gmail.com> <CAPHS2gxBTZpcwrUpvDJTDKBEiG+qx7GCTsWB3LkMR0ZYZw1zTg@mail.gmail.com> <CAKWV3Rp5_FLhmUHN9XD5A2Ts2AsFuc1jqNpnyixiicf-AvVj_A@mail.gmail.com> <CAPHS2gyTFfBPRyrhEQLid0xtWeCAj3M2cewbd_5dPtw6oUeVKw@mail.gmail.com> <[🔎] 51BC817E.firstname.lastname@example.org>
On 15 June 2013 11:00, David Bateman <email@example.com> wrote:
> That a bit of a specious argument. "Because we can't solve problem B we
> shouldn't solve problem A". Taking this argument to the absurd this
> shouldn't work either
> n = 2^16;
> s = sparse (1:n,1:n,1);
> t = s * s;
You're strawmanning me.
I'm saying the real problem is that we assume linear indexing works
for all matrix types, including sparse matrices. I claim that this is
the real problem. We can patch around this problem by avoiding linear
indexing, but this is just treating the symptoms, not the disease.
While I don't deny that we can make some progress masking the
symptoms, the disease itself should also be treated somehow.
> So essentially you're saying that sparse matrices with
> 32-bit indexing and numel larger than 2^31 are useless!!
I'm saying that they will fail in other unexpected ways, and we
shouln't mask symptoms. By all means, avoiding calling numel whenever
possible, but don't mask symptoms. Should numel or similar actually
get called for such sparse matrices, at the very least there should be
a warning. I would prefer if the warning occurred at the time that the
sparse matrix is created, until we can fix the actual underlying
> A lot of attention was made in the sparse implementation to not rely
> either on linear indexing or the value of numel to avoid this issue.
It's great you avoided that, but the users of the sparse matrix type
might not immediately think of avoiding it.
- Jordi G. H.