bugGNU Octave - Bugs: bug #55956, build overlinks with SUNDIALS...

 
 

bug #55956: build overlinks with SUNDIALS libraries even when HAVE_SUNDIALS is unset

Submitted by:  Mike Miller <mtmiller>
Submitted on:  Tue 19 Mar 2019 06:34:49 PM UTC  
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  Fixed Assigned to:  Mike Miller <mtmiller>
Originator Name:  Open/Closed:  Closed
Release:  5.1.0 Operating System:  GNU/Linux

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

( Jump to the original submission)

Thu 28 Mar 2019 06:29:55 PM UTC, comment #12: 

Michael, that is the intended behavior until Fedora updates to sundials version 4.

I personally choose to build without that option and just let the optional sparse Jacobian feature be disabled because it's easier.

Mike Miller <mtmiller>
Project AdministratorIn charge of this item.
Thu 28 Mar 2019 12:19:48 PM UTC, comment #11: 

As of latest patch I still need:

 CPPFLAGS=-I/usr/include/suitesparse

Fedora 29:
Linux pbdsl4 5.0.3-200.fc29.x86_64 #1 SMP Tue Mar 19 15:07:58 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Michael Godfrey <godfrey>
Project Member
Wed 27 Mar 2019 07:04:49 PM UTC, comment #10: 

Seems good to me, thanks.

Mike Miller <mtmiller>
Project AdministratorIn charge of this item.
Mon 25 Mar 2019 08:43:01 PM UTC, comment #9: 

Okay to close now?

Rik <rik5>
Project Administrator
Wed 20 Mar 2019 11:45:44 AM UTC, comment #8: 

The CPPFLAGS is what fixed. Thanks!

On 3/20/19 10:27 AM, Carlo de Falco wrote:

> @godfrey, did you specify something like
>
>
> CPPFLAGS=-I/usr/include/suitesparse
>
>
> when running Octave's configure?
> This is needed when using sundials version 3

Michael Godfrey <godfrey>
Project Member
Wed 20 Mar 2019 10:35:51 AM UTC, comment #7: 

@godfrey and of course you need to have suitesparse-devel installed

Carlo de Falco <cdf>
Project Member
Wed 20 Mar 2019 10:27:37 AM UTC, comment #6: 

@godfrey, did you specify something like

CPPFLAGS=-I/usr/include/suitesparse

when running Octave's configure?
This is needed when using sundials version 3

Carlo de Falco <cdf>
Project Member
Wed 20 Mar 2019 10:02:10 AM UTC, comment #5: 

And, my sundials packages are:
[godfrey@pbdsl4 octave]$ rpm -qa|grep -i sund
656:sundials-3.1.1-3.fc29.x86_64
1207:sundials-mpich-3.1.1-3.fc29.x86_64
2601:sundials-mpich-devel-3.1.1-3.fc29.x86_64
2795:sundials-doc-3.1.1-3.fc29.noarch
2827:sundials-openmpi-3.1.1-3.fc29.x86_64
2849:sundials-devel-3.1.1-3.fc29.x86_64
3148:sundials-openmpi-devel-3.1.1-3.fc29.x86_64
=======================
Do I need something else?

Michael Godfrey <godfrey>
Project Member
Wed 20 Mar 2019 09:34:56 AM UTC, comment #4: 

With current Fedora 29 I get:

checking whether SUNDIALS IDA is configured with double precision realtype... yes
checking sunlinsol/sunlinsol_dense.h usability... yes
checking sunlinsol/sunlinsol_dense.h presence... yes
checking for sunlinsol/sunlinsol_dense.h... yes
checking whether SUNDIALS IDA includes the SUNLINSOL_DENSE linear solver... yes
checking klu.h usability... no
checking klu.h presence... no
checking for klu.h... no
checking klu/klu.h usability... no
checking klu/klu.h presence... no
checking for klu/klu.h... no
checking for suitesparse/klu.h... (cached) yes
checking ufsparse/klu.h usability... no
checking ufsparse/klu.h presence... no
checking for ufsparse/klu.h... no
checking for sunlinsol/sunlinsol_klu.h... no
checking for SUNKLU in -lsundials_sunlinsolklu... yes
checking whether compiling a program that calls SUNKLU works... yes
configure: WARNING: SUNDIALS IDA library not configured with SUNLINSOL_KLU or sunlinksol_klu.h is not usable; ode15i and ode15s will not support the sparse Jacobian feature
checking for IDASetJacFn... no
checking for IDASetLinearSolver... no
checking for SUNLinSol_Dense... no
checking for SUNLinSol_KLU... no
checking ida/ida_direct.h usability... yes
checking ida/ida_direct.h presence... yes
checking for ida/ida_direct.h... yes
checking ida_direct.h usability... no
checking ida_direct.h presence... no
checking for ida_direct.h... no
checking for IDADlsSetJacFn... yes
checking for IDADlsSetLinearSolver... yes
checking for SUNDenseLinearSolver... yes
checking for SUNKLU... no
checking for dseupd in -larpack ... yes
checking whether the arpack library works... yes

