..........................................................................
Date: Tue, 25 Feb 1997 15:09:10 -0800 (PST)
From: Alan Hindmarsh <daphne.llnl.gov!alanh>

                    Bug in LSODA and LSODAR

There is a bug in the LSODA and LSODAR solvers.  It is in the main
driver routines, subroutine lsoda and subroutine lsodar, and has to do
with a flag called jstart that each passes to subroutine stoda to show
the extent of changes in input parameters.  A value of jstart = -1 is
correctly set on a change in method (meth), but then incorrectly
overridden as jstart = -2 if itask = 4 and tcrit is about to be
overtaken on the next step.

The fix is quite simple, and involves two lines in subroutine lsoda
and subroutine lsodar:

(1) Following statement 245, replace the line
      if (istate .eq. 2) jstart = -2
with
      if (istate .eq. 2 .and. jstart .ge. 0) jstart = -2

(2) Following statement 345, replace the line
      jstart = -2
with
      if (jstart .ge. 0) jstart = -2


-Alan Hindmarsh
 25 February 1997

