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: Dmitri A. Sergatskov
Subject: [Octave-bug-tracker] [bug #52475] ode15 is not compatible with SUNDIALS >= 3.0.0
Date: Mon, 7 Jan 2019 10:57:18 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0

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

I downgraded sundials to 2.7 and wit the current tip (no patch)
it worked just fine:


locate klu.h
/usr/include/arkode/arkode_klu.h
/usr/include/cvode/cvode_klu.h
/usr/include/cvodes/cvodes_klu.h
/usr/include/ida/ida_klu.h
/usr/include/idas/idas_klu.h
/usr/include/kinsol/kinsol_klu.h
/usr/include/suitesparse/klu.h


grep sundial config.status 
S["SUNDIALS_XLIBS"]="-lsundials_ida -lsundials_nvecserial -lklu"
S["SUNDIALS_IDA_LIBS"]="-lsundials_ida"
S["SUNDIALS_NVECSERIAL_LIBS"]="-lsundials_nvecserial"

<<<...>>>
test ode15i
PASSES 48 out of 48 tests
test ode15s
PASSES 39 out of 39 tests



Updated to 3.1.1 (fedora's current version) and applied the patch.


locate klu.h
/usr/include/suitesparse/klu.h
/usr/include/sunlinsol/sunlinsol_klu.h

<<<...>>>
grep sundials config.status 
S["SUNDIALS_XLIBS"]="-lsundials_ida -lsundials_nvecserial -lklu"
S["SUNDIALS_IDA_LIBS"]="-lsundials_ida"
S["SUNDIALS_NVECSERIAL_LIBS"]="-lsundials_nvecserial"

<<<...>>>

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -Iliboctave -I../liboctave
-I../liboctave/array -Iliboctave/numeric -I../liboctave/numeric
-Iliboctave/operators -I../liboctave/operators -I../liboctave/system
-I../liboctave/util -I../libinterp/octave-value -Ilibinterp -I../libinterp
-I../libinterp/operators -Ilibinterp/parse-tree -I../libinterp/parse-tree
-Ilibinterp/corefcn -I../libinterp/corefcn -I../liboctave/wrappers
-I/usr/include/GraphicsMagick -fPIC -pthread -fopenmp -Wall -W -Wshadow
-Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align
-Wcast-qual -g -O2 -MT libinterp/dldfcn/__ode15___la-__ode15__.lo -MD -MP -MF
libinterp/dldfcn/.deps/__ode15___la-__ode15__.Tpo -c
../libinterp/dldfcn/__ode15__.cc  -fPIC -DPIC -o
libinterp/dldfcn/.libs/__ode15___la-__ode15__.o
../libinterp/dldfcn/__ode15__.cc: In member function ‘void
octave::IDA::set_up(const ColumnVector&)’:
../libinterp/dldfcn/__ode15__.cc:359:24: error: ‘SUNSparseMatrix’ was not
declared in this scope
         sunJacMatrix = SUNSparseMatrix (num, num, num*num, CSC_MAT);
                        ^~~~~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:359:24: note: suggested alternative:
‘SparseMatrix’
         sunJacMatrix = SUNSparseMatrix (num, num, num*num, CSC_MAT);
                        ^~~~~~~~~~~~~~~
                        SparseMatrix
../libinterp/dldfcn/__ode15__.cc:363:27: error: ‘SUNKLU’ was not declared
in this scope
         sunLinearSolver = SUNKLU (yy, sunJacMatrix);
                           ^~~~~~
../libinterp/dldfcn/__ode15__.cc:363:27: note: suggested alternative:
‘SUNTRUE’
         sunLinearSolver = SUNKLU (yy, sunJacMatrix);
                           ^~~~~~
                           SUNTRUE
../libinterp/dldfcn/__ode15__.cc: In member function ‘void
octave::IDA::jacsparse_impl(realtype, realtype, _generic_N_Vector*&,
_generic_N_Vector*&, _generic_SUNMatrix*&)’:
../libinterp/dldfcn/__ode15__.cc:443:5: error: ‘SUNMatZero_Sparse’ was not
declared in this scope
     SUNMatZero_Sparse (Jac);
     ^~~~~~~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:443:5: note: suggested alternative:
‘SUNMatZero_Dense’
     SUNMatZero_Sparse (Jac);
     ^~~~~~~~~~~~~~~~~
     SUNMatZero_Dense
../libinterp/dldfcn/__ode15__.cc:444:32: error:
‘SUNSparseMatrix_IndexPointers’ was not declared in this scope
     octave_idx_type *colptrs = SUNSparseMatrix_IndexPointers (Jac);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:444:32: note: suggested alternative:
‘SUNDenseMatrix_Print’
     octave_idx_type *colptrs = SUNSparseMatrix_IndexPointers (Jac);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                SUNDenseMatrix_Print
../libinterp/dldfcn/__ode15__.cc:445:32: error:
‘SUNSparseMatrix_IndexValues’ was not declared in this scope
     octave_idx_type *rowvals = SUNSparseMatrix_IndexValues (Jac);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:445:32: note: suggested alternative:
‘SUNDenseMatrix_Column’
     octave_idx_type *rowvals = SUNSparseMatrix_IndexValues (Jac);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
                                SUNDenseMatrix_Column
../libinterp/dldfcn/__ode15__.cc:450:17: error: ‘SUNSparseMatrix_Data’ was
not declared in this scope
     double *d = SUNSparseMatrix_Data (Jac);
                 ^~~~~~~~~~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:450:17: note: suggested alternative:
‘SUNDenseMatrix_Data’
     double *d = SUNSparseMatrix_Data (Jac);
                 ^~~~~~~~~~~~~~~~~~~~
                 SUNDenseMatrix_Data
make[2]: *** [Makefile:19180: libinterp/dldfcn/__ode15___la-__ode15__.lo]
Error 1
make[2]: Leaving directory '/home/dima/src/octave/gcc_def'
make[1]: *** [Makefile:27027: all-recursive] Error 1
make[1]: Leaving directory '/home/dima/src/octave/gcc_def'
make: *** [Makefile:10847: all] Error 2



Downgraded to 2.7 again , keep the patch applied.


libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -Iliboctave -I../liboctave
-I../liboctave/array -Iliboctave/numeric -I../liboctave/numeric
-Iliboctave/operators -I../liboctave/operators -I../liboctave/system
-I../liboctave/util -I../libinterp/octave-value -Ilibinterp -I../libinterp
-I../libinterp/operators -Ilibinterp/parse-tree -I../libinterp/parse-tree
-Ilibinterp/corefcn -I../libinterp/corefcn -I../liboctave/wrappers
-I/usr/include/GraphicsMagick -fPIC -pthread -fopenmp -Wall -W -Wshadow
-Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align
-Wcast-qual -g -O2 -MT libinterp/dldfcn/__ode15___la-__ode15__.lo -MD -MP -MF
libinterp/dldfcn/.deps/__ode15___la-__ode15__.Tpo -c
../libinterp/dldfcn/__ode15__.cc  -fPIC -DPIC -o
libinterp/dldfcn/.libs/__ode15___la-__ode15__.o
../libinterp/dldfcn/__ode15__.cc:228:39: error: ‘SUNMatrix’ has not been
declared
               N_Vector yyp, N_Vector, SUNMatrix JJ, void *user_data,
                                       ^~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:238:49: error: ‘SUNMatrix’ has not been
declared
                    N_Vector& yy, N_Vector& yyp, SUNMatrix& JJ);
                                                 ^~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:243:26: error: ‘SUNMatrix’ has not been
declared
                N_Vector, SUNMatrix Jac, void *user_data, N_Vector,
                          ^~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:253:36: error: ‘SUNMatrix’ has not been
declared
                     N_Vector& yyp, SUNMatrix& Jac);
                                    ^~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:317:5: error: ‘SUNMatrix’ does not name a
