diff --git a/science/mathematics/octave/actions.py b/science/mathematics/octave/actions.py new file mode 100644 index 0000000000..189b655502 --- /dev/null +++ b/science/mathematics/octave/actions.py @@ -0,0 +1,37 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Licensed under the GNU General Public License, version 3. +# See the file http://www.gnu.org/licenses/gpl.txt + +from pisi.actionsapi import get +from pisi.actionsapi import autotools +from pisi.actionsapi import pisitools +from pisi.actionsapi import shelltools + +def setup(): + autotools.autoreconf("-vif") + # suppress compiler warnings + pisitools.cflags.add("-Wno-cpp") + pisitools.cxxflags.add("-Wno-deprecated-copy -Wno-unused-parameter -Wno-deprecated-declarations") + autotools.configure("--enable-shared --disable-static \ + --with-quantum-depth=16 \ + --with-sundials_ida='-lsundials_ida -lsundials_sunlinsolklu'") + + # don't fix rpath + #pisitools.dosed("libtool", "^(hardcode_libdir_flag_spec=).*", '\\1""') + #pisitools.dosed("libtool", "^(runpath_var=)LD_RUN_PATH", "\\1DIE_RPATH_DIE") + # fix unused direct dependency analysis + pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ") + +def build(): + autotools.make() + +def install(): + autotools.rawInstall("DESTDIR=%s" % get.installDIR()) + pisitools.dodoc("COPYING", "README*") + + #some packages search libraries direst under /usr/lib + pisitools.dosym("/usr/lib/octave/5.2.0/liboctave.so.7.0.1", "/usr/lib/liboctave.so") + pisitools.dosym("/usr/lib/octave/5.2.0/liboctinterp.so.7.0.1", "/usr/lib/liboctinterp.so") + pisitools.dosym("/usr/lib/octave/5.2.0/liboctinterp.so.7.0.1", "/usr/lib/liboctinterp.so.7") \ No newline at end of file diff --git a/science/mathematics/octave/files/octave-sundials4.patch b/science/mathematics/octave/files/octave-sundials4.patch new file mode 100644 index 0000000000..394c49b7ef --- /dev/null +++ b/science/mathematics/octave/files/octave-sundials4.patch @@ -0,0 +1,599 @@ +# HG changeset patch +# User Bill Greene +# Date 1550229868 -3600 +# Fri Feb 15 12:24:28 2019 +0100 +# Node ID 4bf27c090f5695bcf545fc4af15e2a61a3941d46 +# Parent f034b29320ad5034ad5c66480f64411e9d773440 +Update DAE/IDE solvers to work with SUNDIALS 3 (bug #52475). + +* libinterp/dldfcn/__ode15__.cc : use SUNDIALS API version 3.x + +diff --git a/libinterp/dldfcn/__ode15__.cc b/libinterp/dldfcn/__ode15__.cc +--- a/libinterp/dldfcn/__ode15__.cc ++++ b/libinterp/dldfcn/__ode15__.cc +@@ -1,6 +1,7 @@ + /* + + Copyright (C) 2016-2019 Francesco Faccio ++Copyright (C) 2019 William Greene + + This file is part of Octave. + +@@ -112,7 +113,8 @@ + havejacsparse (false), mem (nullptr), num (), ida_fun (nullptr), + ida_jac (nullptr), dfdy (nullptr), dfdyp (nullptr), spdfdy (nullptr), + spdfdyp (nullptr), fun (nullptr), jacfun (nullptr), jacspfun (nullptr), +- jacdcell (nullptr), jacspcell (nullptr) ++ jacdcell (nullptr), jacspcell (nullptr), ++ sunJacMatrix (nullptr), sunLinearSolver (nullptr) + { } + + +@@ -122,11 +124,17 @@ + havejacsparse (false), mem (nullptr), num (), ida_fun (ida_fcn), + ida_jac (nullptr), dfdy (nullptr), dfdyp (nullptr), spdfdy (nullptr), + spdfdyp (nullptr), fun (daefun), jacfun (nullptr), jacspfun (nullptr), +- jacdcell (nullptr), jacspcell (nullptr) ++ jacdcell (nullptr), jacspcell (nullptr), ++ sunJacMatrix (nullptr), sunLinearSolver (nullptr) + { } + + +- ~IDA (void) { IDAFree (&mem); } ++ ~IDA (void) ++ { ++ IDAFree (&mem); ++ SUNLinSolFree(sunLinearSolver); ++ SUNMatDestroy(sunJacMatrix); ++ } + + IDA& + set_jacobian (octave_function *jac, DAEJacFuncDense j) +@@ -184,7 +192,7 @@ + static N_Vector ColToNVec (const ColumnVector& data, long int n); + + void +- set_up (void); ++ set_up (const ColumnVector& y); + + void + set_tolerance (ColumnVector& abstol, realtype reltol); +@@ -199,25 +207,24 @@ + void + resfun_impl (realtype t, N_Vector& yy, + N_Vector& yyp, N_Vector& rr); +- + static int +- jacdense (long int Neq, realtype t, realtype cj, N_Vector yy, +- N_Vector yyp, N_Vector, DlsMat JJ, void *user_data, ++ jacdense (realtype t, realtype cj, N_Vector yy, ++ N_Vector yyp, N_Vector, SUNMatrix JJ, void *user_data, + N_Vector, N_Vector, N_Vector) + { + IDA *self = static_cast (user_data); +- self->jacdense_impl (Neq, t, cj, yy, yyp, JJ); ++ self->jacdense_impl (t, cj, yy, yyp, JJ); + return 0; + } + + void +- jacdense_impl (long int Neq, realtype t, realtype cj, +- N_Vector& yy, N_Vector& yyp, DlsMat& JJ); ++ jacdense_impl (realtype t, realtype cj, ++ N_Vector& yy, N_Vector& yyp, SUNMatrix& JJ); + + # if defined (HAVE_SUNDIALS_IDAKLU) + static int + jacsparse (realtype t, realtype cj, N_Vector yy, N_Vector yyp, +- N_Vector, SlsMat Jac, void *user_data, N_Vector, ++ N_Vector, SUNMatrix Jac, void *user_data, N_Vector, + N_Vector, N_Vector) + { + IDA *self = static_cast (user_data); +@@ -227,7 +234,7 @@ + + void + jacsparse_impl (realtype t, realtype cj, N_Vector& yy, +- N_Vector& yyp, SlsMat& Jac); ++ N_Vector& yyp, SUNMatrix& Jac); + #endif + + void set_maxstep (realtype maxstep); +@@ -291,6 +298,8 @@ + DAEJacFuncSparse jacspfun; + DAEJacCellDense jacdcell; + DAEJacCellSparse jacspcell; ++ SUNMatrix sunJacMatrix; ++ SUNLinearSolver sunLinearSolver; + }; + + int +@@ -323,36 +332,61 @@ + } + + void +- IDA::set_up (void) ++ IDA::set_up (const ColumnVector& y) + { ++ N_Vector yy = ColToNVec(y, num); ++ + if (havejacsparse) + { + # if defined (HAVE_SUNDIALS_IDAKLU) +- if (IDAKLU (mem, num, num*num, CSC_MAT) != 0) +- error ("IDAKLU solver not initialized"); ++ ++ sunJacMatrix = SUNSparseMatrix (num, num, num*num, CSC_MAT); ++ if (! sunJacMatrix) ++ error ("Unable to create sparse Jacobian for Sundials"); ++ ++ sunLinearSolver = SUNKLU (yy, sunJacMatrix); ++ if (! sunLinearSolver) ++ error ("Unable to create KLU sparse solver"); + +- IDASlsSetSparseJacFn (mem, IDA::jacsparse); ++ if (IDADlsSetLinearSolver (mem, sunLinearSolver, sunJacMatrix)) ++ error ("Unable to set sparse linear solver"); ++ ++ IDADlsSetJacFn (mem, IDA::jacsparse); ++ + # else +- error ("IDAKLU is not available in this version of Octave"); ++ error ("SUNDIALS SUNLINSOL KLU is not available in this version of Octave"); + # endif ++ + } + else + { +- if (IDADense (mem, num) != 0) +- error ("IDADense solver not initialized"); ++ ++ sunJacMatrix = SUNDenseMatrix (num, num); ++ if (! sunJacMatrix) ++ error ("Unable to create dense Jacobian for Sundials"); + +- if (havejac && IDADlsSetDenseJacFn (mem, IDA::jacdense) != 0) +- error ("Dense Jacobian not set"); ++ sunLinearSolver = SUNDenseLinearSolver (yy, sunJacMatrix); ++ if (! sunLinearSolver) ++ error ("Unable to create dense linear solver"); ++ ++ if (IDADlsSetLinearSolver (mem, sunLinearSolver, sunJacMatrix)) ++ error ("Unable to set dense linear solver"); ++ ++ if (havejac && IDADlsSetJacFn (mem, IDA::jacdense) != 0) ++ error ("Unable to set dense Jacobian function"); ++ + } + } + + void +- IDA::jacdense_impl (long int Neq, realtype t, realtype cj, +- N_Vector& yy, N_Vector& yyp, DlsMat& JJ) ++ IDA::jacdense_impl (realtype t, realtype cj, ++ N_Vector& yy, N_Vector& yyp, SUNMatrix& JJ) + + { + BEGIN_INTERRUPT_WITH_EXCEPTIONS; + ++ long int Neq = NV_LENGTH_S(yy); ++ + ColumnVector y = NVecToCol (yy, Neq); + + ColumnVector yp = NVecToCol (yyp, Neq); +@@ -366,7 +400,7 @@ + + std::copy (jac.fortran_vec (), + jac.fortran_vec () + jac.numel (), +- JJ->data); ++ SUNDenseMatrix_Data(JJ)); + + END_INTERRUPT_WITH_EXCEPTIONS; + } +@@ -374,7 +408,7 @@ + # if defined (HAVE_SUNDIALS_IDAKLU) + void + IDA::jacsparse_impl (realtype t, realtype cj, N_Vector& yy, N_Vector& yyp, +- SlsMat& Jac) ++ SUNMatrix& Jac) + + { + BEGIN_INTERRUPT_WITH_EXCEPTIONS; +@@ -390,17 +424,18 @@ + else + jac = (*jacspcell) (spdfdy, spdfdyp, cj); + +- SparseSetMatToZero (Jac); +- int *colptrs = *(Jac->colptrs); +- int *rowvals = *(Jac->rowvals); ++ SUNMatZero_Sparse (Jac); ++ octave_idx_type *colptrs = SUNSparseMatrix_IndexPointers (Jac); ++ octave_idx_type *rowvals = SUNSparseMatrix_IndexValues (Jac); + + for (int i = 0; i < num + 1; i++) + colptrs[i] = jac.cidx(i); + ++ double *d = SUNSparseMatrix_Data (Jac); + for (int i = 0; i < jac.nnz (); i++) + { + rowvals[i] = jac.ridx(i); +- Jac->data[i] = jac.data(i); ++ d[i] = jac.data(i); + } + + END_INTERRUPT_WITH_EXCEPTIONS; +@@ -567,7 +602,7 @@ + + //main loop + while (((posdirection == 1 && tsol < tend) +- || (posdirection == 0 && tsol > tend)) ++ || (posdirection == 0 && tsol > tend)) + && status == 0) + { + if (IDASolve (mem, tend, &tsol, yy, yyp, IDA_ONE_STEP) != 0) +@@ -692,7 +727,7 @@ + // Linear interpolation + ie(0) = index(0); + te(0) = tsol - val (index(0)) * (tsol - told) +- / (val (index(0)) - oldval (index(0))); ++ / (val (index(0)) - oldval (index(0))); + + ColumnVector ytemp + = y - ((tsol - te(0)) * (y - yold) / (tsol - told)); +@@ -717,7 +752,7 @@ + // Linear interpolation + ie(temp+i) = index(i); + te(temp+i) = tsol - val(index(i)) * (tsol - told) +- / (val(index(i)) - oldval(index(i))); ++ / (val(index(i)) - oldval(index(i))); + + ColumnVector ytemp + = y - (tsol - te (temp + i)) * (y - yold) / (tsol - told); +@@ -1096,7 +1131,7 @@ + event_fcn = options.getfield("Events").function_value (); + + // Set up linear solver +- dae.set_up (); ++ dae.set_up (y0); + + // Integrate + retval = dae.integrate (numt, tspan, y0, yp0, refine, +# HG changeset patch +# User Carlo de Falco +# Date 1550230515 -3600 +# Fri Feb 15 12:35:15 2019 +0100 +# Node ID 9b27b77d2fec1a334baa7f4b2ec70751f4bf2b99 +# Parent 4bf27c090f5695bcf545fc4af15e2a61a3941d46 +Update detection of sundials in the build system (bug #52475). + +* m4/acnclude.m4 : check for sunlinsol_klu.h and sunlinsol_dense.h +* configure.ac : update check for sundials features +* script/ode/ode15i.m : update conditionals in tests +* script/ode/ode15s.m : update conditionals in tests +* libinterp/dldfcn/__ode15__.cc : udate conditionals in preprocessor directives + +diff --git a/configure.ac b/configure.ac +--- a/configure.ac ++++ b/configure.ac +@@ -2206,15 +2206,15 @@ + [], [don't use SUNDIALS IDA library, solvers ode15i and ode15s will be disabled], + [warn_sundials_ida= + OCTAVE_CHECK_SUNDIALS_SIZEOF_REALTYPE +- OCTAVE_CHECK_SUNDIALS_IDA_DENSE +- OCTAVE_CHECK_SUNDIALS_IDAKLU]) ++ OCTAVE_CHECK_SUNDIALS_SUNLINSOL_DENSE ++ OCTAVE_CHECK_SUNDIALS_SUNLINSOL_KLU]) + LIBS="$save_LIBS" + + dnl Define this way instead of with an #if in oct-conf-post.h so that + dnl the build features script will get the correct value. + if test -n "$SUNDIALS_IDA_LIBS" \ + && test -n "$SUNDIALS_NVECSERIAL_LIBS" \ +- && test $octave_cv_sundials_ida_dense = yes \ ++ && test $octave_cv_sundials_sunlinsol_dense = yes \ + && test $octave_cv_sundials_realtype_is_double = yes; then + AC_DEFINE(HAVE_SUNDIALS, 1, [Define to 1 if SUNDIALS is available.]) + fi +diff --git a/libinterp/dldfcn/__ode15__.cc b/libinterp/dldfcn/__ode15__.cc +--- a/libinterp/dldfcn/__ode15__.cc ++++ b/libinterp/dldfcn/__ode15__.cc +@@ -45,15 +45,31 @@ + # include + # endif + +-# if defined (HAVE_IDA_IDA_DENSE_H) +-# include ++# if defined (HAVE_SUNDIALS_SUNDIALS_MATRIX_H) ++# include ++# endif ++ ++# if defined (HAVE_SUNDIALS_SUNDIALS_LINEARSOLVER_H) ++# include ++# endif ++ ++# if defined (HAVE_SUNLINSOL_SUNLINSOL_DENSE_H) ++# include + # endif + +-# if defined (HAVE_IDA_IDA_KLU_H) +-# include ++# if defined (HAVE_IDA_IDA_DIRECT_H) ++# include ++# endif ++ ++# if defined (HAVE_SUNDIALS_SUNDIALS_SPARSE_H) + # include + # endif + ++ ++# if defined (HAVE_SUNLINSOL_SUNLINSOL_KLU_H) ++# include ++# endif ++ + # if defined (HAVE_NVECTOR_NVECTOR_SERIAL_H) + # include + # endif +@@ -221,7 +237,7 @@ + jacdense_impl (realtype t, realtype cj, + N_Vector& yy, N_Vector& yyp, SUNMatrix& JJ); + +-# if defined (HAVE_SUNDIALS_IDAKLU) ++# if defined (HAVE_SUNDIALS_SUNLINSOL_KLU) + static int + jacsparse (realtype t, realtype cj, N_Vector yy, N_Vector yyp, + N_Vector, SUNMatrix Jac, void *user_data, N_Vector, +@@ -338,7 +354,7 @@ + + if (havejacsparse) + { +-# if defined (HAVE_SUNDIALS_IDAKLU) ++#if defined (HAVE_SUNDIALS_SUNLINSOL_KLU) + + sunJacMatrix = SUNSparseMatrix (num, num, num*num, CSC_MAT); + if (! sunJacMatrix) +@@ -405,7 +421,7 @@ + END_INTERRUPT_WITH_EXCEPTIONS; + } + +-# if defined (HAVE_SUNDIALS_IDAKLU) ++# if defined (HAVE_SUNDIALS_SUNLINSOL_KLU) + void + IDA::jacsparse_impl (realtype t, realtype cj, N_Vector& yy, N_Vector& yyp, + SUNMatrix& Jac) +diff --git a/m4/acinclude.m4 b/m4/acinclude.m4 +--- a/m4/acinclude.m4 ++++ b/m4/acinclude.m4 +@@ -2210,14 +2210,11 @@ + dnl precision realtype. + dnl + AC_DEFUN([OCTAVE_CHECK_SUNDIALS_SIZEOF_REALTYPE], [ +- AC_CHECK_HEADERS([ida/ida.h ida.h]) + AC_CACHE_CHECK([whether SUNDIALS IDA is configured with double precision realtype], + [octave_cv_sundials_realtype_is_double], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #if defined (HAVE_IDA_IDA_H) + #include +- #else +- #include + #endif + #include + ]], [[ +@@ -2233,61 +2230,72 @@ + fi + ]) + dnl +-dnl Check whether SUNDIALS IDA library is configured with IDAKLU ++dnl Check whether SUNDIALS IDA library is configured with SUNLINSOL_KLU + dnl enabled. + dnl +-AC_DEFUN([OCTAVE_CHECK_SUNDIALS_IDAKLU], [ +- AC_CHECK_HEADERS([ida/ida_klu.h ida_klu.h]) +- AC_CACHE_CHECK([whether SUNDIALS IDA is configured with IDAKLU enabled], +- [octave_cv_sundials_idaklu], ++AC_DEFUN([OCTAVE_CHECK_SUNDIALS_SUNLINSOL_KLU], [ ++ AC_CHECK_HEADERS([sundials/sundials_sparse.h sunlinsol/sunlinsol_klu.h]) ++ AC_CACHE_CHECK([whether SUNDIALS IDA is configured with SUNLINSOL_KLU enabled], ++ [octave_cv_sundials_sunlinsol_klu], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +- #if defined (HAVE_IDA_IDA_KLU_H) +- #include +- #else +- #include ++ #if defined (HAVE_IDA_IDA_H) ++ #include ++ #endif ++ #if defined (HAVE_SUNDIALS_SUNDIALS_SPARSE_H) ++ #include ++ #endif ++ #if defined (HAVE_SUNLINSOL_SUNLINSOL_KLU_H) ++ #include + #endif + ]], [[ +- IDAKLU (0, 0, 0, 0); ++ SUNKLU (0, 0); + ]])], +- octave_cv_sundials_idaklu=yes, +- octave_cv_sundials_idaklu=no) ++ octave_cv_sundials_sunlinsol_klu=yes, ++ octave_cv_sundials_sunlinsol_klu=no) + ]) +- if test $octave_cv_sundials_idaklu = yes; then +- AC_DEFINE(HAVE_SUNDIALS_IDAKLU, 1, +- [Define to 1 if SUNDIALS IDA is configured with IDAKLU enabled.]) ++ if test $octave_cv_sundials_sunlinsol_klu = yes; then ++ AC_DEFINE(HAVE_SUNDIALS_SUNLINSOL_KLU, 1, ++ [Define to 1 if SUNDIALS IDA is configured with SUNLINSOL_KLU enabled.]) + else +- warn_sundials_idaklu="SUNDIALS IDA library not configured with IDAKLU, ode15i and ode15s will not support the sparse Jacobian feature" +- OCTAVE_CONFIGURE_WARNING([warn_sundials_idaklu]) ++ warn_sundials_idaklu="SUNDIALS IDA library not configured with SUNLINSOL_KLU, ode15i and ode15s will not support the sparse Jacobian feature" ++ OCTAVE_CONFIGURE_WARNING([warn_sundials_sunlinsol_klu]) + fi + ]) + dnl +-dnl Check whether SUNDIALS IDA library has the IDADENSE linear solver. ++dnl Check whether SUNDIALS IDA library has the SUNLINSOL_DENSE linear solver. + dnl The IDADENSE API was removed in SUNDIALS version 3.0.0. + dnl +-AC_DEFUN([OCTAVE_CHECK_SUNDIALS_IDA_DENSE], [ +- AC_CHECK_HEADERS([ida/ida_dense.h ida_dense.h]) +- AC_CACHE_CHECK([whether SUNDIALS IDA includes the IDADENSE linear solver], +- [octave_cv_sundials_ida_dense], ++AC_DEFUN([OCTAVE_CHECK_SUNDIALS_SUNLINSOL_DENSE], [ ++ AC_CHECK_HEADERS([sunlinsol/sunlinsol_dense.h sundials/sundials_matrix.h sundials/sundials_linearsolver.h ida/ida_direct.h]) ++ AC_CACHE_CHECK([whether SUNDIALS IDA includes the SUNLINSOL_DENSE linear solver], ++ [octave_cv_sundials_sunlinsol_dense], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +- #if defined (HAVE_IDA_IDA_DENSE_H) +- #include +- #else +- #include ++ #if defined (HAVE_IDA_IDA_H) ++ #include ++ #endif ++ #if defined (HAVE_SUNDIALS_SUNDIALS_MATRIX_H) ++ #include + #endif ++ #if defined (HAVE_SUNDIALS_SUNDIALS_LINEARSOLVER_H) ++ #include ++ #endif ++ #if defined (HAVE_IDA_IDA_DIRECT_H) ++ #include ++ #endif + ]], [[ + void *mem = 0; + long int num = 0; + IDADense (mem, num); + ]])], +- octave_cv_sundials_ida_dense=yes, +- octave_cv_sundials_ida_dense=no) ++ octave_cv_sundials_sunlinsol_dense=yes, ++ octave_cv_sundials_sunlinsol_dense=no) + ]) +- if test $octave_cv_sundials_ida_dense = yes; then +- AC_DEFINE(HAVE_SUNDIALS_IDADENSE, 1, +- [Define to 1 if SUNDIALS IDA includes the IDADENSE linear solver.]) ++ if test $octave_cv_sundials_sunlinsol_dense = yes; then ++ AC_DEFINE(HAVE_SUNDIALS_SUNLINSOL_DENSE, 1, ++ [Define to 1 if SUNDIALS IDA includes the SUNLINSOL_DENSE linear solver.]) + else +- warn_sundials_ida_dense="SUNDIALS IDA library does not include the IDADENSE linear solver, ode15i and ode15s will be disabled" +- OCTAVE_CONFIGURE_WARNING([warn_sundials_ida_dense]) ++ warn_sundials_ida_dense="SUNDIALS IDA library does not include the SUNLINSOL_DENSE linear solver, ode15i and ode15s will be disabled" ++ OCTAVE_CONFIGURE_WARNING([warn_sundials_sunlinsol_dense]) + fi + ]) + dnl +diff --git a/scripts/ode/ode15i.m b/scripts/ode/ode15i.m +--- a/scripts/ode/ode15i.m ++++ b/scripts/ode/ode15i.m +@@ -452,7 +452,7 @@ + %! assert ([t(end), y(end,:)], fref, 1e-3); + + ## Jacobian fun sparse +-%!testif HAVE_SUNDIALS_IDAKLU ++%!testif HAVE_SUNDIALS_SUNLINSOL_KLU + %! opt = odeset ("Jacobian", @jacfunsparse, "AbsTol", 1e-7, "RelTol", 1e-7); + %! [t, y] = ode15i (@rob, [0, 100], [1; 0; 0], [-1e-4; 1e-4; 0], opt); + %! assert ([t(end), y(end,:)], fref, 1e-3); +@@ -545,7 +545,7 @@ + %! "invalid value assigned to field 'Jacobian'"); + + ## Jacobian cell sparse wrong dimension +-%!testif HAVE_SUNDIALS_IDAKLU ++%!testif HAVE_SUNDIALS_SUNLINSOL_KLU + %! DFDY = sparse ([-0.04, 1; + %! 0.04, 1]); + %! DFDYP = sparse ([-1, 0, 0; +diff --git a/scripts/ode/ode15s.m b/scripts/ode/ode15s.m +--- a/scripts/ode/ode15s.m ++++ b/scripts/ode/ode15s.m +@@ -545,21 +545,21 @@ + %! [t, y] = ode15s (@rob, [0, 100], [1; 0; 0], opt); + %! assert ([t(end), y(end,:)], frefrob, 1e-3); + +-%!testif HAVE_SUNDIALS_IDAKLU ++%!testif HAVE_SUNDIALS_SUNLINSOL_KLU + %! opt = odeset ("MStateDependence", "none", + %! "Mass", [1, 0, 0; 0, 1, 0; 0, 0, 0], + %! "Jacobian", @jacfunsparse); + %! [t, y] = ode15s (@rob, [0, 100], [1; 0; 0], opt); + %! assert ([t(end), y(end,:)], frefrob, 1e-3); + +-%!testif HAVE_SUNDIALS_IDAKLU ++%!testif HAVE_SUNDIALS_SUNLINSOL_KLU + %! opt = odeset ("MStateDependence", "none", + %! "Mass", sparse ([1, 0, 0; 0, 1, 0; 0, 0, 0]), + %! "Jacobian", @jacfunsparse); + %! [t, y] = ode15s (@rob, [0, 100], [1; 0; 0], opt); + %! assert ([t(end), y(end,:)], frefrob, 1e-3); + +-%!testif HAVE_SUNDIALS_IDAKLU ++%!testif HAVE_SUNDIALS_SUNLINSOL_KLU + %! warning ("off", "ode15s:mass_state_dependent_provided", "local"); + %! opt = odeset ("MStateDependence", "none", + %! "Mass", @massdensefunstate, +@@ -575,14 +575,14 @@ + %! [t, y] = ode15s (@rob, [0, 100], [1; 0; 0], opt); + %! assert ([t(end), y(end,:)], frefrob, 1e-3); + +-%!testif HAVE_SUNDIALS_IDAKLU ++%!testif HAVE_SUNDIALS_SUNLINSOL_KLU + %! opt = odeset ("MStateDependence", "none", + %! "Mass", @massdensefuntime, + %! "Jacobian", @jacfunsparse); + %! [t, y] = ode15s (@rob, [0, 100], [1; 0; 0], opt); + %! assert ([t(end), y(end,:)], frefrob, 1e-3); + +-%!testif HAVE_SUNDIALS_IDAKLU ++%!testif HAVE_SUNDIALS_SUNLINSOL_KLU + %! opt = odeset ("MStateDependence", "none", + %! "Mass", @masssparsefuntime, + %! "Jacobian", @jacfunsparse); +# HG changeset patch +# Parent 6ef7a85c3b1908f57665a08d1d7205c15018c2af + +diff --git a/libinterp/dldfcn/__ode15__.cc b/libinterp/dldfcn/__ode15__.cc +--- a/libinterp/dldfcn/__ode15__.cc ++++ b/libinterp/dldfcn/__ode15__.cc +@@ -67,6 +67,18 @@ + + + # if defined (HAVE_SUNLINSOL_SUNLINSOL_KLU_H) ++# if defined (HAVE_KLU_H) ++# include ++# endif ++# if defined (HAVE_KLU_KLU_H) ++# include ++# endif ++# if defined (HAVE_SUITESPARSE_KLU_H) ++# include ++# endif ++# if defined (HAVE_UFPARSE_KLU_H) ++# include ++# endif + # include + # endif + +diff --git a/m4/acinclude.m4 b/m4/acinclude.m4 +--- a/m4/acinclude.m4 ++++ b/m4/acinclude.m4 +@@ -2244,6 +2244,18 @@ + #if defined (HAVE_SUNDIALS_SUNDIALS_SPARSE_H) + #include + #endif ++ #if defined (HAVE_KLU_H) ++ #include ++ #endif ++ #if defined (HAVE_KLU_KLU_H) ++ #include ++ #endif ++ #if defined (HAVE_SUITESPARSE_KLU_H) ++ #include ++ #endif ++ #if defined (HAVE_UFPARSE_KLU_H) ++ #include ++ #endif + #if defined (HAVE_SUNLINSOL_SUNLINSOL_KLU_H) + #include + #endif diff --git a/science/mathematics/octave/pspec.xml b/science/mathematics/octave/pspec.xml new file mode 100644 index 0000000000..f775d6e924 --- /dev/null +++ b/science/mathematics/octave/pspec.xml @@ -0,0 +1,126 @@ + + + + + octave + https://www.gnu.org/software/octave/ + + Blue Devil + bluedevil@sctzine.com + + science.mathematics + GPL + library + app:gui + A high-level language, primarily intended for numerical computations. + GNU Octave is software featuring a high-level programming language, primarily intended for numerical computations. Octave helps in solving linear and nonlinear problems numerically, and for performing other numerical experiments using a language that is mostly compatible with MATLAB. It may also be used as a batch-oriented language. + https://ftp.gnu.org/gnu/octave/octave-5.2.0.tar.gz + + gperf + gnuplot + qrupdate + blas-devel + curl-devel + glpk-devel + hdf5-devel + fltk-devel + fftw3-devel + qhull-devel + arpack-devel + lapack-devel + qt5-linguist + libpcre-devel + freetype-devel + mesa-glu-devel + qt5-base-devel + readline-devel + sundials-devel + portaudio-devel + fontconfig-devel + libsndfile-devel + ghostscript-devel + qscintilla2-devel + SuiteSparse-devel + qt5-assistant-devel + GraphicsMagick-devel + + + + + octave-sundials4.patch + + + + + octave + A high-level language, primarily intended for numerical computations. + + blas + curl + fltk + glpk + hdf5 + fftw3 + qhull + arpack + lapack + libXft + libpcre + libXext + libgomp + alsa-lib + libglvnd + mesa-glu + freetype + qrupdate + qt5-base + readline + sundials + libXfixes + portaudio + fontconfig + libsndfile + libXcursor + libXrender + ghostscript + libgfortran + libXinerama + qscintilla2 + SuiteSparse + qt5-assistant + GraphicsMagick + + + /usr/lib + /usr/share/ + /usr/share/man + /usr/bin + /usr/libexec + /usr/share/doc/octave + /etc/ld.so.conf.d/octave.conf + + + + + octave-devel + Development files for octave + + octave + + + /usr/include + /usr/lib/pkgconfig + + + + + + 2020-05-22 + 5.2.0 + First pisi release. + Blue Devil + bluedevil@sctzine.com + + + \ No newline at end of file diff --git a/science/mathematics/octave/translations.xml b/science/mathematics/octave/translations.xml new file mode 100644 index 0000000000..e5f2e2f30b --- /dev/null +++ b/science/mathematics/octave/translations.xml @@ -0,0 +1,14 @@ + + + + octave + Özellikle sayısal hesaplamalar için geliştirilmiş yüksek seviyeli bir programlama dili. + octave, özellikle sayısal hesaplamalar için geliştirilmiş yüksek seviyeli bir programlama dilidir. Octave doğrusal ve doğrusal olmayan sayısal problemleri çözmede yardımcı olur. + + + + octave-devel + octave için geliştirme dosyaları + octave-devel, octave için geliştirme dosyalarını içerir. + + \ No newline at end of file