[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SparseMatrix constructor
From: |
c. |
Subject: |
Re: SparseMatrix constructor |
Date: |
Sat, 19 Oct 2013 20:57:49 +0200 |
On 19 Oct 2013, at 19:24, Daniel J Sebald <address@hidden> wrote:
> On 10/19/2013 03:28 AM, c. wrote:
>>
>> On 18 Oct 2013, at 18:22, c.<address@hidden> wrote:
>>
>>> Hi,
>>>
>>> I have some code[1] that uses the constructor
>>>
>>> SparseMatrix::SparseMatrix (Array<double> V,
>>> Array<octave_idx_type> I,
>>> Array<octave_idx_type> J,
>>> octave_idx_type nr,
>>> octave_idx_type nc, bool add);
>>>
>>> where I and J are 0-based arrays of indices, which works in Octave 3.6.x
>>> but fails with development sources with the error:
>>>
>>> error: op_u_v: subscript indices must be either positive integers less
>>> than 2^31 or logicals
>>>
>>> have there been changes in the SparseMatrix constructors that can explain
>>> this change?
>>> Can anyone point me to the changeset that caused the different behaviour?
>>>
>>> c.
>>>
>>> [1]
>>> http://sourceforge.net/p/geopdes/code/HEAD/tree/trunk/geopdes_base/src/op_u_v.cc
>>> [2]
>>
>> Hi,
>>
>> Just an update, I'm trying to find the changeset that introduced this
>> modification.
>>
>> I am doing this by bisect and my current "good" release is the following:
>>
>> changeset: 17465:77bec442a35a
>> user: Rik<address@hidden>
>> date: Wed Sep 18 10:32:27 2013 -0700
>> summary: Overhaul stem family of plot functions.
>>
>> Bisecting is quite cumbersome in this case as I have to install each time in
>> order to use
>> "mkoctfile" and "pkg install" so if anyone is aware of a changeset in the
>> last month that
>> might have caused this problem I'd really appreciate hints.
>>
>> Marco, I am CC-ing you because I believe this problem might affect your code
>> as well,
>> could you please test your package with a recent build of Octave development
>> sources?
>
> One should be able to narrow this down by using the source control diff
> utilities of the repository. Mercurial's standard front end server browser
> isn't geared for this, but it is possible to advance backward through the
> parents of a file and do diffs...at least those two features exist, but
> perhaps not conveniently combined. The constructor is in :
>
> [sebald@ octave]$ grep SparseMatrix::SparseMatrix * -r
> [snip the ChangeLog entries]
> liboctave/array/dSparse.cc:SparseMatrix::SparseMatrix (const SparseBoolMatrix
> &a)
> liboctave/array/dSparse.cc:SparseMatrix::SparseMatrix (const DiagMatrix& a)
>
> and here is that source file in the repository:
>
> http://hg.savannah.gnu.org/hgweb/octave/file/9bb5d3f63cdd/liboctave/array/dSparse.cc
>
> Click on the "diff" link and click on the "parents" link in various ways and
> I believed you'll be able to trace the recent history of dSparse.cc with just
> the differences. There probably is a way to do this at the command line on
> the repository on your computer, but at least the HTML version looks a little
> better if perhaps more clumsy.
>
> Dan
Dan,
Thanks, but in the meanwhile the bisect process has completed and now I see why
I was not able
to see what had been changed about sparse indexing ...
It's because nothing had actually changed ;)
It seems the changeset that broke my code is this one:
changeset: 17542:d0fa3568eb5d
user: John W. Eaton <address@hidden>
date: Thu Sep 26 15:28:33 2013 -0400
summary: update links in Help menu
which apparently removed the definition of the macro OCTAVE_API_VERSION_NUMBER
which was used in my code
to maintain compatibility with Octave versions older than 3.4:
http://sourceforge.net/p/geopdes/code/HEAD/tree/trunk/geopdes_base/src/op_u_v.cc#l65
Rafael, I think the easiest way to fix geopdes is to just drop compatibility
with the 3.2 version ;)
Marco this also explains why your "assemble" method is unaffected, sorry for
making you worry about nothing ...
c.