type; did you mean ‘Matrix’?
     SUNMatrix sunJacMatrix;
     ^~~~~~~~~
     Matrix
../libinterp/dldfcn/__ode15__.cc:318:5: error: ‘SUNLinearSolver’ does not
name a type
     SUNLinearSolver sunLinearSolver;
     ^~~~~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc: In constructor ‘octave::IDA::IDA()’:
../libinterp/dldfcn/__ode15__.cc:133:9: error: class ‘octave::IDA’ does
not have any field named ‘sunJacMatrix’
         sunJacMatrix (nullptr), sunLinearSolver (nullptr)
         ^~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:133:33: error: class ‘octave::IDA’ does
not have any field named ‘sunLinearSolver’
         sunJacMatrix (nullptr), sunLinearSolver (nullptr)
                                 ^~~~~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc: In constructor ‘octave::IDA::IDA(realtype,
ColumnVector, ColumnVector, octave_function*, octave::IDA::DAERHSFuncIDA)’:
../libinterp/dldfcn/__ode15__.cc:144:9: error: class ‘octave::IDA’ does
not have any field named ‘sunJacMatrix’
         sunJacMatrix (nullptr), sunLinearSolver (nullptr)
         ^~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:144:33: error: class ‘octave::IDA’ does
not have any field named ‘sunLinearSolver’
         sunJacMatrix (nullptr), sunLinearSolver (nullptr)
                                 ^~~~~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc: In destructor ‘octave::IDA::~IDA()’:
