bugGNU Octave - Bugs: bug #50003, Build failure with IDA 2.8.1

 
 

bug #50003: Build failure with IDA 2.8.1

Submitter:  Francesco Faccio <francesco_faccio>
Submitted:  Sat 07 Jan 2017 06:55:16 PM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Works For Me Assigned to:  None
Originator Name:  Francesco Faccio Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 12 Jul 2018 07:56:34 PM UTC, comment #8: 

I think we can close this bug as works for me and defer to open bug #52475 for pending necessary SUNDIALS configuration changes.

Mike Miller <mtmiller>
Group Member
Thu 12 Jul 2018 04:28:37 PM UTC, comment #7: 

This bug is ancient (18 months).  Is it still a problem to build Octave with IDA 2.8.1?

Rik <rik5>
Group administrator
Sun 08 Jan 2017 05:32:05 PM UTC, comment #6: 

@jwe

I think that in your changeset in configure.ac it should be:

diff -r 63a12df71848 configure.ac
--- a/configure.ac        Sat Jan 07 20:12:16 2017 -0500
+++ b/configure.ac        Sun Jan 08 18:20:14 2017 +0100
@@ -2156,7 +2156,7 @@
 ### Check for Sundials IDA library and header.

 save_LIBS="$LIBS"
-LIBS="$SUNDIALS_NVECSERIAL_LIBS $BLAS_LIBS $FLIBS $LIBS"
+LIBS="$SUNDIALS_NVECSERIAL_LIBS $KLU_LIBS $LIBS"
 OCTAVE_CHECK_LIB(sundials_ida, [Sundials IDA],
   [Sundials IDA library not found.  Solvers ode15i and ode15s will be disabled.],
   [ida/ida.h ida.h], [IDAInit],


As Carlo pointed out, we should require the latest version of IDA.

I just noticed that in IDA 2.9.0 the function IDAKLU accepts 4 input arguments, while in IDA 2.8.1 it accepts only 3 inputs, so the macro OCTAVE_CHECK_SUNDIALS_IDAKLU you wrote is already checking that the user is working with the latest version of IDA.

This means that if we choose to disable ode15{i,s} when SUNDIALS has not been configured with KLU enabled, then it is enough to use that macro.

If we choose to keep ode15{i,s} available without KLU (but I agree with Carlo on the fact that the user should receive at least a warning in case she uses a sparse Jacobian), then the user must have at least version 2.7.0 of IDA, but I suggest to require the latest version anyway. The presence of the function SparseSetMatToZero ensures that the user is working with IDA 2.9.0.



Francesco Faccio <francesco_faccio>
Sun 08 Jan 2017 03:19:11 PM UTC, comment #5: 

"Are you trying to make Octave work with both IDA 2.8.1 and 2.9.0, or do you want to require 2.9.0?"

The intention was to require the latest version of IDA, the one that ships with sundials 2.7.

The data format and API for sparse matrices have changed between 2.6 and 2.7 and supporting both seemed like a lot of work.

"Which library defines SparseSetMatToZero? "

It is in the sparse matrix module of sundials 2.7

"Why exactly do you need to check for SparseSetMatToZero? What feature will be enabled/disabled if it is present/missing?"

I used that as a way to detect the API version of sundials_sparse
the same function had a different name and syntax in versions prior to 2.7

"Note that it is now possible to build without IDAKLU, but sparse Jacobian handling is simply disabled."

What do you mean by "disabled": will Octave error out if the Jacobian is sparse or just silently convert it to full?

As I mentioned in a mailing list thread, I would not like to silently ignore missing IDA_KLU and let Octave work with sparse jacobians as if they were full.
I have shown a very simple example where the difference in performance is a factor of 150, more meaningful examples have even more striking differences. I would like users in general and downstream packagers in particular to be well aware of this issue, so that they are a bit motivated to improve the sundials package for debian at least ...

Carlo de Falco <cdf>
Group Member
Sun 08 Jan 2017 01:16:20 AM UTC, comment #4: 

As a start, I checked in the following changesets:

  http://hg.savannah.gnu.org/hgweb/octave/rev/1dfbdd593c5b
  http://hg.savannah.gnu.org/hgweb/octave/rev/6094018f5e72
  http://hg.savannah.gnu.org/hgweb/octave/rev/305cdc1d444b
  http://hg.savannah.gnu.org/hgweb/octave/rev/63a12df71848

Note that it is now possible to build without IDAKLU, but sparse Jacobian handling is simply disabled.  Maybe there is something better than can be done if IDAKLU is missing?

Why exactly do you need to check for SparseSetMatToZero?  What feature will be enabled/disabled if it is present/missing?

John W. Eaton <jwe>
Group administrator
Sat 07 Jan 2017 09:07:06 PM UTC, comment #3: 

I see SparseSetMatToZero in sundials-2.7.0 (sundials_sparse.h).

I think it might make sense to split the SUNDIALS_IDA library detection up into a basic detection for presence of the library, followed by a test for specific functions and features that are required in Octave. That way the configure warning messages can also be more explicit: "SUNDIALS_IDA library was not found" vs "SUNDIALS_IDA library was found but doesn't have such and such feature".

Mike Miller <mtmiller>
Group Member
Sat 07 Jan 2017 07:45:14 PM UTC, comment #2: 

Which library defines SparseSetMatToZero?

John W. Eaton <jwe>
Group administrator
Sat 07 Jan 2017 07:44:11 PM UTC, comment #1: 

Are you trying to make Octave work with both IDA 2.8.1 and 2.9.0, or do you want to require 2.9.0?

John W. Eaton <jwe>
Group administrator
Sat 07 Jan 2017 06:55:16 PM UTC, original submission:  

If I try to build Octave with IDA 2.8.1 and KLU enabled I get a failure from _ode15_.cc.

This is because the configuration tests for SUNDIALS need to be updated to IDA 2.9.0.

When I wrote these tests it was enough to test for IDAKLU function in ida.h in order to test both that IDA had been new enough and that it had been configured with KLU enabled.

In IDA 2.9.0 there are some new functions for sparse matrices, which are already used in _ode15_ [1]

In order to fix this, we should test for function IDAKLU, checking whether KLU has been enabled and test a new function, for instance SparseSetMatToZero, checking if the user has the new version of IDA installed.

What is the most straightforward way to do so in a configuration test?

Francesco Faccio

[1]http://hg.savannah.gnu.org/hgweb/octave/rev/284bbb0328f2

Francesco Faccio <francesco_faccio>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by cdf (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by francesco_faccio (Submitted the item)
  • -email is unavailable- added by francesco_faccio
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-03-03 mtmiller Carbon-CopyRemoved 80942 -
    2018-07-12 mtmiller StatusNone Works For Me
        Open/ClosedOpen Closed
    2017-01-07 francesco_faccio Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code