octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #52475] ode15 is not compatible with SUNDIALS


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #52475] ode15 is not compatible with SUNDIALS >= 3.0.0
Date: Sat, 9 Mar 2019 05:09:50 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0

Follow-up Comment #68, bug #52475 (project octave):

After applying the three patches from comment #59 to the current development
sources, I see the following on my Debian system.

Configuration once again finds Sundials and that seems to work for both the
3.1.x version installed from the Debian package or Sundials 4.1.0 that I built
myself.  But then compilation fails as follows.

With libsundials-dev 3.1.2+dfsg-3+b1 installed from Debian:


/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:371:24: error:
'SUNSparseMatrix' was not declared in this scope
         sunJacMatrix = SUNSparseMatrix (num, num, num*num, CSC_MAT);
                        ^~~~~~~~~~~~~~~
/home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc:371:24: note: suggested
alternative: 'SparseMatrix'
         sunJacMatrix = SUNSparseMatrix (num, num, num*num, CSC_MAT);
                        ^~~~~~~~~~~~~~~
                        SparseMatrix
/home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc:375:27: error: 'SUNKLU' was
not declared in this scope
         sunLinearSolver = SUNKLU (yy, sunJacMatrix);
                           ^~~~~~
/home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc:375:27: note: suggested
alternative: 'SUNTRUE'
         sunLinearSolver = SUNKLU (yy, sunJacMatrix);
                           ^~~~~~
                           SUNTRUE
/home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc: In member function 'void
octave::IDA::jacsparse_impl(realtype, realtype, _generic_N_Vector*&,
_generic_N_Vector*&, _generic_SUNMatrix*&)':
/home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc:455:5: error:
'SUNMatZero_Sparse' was not declared in this scope
     SUNMatZero_Sparse (Jac);
     ^~~~~~~~~~~~~~~~~
/home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc:455:5: note: suggested
alternative: 'SUNMatZero_Dense'
     SUNMatZero_Sparse (Jac);
     ^~~~~~~~~~~~~~~~~
     SUNMatZero_Dense
/home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc:456:32: error:
'SUNSparseMatrix_IndexPointers' was not declared in this scope
     octave_idx_type *colptrs = SUNSparseMatrix_IndexPointers (Jac);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc:456:32: note: suggested
alternative: 'SUNDenseMatrix_Print'
     octave_idx_type *colptrs = SUNSparseMatrix_IndexPointers (Jac);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                SUNDenseMatrix_Print
/home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc:457:32: error:
'SUNSparseMatrix_IndexValues' was not declared in this scope
     octave_idx_type *rowvals = SUNSparseMatrix_IndexValues (Jac);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc:457:32: note: suggested
alternative: 'SUNDenseMatrix_Column'
     octave_idx_type *rowvals = SUNSparseMatrix_IndexValues (Jac);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
                                SUNDenseMatrix_Column
/home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc:462:17: error:
'SUNSparseMatrix_Data' was not declared in this scope
     double *d = SUNSparseMatrix_Data (Jac);
                 ^~~~~~~~~~~~~~~~~~~~
/home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc:462:17: note: suggested
alternative: 'SUNDenseMatrix_Data'
     double *d = SUNSparseMatrix_Data (Jac);
                 ^~~~~~~~~~~~~~~~~~~~
                 SUNDenseMatrix_Data
make[2]: *** [Makefile:19280: libinterp/dldfcn/__ode15___la-__ode15__.lo]
Error 1


With self-compiled Sundials 4.1.0, I see these errors:


/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:371:24: error:
'SUNSparseMatrix' was not declared in this scope
         sunJacMatrix = SUNSparseMatrix (num, num, num*num, CSC_MAT);
                        ^~~~~~~~~~~~~~~
/home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc:371:24: note: suggested
alternative: 'SparseMatrix'
         sunJacMatrix = SUNSparseMatrix (num, num, num*num, CSC_MAT);
                        ^~~~~~~~~~~~~~~
                        SparseMatrix
/home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc:375:27: error: 'SUNKLU' was
not declared in this scope
         sunLinearSolver = SUNKLU (yy, sunJacMatrix);
                           ^~~~~~
/home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc:375:27: note: suggested
alternative: 'SUNTRUE'
         sunLinearSolver = SUNKLU (yy, sunJacMatrix);
                           ^~~~~~
                           SUNTRUE
In file included from /home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc:86:
/home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc: In member function 'void
octave::IDA::jacdense_impl(realtype, realtype, _generic_N_Vector*&,
_generic_N_Vector*&, _generic_SUNMatrix*&)':
/usr/local/sundials/4.1.0/include/nvector/nvector_serial.h:69:63: warning: use
of old-style cast to 'N_VectorContent_Serial' {aka 'struct
_N_VectorContent_Serial*'} [-Wold-style-cast]
 #define NV_CONTENT_S(v)  ( (N_VectorContent_Serial)(v->content) )
                                                               ^
/usr/local/sundials/4.1.0/include/nvector/nvector_serial.h:71:28: note: in
expansion of macro 'NV_CONTENT_S'
 #define NV_LENGTH_S(v)   ( NV_CONTENT_S(v)->length )
                            ^~~~~~~~~~~~
/home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc:416:20: note: in expansion
of macro 'NV_LENGTH_S'
     long int Neq = NV_LENGTH_S(yy);
                    ^~~~~~~~~~~
/home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc: In member function 'void
octave::IDA::jacsparse_impl(realtype, realtype, _generic_N_Vector*&,
_generic_N_Vector*&, _generic_SUNMatrix*&)':
/home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc:455:5: error:
'SUNMatZero_Sparse' was not declared in this scope
     SUNMatZero_Sparse (Jac);
     ^~~~~~~~~~~~~~~~~
/home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc:455:5: note: suggested
alternative: 'SUNMatZero_Dense'
     SUNMatZero_Sparse (Jac);
     ^~~~~~~~~~~~~~~~~
     SUNMatZero_Dense
/home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc:456:32: error:
'SUNSparseMatrix_IndexPointers' was not declared in this scope
     octave_idx_type *colptrs = SUNSparseMatrix_IndexPointers (Jac);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc:456:32: note: suggested
alternative: 'SUNDenseMatrix_Print'
     octave_idx_type *colptrs = SUNSparseMatrix_IndexPointers (Jac);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                SUNDenseMatrix_Print
/home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc:457:32: error:
'SUNSparseMatrix_IndexValues' was not declared in this scope
     octave_idx_type *rowvals = SUNSparseMatrix_IndexValues (Jac);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc:457:32: note: suggested
alternative: 'SUNDenseMatrix_Column'
     octave_idx_type *rowvals = SUNSparseMatrix_IndexValues (Jac);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
                                SUNDenseMatrix_Column
/home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc:462:17: error:
'SUNSparseMatrix_Data' was not declared in this scope
     double *d = SUNSparseMatrix_Data (Jac);
                 ^~~~~~~~~~~~~~~~~~~~
/home/jwe/src/octave/libinterp/dldfcn/__ode15__.cc:462:17: note: suggested
alternative: 'SUNDenseMatrix_Data'
     double *d = SUNSparseMatrix_Data (Jac);
                 ^~~~~~~~~~~~~~~~~~~~
                 SUNDenseMatrix_Data
make[2]: *** [Makefile:19280: libinterp/dldfcn/__ode15___la-__ode15__.lo]
Error 1


Either way, it looks the same to me.  Where is the definition of
SUNSparseMatrix?  I don't quite follow how that is supposed to work.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?52475>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]