../libinterp/dldfcn/__ode15__.cc:151:21: error: ‘sunLinearSolver’ was not
declared in this scope
       SUNLinSolFree(sunLinearSolver);
                     ^~~~~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:151:7: error: ‘SUNLinSolFree’ was not
declared in this scope
       SUNLinSolFree(sunLinearSolver);
       ^~~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:152:21: error: ‘sunJacMatrix’ was not
declared in this scope
       SUNMatDestroy(sunJacMatrix);
                     ^~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:152:21: note: suggested alternative:
‘DiagMatrix’
       SUNMatDestroy(sunJacMatrix);
                     ^~~~~~~~~~~~
                     DiagMatrix
../libinterp/dldfcn/__ode15__.cc:152:7: error: ‘SUNMatDestroy’ was not
declared in this scope
       SUNMatDestroy(sunJacMatrix);
       ^~~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:152:7: note: suggested alternative:
‘N_VDestroy’
       SUNMatDestroy(sunJacMatrix);
       ^~~~~~~~~~~~~
       N_VDestroy
../libinterp/dldfcn/__ode15__.cc: In member function ‘void
octave::IDA::set_up(const ColumnVector&)’:
../libinterp/dldfcn/__ode15__.cc:359:9: error: ‘sunJacMatrix’ was not
declared in this scope
         sunJacMatrix = SUNSparseMatrix (num, num, num*num, CSC_MAT);
         ^~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:359:9: note: suggested alternative:
‘DiagMatrix’
         sunJacMatrix = SUNSparseMatrix (num, num, num*num, CSC_MAT);
         ^~~~~~~~~~~~
         DiagMatrix
../libinterp/dldfcn/__ode15__.cc:359:24: error: ‘SUNSparseMatrix’ was not
declared in this scope
         sunJacMatrix = SUNSparseMatrix (num, num, num*num, CSC_MAT);
                        ^~~~~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:359:24: note: suggested alternative:
‘SparseMatrix’
         sunJacMatrix = SUNSparseMatrix (num, num, num*num, CSC_MAT);
                        ^~~~~~~~~~~~~~~
                        SparseMatrix
../libinterp/dldfcn/__ode15__.cc:363:9: error: ‘sunLinearSolver’ was not
declared in this scope
         sunLinearSolver = SUNKLU (yy, sunJacMatrix);
         ^~~~~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:363:27: error: ‘SUNKLU’ was not declared
in this scope
         sunLinearSolver = SUNKLU (yy, sunJacMatrix);
                           ^~~~~~
../libinterp/dldfcn/__ode15__.cc:367:13: error: ‘IDADlsSetLinearSolver’
was not declared in this scope
         if (IDADlsSetLinearSolver (mem, sunLinearSolver, sunJacMatrix))
             ^~~~~~~~~~~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:367:13: note: suggested alternative:
‘IDADlsGetLastFlag’
         if (IDADlsSetLinearSolver (mem, sunLinearSolver, sunJacMatrix))
             ^~~~~~~~~~~~~~~~~~~~~
             IDADlsGetLastFlag
../libinterp/dldfcn/__ode15__.cc:370:9: error: ‘IDADlsSetJacFn’ was not
declared in this scope
         IDADlsSetJacFn (mem, IDA::jacsparse);
         ^~~~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:370:9: note: suggested alternative:
‘IDADlsSetBandJacFn’
         IDADlsSetJacFn (mem, IDA::jacsparse);
         ^~~~~~~~~~~~~~
         IDADlsSetBandJacFn
../libinterp/dldfcn/__ode15__.cc:380:9: error: ‘sunJacMatrix’ was not
declared in this scope
         sunJacMatrix = SUNDenseMatrix (num, num);
         ^~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:380:9: note: suggested alternative:
‘DiagMatrix’
         sunJacMatrix = SUNDenseMatrix (num, num);
         ^~~~~~~~~~~~
         DiagMatrix