and:
configure: WARNING: SUNDIALS IDA library not configured with SUNLINSOL_KLU or sunlinksol_klu.h is not usable;

Michael Godfrey <godfrey>
Project Member
Wed 20 Mar 2019 04:29:12 AM UTC, comment #3: 

Ok, that looks right, I hadn't gotten around to testing with -I/usr/include/suitesparse yet.

Mike Miller <mtmiller>
Project AdministratorIn charge of this item.
Wed 20 Mar 2019 03:23:34 AM UTC, comment #2: 

After your most recent changes I'm seeing the following results for configure when using CPPFLAGS=/usr/include/suitesparse and building with Sundiasl 3.x on a Debian system:

checking klu.h usability... yes
checking klu.h presence... yes
checking for klu.h... yes
checking klu/klu.h usability... no
checking klu/klu.h presence... no
checking for klu/klu.h... no
checking for suitesparse/klu.h... (cached) yes
checking ufsparse/klu.h usability... no
checking ufsparse/klu.h presence... no
checking for ufsparse/klu.h... no
checking for sunlinsol/sunlinsol_klu.h... yes
checking for SUNKLU in -lsundials_sunlinsolklu... yes
checking whether compiling a program that calls SUNKLU works... yes
checking for IDASetJacFn... no
checking for IDASetLinearSolver... no
checking for SUNLinSol_Dense... no
checking for SUNLinSol_KLU... no
checking ida/ida_direct.h usability... yes
checking ida/ida_direct.h presence... yes
checking for ida/ida_direct.h... yes
checking ida_direct.h usability... no
checking ida_direct.h presence... no
checking for ida_direct.h... no
checking for IDADlsSetJacFn... yes
checking for IDADlsSetLinearSolver... yes
checking for SUNDenseLinearSolver... yes
checking for SUNKLU... no

and then the following output when running make:

/home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc: In member function 'void octave::IDA::set_up(const ColumnVector&)':
/home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc:401:27: error: 'SUNLinSol_KLU' was not declared in this scope
         sunLinearSolver = SUNLinSol_KLU (yy, sunJacMatrix);
                           ^~~~~~~~~~~~~
/home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc:401:27: note: suggested alternative: 'SUNLinSolFree_KLU'
         sunLinearSolver = SUNLinSol_KLU (yy, sunJacMatrix);
                           ^~~~~~~~~~~~~
                           SUNLinSolFree_KLU
make[2]: *** [Makefile:19254: libinterp/dldfcn/__ode15___la-__ode15__.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/net/devnull/scratch/jwe/build/octave'
make[1]: *** [Makefile:27143: all-recursive] Error 1
make[1]: Leaving directory '/net/devnull/scratch/jwe/build/octave'
make: *** [Makefile:10919: all] Error 2

Note that in the configure output, SUNKLU is found in the custom test but not later.

It is fixed for me by the following change:

http://hg.savannah.gnu.org/hgweb/octave/rev/8f819b00b28e

John W. Eaton <jwe>
Project Administrator
Tue 19 Mar 2019 06:37:58 PM UTC, comment #1: 

I pushed this fix on the stable branch

https://hg.savannah.gnu.org/hgweb/octave/rev/b4cb230ced82

Mike Miller <mtmiller>
Project AdministratorIn charge of this item.
Tue 19 Mar 2019 06:34:49 PM UTC, original submission:  

When building Octave 5.1.0 on a system with SUNDIALS version 3 or 4 installed, configure correctly detects that the library is not compatible and correctly does not set HAVE_SUNDIALS, so all features in '__ode15__.oct' are disabled. But the oct file is still linked to libsundials_ida and libsundials_nvecserial, even though it uses no functions from those libraries (overlinking).

I have a patch to configure that will clear all of the SUNDIALS associated build variables if and only if HAVE_SUNDIALS is not set, suitable for stable, and already tested on one system with SUNDIALS 3.1.2 and one with SUNDIALS 2.7.0. There are no regressions on the latter that I can see, and the oct file is now not linked with the libraries on the former, which is the desired outcome.

Will push to stable once I have a bug number.

Mike Miller <mtmiller>
Project AdministratorIn charge of this item.

 

(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 godfrey (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-03-27 rik5 StatusReady For Test => Fixed
        Open/ClosedOpen => Closed
    2019-03-19 mtmiller Carbon-CopyRemoved 80942 => -
    2019-03-19 mtmiller StatusIn Progress => Ready For Test

    Back to the top


    Powered by Savane 3.5