[Pkg-octave-commit] [octave-odepkg] 01/03: show-progress-in-rodas.patch: New patch

Rafael Laboissière rlaboiss-guest at moszumanska.debian.org
Tue Apr 7 10:52:03 UTC 2015


This is an automated email from the git hooks/post-receive script.

rlaboiss-guest pushed a commit to branch master
in repository octave-odepkg.

commit a54ed78a17c2ca263e1875ee29fefe0dd2efb5a4
Author: Rafael Laboissiere <rafael at laboissiere.net>
Date:   Fri Sep 19 05:58:36 2014 -0300

    show-progress-in-rodas.patch: New patch
---
 debian/patches/series                       |   1 +
 debian/patches/show-progress-in-rodas.patch | 149 ++++++++++++++++++++++++++++
 2 files changed, 150 insertions(+)

diff --git a/debian/patches/series b/debian/patches/series
index 7ced22c..9ffb71a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 info-dir-section.diff
 autoload-yes.patch
 correct-fflags-for-f77.patch
+show-progress-in-rodas.patch
diff --git a/debian/patches/show-progress-in-rodas.patch b/debian/patches/show-progress-in-rodas.patch
new file mode 100644
index 0000000..8a1eb7f
--- /dev/null
+++ b/debian/patches/show-progress-in-rodas.patch
@@ -0,0 +1,149 @@
+Description: Show progress when running the tests in odepkg_octsolver_rodas
+ This is an attempt to avoid the abortion of the building of the
+ package build on some architectures.
+Author: Rafael Laboissiere <rafael at laboissiere.net>
+Forwarded: not-needed
+Last-Update: 2014-09-19
+
+--- octave-odepkg-0.8.4.orig/src/odepkg_octsolver_rodas.cc
++++ octave-odepkg-0.8.4/src/odepkg_octsolver_rodas.cc
+@@ -943,6 +943,20 @@ oders (@@odepkg_equations_lorenz, [0, 25
+ %!    if (size (vt) ~= [1, 1]) error ('"fout" step "done"'); end
+ %!  else error ('"fout" invalid vflag');
+ %!  end
++%!function [varargout] = odeprogress (vt, vy, vflag, varargin)
++%!    if (strcmp (vflag, 'init'))
++%!        fprintf (1, '|');
++%!        fflush (1);
++%!    elseif (isempty (vflag)) %# Return value varargout{1} needed
++%!        fprintf (1, '=');
++%!        fflush (1);
++%!        varargout{1} = false; 
++%!   elseif (strcmp (vflag, 'done')) 
++%!        fprintf (1, '|\n');
++%!        fflush (1);
++%!   end
++%!function retval = my_odeset (varargin)
++%!    retval = odeset ('OutputFcn', @odeprogress, varargin {:});
+ %!
+ %! %# Turn off output of warning messages for all tests, turn them on
+ %! %# again if the last test is called
+@@ -987,46 +989,46 @@ oders (@@odepkg_equations_lorenz, [0, 25
+ %!  vsol = oders (@fpol, [0 2], [2 0], 12, 13, 'KL');
+ %!  assert ([vsol.x(end), vsol.y(end,:)], [2, fref], 1e-3);
+ %!test %# empty OdePkg structure *but* extra input arguments
+-%!  vopt = odeset;
++%!  vopt = my_odeset;
+ %!  vsol = oders (@fpol, [0 2], [2 0], vopt, 12, 13, 'KL');
+ %!  assert ([vsol.x(end), vsol.y(end,:)], [2, fref], 1e-3);
+ %!error %# strange OdePkg structure
+ %!  vopt = struct ('foo', 1);
+ %!  vsol = oders (@fpol, [0 2], [2 0], vopt);
+ %!test %# AbsTol option
+-%!  vopt = odeset ('AbsTol', 1e-5);
++%!  vopt = my_odeset ('AbsTol', 1e-5);
+ %!  vsol = oders (@fpol, [0 2], [2 0], vopt);
+ %!  assert ([vsol.x(end), vsol.y(end,:)], [2, fref], 1e-3);
+ %!test %# AbsTol and RelTol option
+-%!  vopt = odeset ('AbsTol', 1e-8, 'RelTol', 1e-8);
++%!  vopt = my_odeset ('AbsTol', 1e-8, 'RelTol', 1e-8);
+ %!  vsol = oders (@fpol, [0 2], [2 0], vopt);
+ %!  assert ([vsol.x(end), vsol.y(end,:)], [2, fref], 1e-3);
+ %!test %# RelTol and NormControl option -- higher accuracy
+-%!  vopt = odeset ('RelTol', 1e-8, 'NormControl', 'on');
++%!  vopt = my_odeset ('RelTol', 1e-8, 'NormControl', 'on');
+ %!  vsol = oders (@fpol, [0 2], [2 0], vopt);
+ %!  assert ([vsol.x(end), vsol.y(end,:)], [2, fref], 1e-4);
+ %!test %# Keeps initial values while integrating
+-%!  vopt = odeset ('NonNegative', 2);
++%!  vopt = my_odeset ('NonNegative', 2);
+ %!  vsol = oders (@fpol, [0 2], [2 0], vopt);
+ %!  assert ([vsol.x(end), vsol.y(end,:)], [2, fref], 1e-4);
+ %!test %# Details of OutputSel and Refine can't be tested
+-%!  vopt = odeset ('OutputFcn', @fout, 'OutputSel', 1, 'Refine', 5);
++%!  vopt = my_odeset ('OutputFcn', @fout, 'OutputSel', 1, 'Refine', 5);
+ %!  vsol = oders (@fpol, [0 2], [2 0], vopt);
+ %!test %# Stats must add further elements in vsol
+-%!  vopt = odeset ('Stats', 'on');
++%!  vopt = my_odeset ('Stats', 'on');
+ %!  vsol = oders (@fpol, [0 2], [2 0], vopt);
+ %!  assert (isfield (vsol, 'stats'));
+ %!  assert (isfield (vsol.stats, 'nsteps'));
+ %!test %# InitialStep option
+-%!  vopt = odeset ('InitialStep', 1e-8);
++%!  vopt = my_odeset ('InitialStep', 1e-8);
+ %!  vsol = oders (@fpol, [0 0.2], [2 0], vopt);
+ %!  assert ([vsol.x(2)-vsol.x(1)], [1e-8], 1e-9);
+ %!test %# MaxStep option
+-%!  vopt = odeset ('MaxStep', 1e-2);
++%!  vopt = my_odeset ('MaxStep', 1e-2);
+ %!  vsol = oders (@fpol, [0 0.2], [2 0], vopt);
+ %!  assert ([vsol.x(5)-vsol.x(4)], [1e-2], 1e-2);
+ %!test %# Events option add further elements in vsol
+-%!  vopt = odeset ('Events', @feve);
++%!  vopt = my_odeset ('Events', @feve);
+ %!  vsol = oders (@fpol, [0 10], [2 0], vopt);
+ %!  assert (isfield (vsol, 'ie'));
+ %!  assert (vsol.ie(1), 2);
+@@ -1045,11 +1047,11 @@ oders (@@odepkg_equations_lorenz, [0, 25
+ %!    [2.0, 2.496110, -0.830550, -2.677589], 1e-1);
+ %!  warning ('on', 'OdePkg:HideWarning');
+ %!test %# Jacobian option
+-%!  vopt = odeset ('Jacobian', @fjac);
++%!  vopt = my_odeset ('Jacobian', @fjac);
+ %!  vsol = oders (@fpol, [0 2], [2 0], vopt);
+ %!  assert ([vsol.x(end), vsol.y(end,:)], [2, fref], 1e-3);
+ %!test %# Jacobian option and sparse return value
+-%!  vopt = odeset ('Jacobian', @fjcc);
++%!  vopt = my_odeset ('Jacobian', @fjcc);
+ %!  vsol = oders (@fpol, [0 2], [2 0], vopt);
+ %!  assert ([vsol.x(end), vsol.y(end,:)], [2, fref], 1e-3);
+ %!
+@@ -1057,23 +1059,23 @@ oders (@@odepkg_equations_lorenz, [0, 25
+ %! %# test for Vectorized option is missing
+ %!
+ %!test %# Mass option as function
+-%!  vopt = odeset ('Mass', @fmas);
++%!  vopt = my_odeset ('Mass', @fmas);
+ %!  vsol = oders (@fpol, [0 2], [2 0], vopt);
+ %!  assert ([vsol.x(end), vsol.y(end,:)], [2, fref], 1e-3);
+ %!test %# Mass option as matrix
+-%!  vopt = odeset ('Mass', eye (2,2));
++%!  vopt = my_odeset ('Mass', eye (2,2));
+ %!  vsol = oders (@fpol, [0 2], [2 0], vopt);
+ %!  assert ([vsol.x(end), vsol.y(end,:)], [2, fref], 1e-3);
+ %!test %# Mass option as sparse matrix
+-%!  vopt = odeset ('Mass', sparse (eye (2,2)));
++%!  vopt = my_odeset ('Mass', sparse (eye (2,2)));
+ %!  vsol = oders (@fpol, [0 2], [2 0], vopt);
+ %!  assert ([vsol.x(end), vsol.y(end,:)], [2, fref], 1e-3);
+ %!test %# Mass option as function and sparse matrix
+-%!  vopt = odeset ('Mass', @fmsa);
++%!  vopt = my_odeset ('Mass', @fmsa);
+ %!  vsol = oders (@fpol, [0 2], [2 0], vopt);
+ %!  assert ([vsol.x(end), vsol.y(end,:)], [2, fref], 1e-3);
+ %!test %# Mass option as function and MStateDependence
+-%!  vopt = odeset ('Mass', @fmas, 'MStateDependence', 'strong');
++%!  vopt = my_odeset ('Mass', @fmas, 'MStateDependence', 'strong');
+ %!  vsol = oders (@fpol, [0 2], [2 0], vopt);
+ %!  assert ([vsol.x(end), vsol.y(end,:)], [2, fref], 1e-3);
+ %!
+@@ -1082,15 +1084,15 @@ oders (@@odepkg_equations_lorenz, [0, 25
+ %! %# test for MaxOrder option is missing
+ %!
+ %!test %# Set BDF option to something else than default
+-%!  vopt = odeset ('BDF', 'on');
++%!  vopt = my_odeset ('BDF', 'on');
+ %!  vsol = oders (@fpol, [0 2], [2 0], vopt);
+ %!  assert ([vsol.x(end), vsol.y(end,:)], [2, fref], 1e-3);
+ %!test %# Set NewtonTol option to something else than default
+-%!  vopt = odeset ('NewtonTol', 1e-3);
++%!  vopt = my_odeset ('NewtonTol', 1e-3);
+ %!  vsol = oders (@fpol, [0 2], [2 0], vopt);
+ %!  assert ([vsol.x(end), vsol.y(end,:)], [2, fref], 1e-3);
+ %!test %# Set MaxNewtonIterations option to something else than default
+-%!  vopt = odeset ('MaxNewtonIterations', 2);
++%!  vopt = my_odeset ('MaxNewtonIterations', 2);
+ %!  vsol = oders (@fpol, [0 2], [2 0], vopt);
+ %!  assert ([vsol.x(end), vsol.y(end,:)], [2, fref], 1e-3);
+ %!

-- 
Alioth's /home/groups/pkg-octave/bin/git-commit-notice on /srv/git.debian.org/git/pkg-octave/octave-odepkg.git



More information about the Pkg-octave-commit mailing list