../libinterp/dldfcn/__ode15__.cc:380:24: error: ‘SUNDenseMatrix’ was not
declared in this scope
         sunJacMatrix = SUNDenseMatrix (num, num);
                        ^~~~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:380:24: note: suggested alternative:
‘SparseMatrix’
         sunJacMatrix = SUNDenseMatrix (num, num);
                        ^~~~~~~~~~~~~~
                        SparseMatrix
../libinterp/dldfcn/__ode15__.cc:384:9: error: ‘sunLinearSolver’ was not
declared in this scope
         sunLinearSolver = SUNDenseLinearSolver (yy, sunJacMatrix);
         ^~~~~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:384:27: error: ‘SUNDenseLinearSolver’ was
not declared in this scope
         sunLinearSolver = SUNDenseLinearSolver (yy, sunJacMatrix);
                           ^~~~~~~~~~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:388:13: error: ‘IDADlsSetLinearSolver’
was not declared in this scope
         if (IDADlsSetLinearSolver (mem, sunLinearSolver, sunJacMatrix))
             ^~~~~~~~~~~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:388:13: note: suggested alternative:
‘IDADlsGetLastFlag’
         if (IDADlsSetLinearSolver (mem, sunLinearSolver, sunJacMatrix))
             ^~~~~~~~~~~~~~~~~~~~~
             IDADlsGetLastFlag
../libinterp/dldfcn/__ode15__.cc:391:24: error: ‘IDADlsSetJacFn’ was not
declared in this scope
         if (havejac && IDADlsSetJacFn (mem, IDA::jacdense) != 0)
                        ^~~~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:391:24: note: suggested alternative:
‘IDADlsSetBandJacFn’
         if (havejac && IDADlsSetJacFn (mem, IDA::jacdense) != 0)
                        ^~~~~~~~~~~~~~
                        IDADlsSetBandJacFn
../libinterp/dldfcn/__ode15__.cc: At global scope:
../libinterp/dldfcn/__ode15__.cc:399:52: error: ‘SUNMatrix’ has not been
declared
                       N_Vector& yy, N_Vector& yyp, SUNMatrix& JJ)
                                                    ^~~~~~~~~
../libinterp/dldfcn/__ode15__.cc: In member function ‘void
octave::IDA::jacdense_impl(realtype, realtype, _generic_N_Vector*&,
_generic_N_Vector*&, int&)’:
../libinterp/dldfcn/__ode15__.cc:419:7: error: ‘SUNDenseMatrix_Data’ was
not declared in this scope
       SUNDenseMatrix_Data(JJ));
       ^~~~~~~~~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc: At global scope:
../libinterp/dldfcn/__ode15__.cc:427:24: error: ‘SUNMatrix’ has not been
declared
                        SUNMatrix& Jac)
                        ^~~~~~~~~
../libinterp/dldfcn/__ode15__.cc: In member function ‘void
octave::IDA::jacsparse_impl(realtype, realtype, _generic_N_Vector*&,
_generic_N_Vector*&, int&)’:
../libinterp/dldfcn/__ode15__.cc:443:5: error: ‘SUNMatZero_Sparse’ was not
declared in this scope
     SUNMatZero_Sparse (Jac);
     ^~~~~~~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:444:32: error:
‘SUNSparseMatrix_IndexPointers’ was not declared in this scope
     octave_idx_type *colptrs = SUNSparseMatrix_IndexPointers (Jac);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:445:32: error:
‘SUNSparseMatrix_IndexValues’ was not declared in this scope
     octave_idx_type *rowvals = SUNSparseMatrix_IndexValues (Jac);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:450:17: error: ‘SUNSparseMatrix_Data’ was
not declared in this scope
     double *d = SUNSparseMatrix_Data (Jac);
                 ^~~~~~~~~~~~~~~~~~~~
../libinterp/dldfcn/__ode15__.cc:450:17: note: suggested alternative:
‘SparseMatrix’
     double *d = SUNSparseMatrix_Data (Jac);
                 ^~~~~~~~~~~~~~~~~~~~
                 SparseMatrix
make[2]: *** [Makefile:19180: libinterp/dldfcn/__ode15___la-__ode15__.lo]
Error 1
make[2]: Leaving directory '/home/dima/src/octave/gcc_def'
make[1]: *** [Makefile:27027: all-recursive] Error 1
make[1]: Leaving directory '/home/dima/src/octave/gcc_def'
make: *** [Makefile:10847: all] Error 2



So the patch broke something.

Dmitri.
-- 


    _______________________________________________________

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]