NONMEM Users Network Archive

Hosted by Cognigen


From: Elassaiss - Schaap, J. <jeroen.elassaiss-schaap>
Date: Thu, 22 Sep 2011 08:58:04 +0200


This message looks familiar to me. I do not know about specifics of the err=
or code, but LSODA is the integrator behind ADVAN13. You can safely assume =
that it has some problems with integration of your $DES block. You could ch=
eck e.g. parameters that have become too large etc.

Unsatisfactory answer, actually. Some googling gave back this link: http://=
where LSODA return values are mentioned. "[...]conditions under which the l=
ast call to lsoda returned. 2 if LSODA was successful, -1 if excess work do=
ne, -2 means excess accuracy requested. (Tolerances too small), -3 means il=
legal input detected. (See printed message.), -4 means repeated error test =
failures. (Check all input), -5 means repeated convergence failures. (Perha=
ps bad Jacobian supplied or wrong choice of MF or tolerances.), -6 means er=
ror weight became zero during problem. (Solution component i vanished, and =
atol or atol(i) = 0.) "

Still not satisfying. More digging revealed the documentation imbedded in f=
ortran code in the odesolve package. The paragraphs on the returned istate:

c on output, istate has the following values and meanings.
c 1 means nothing was done, as tout was equal to t with
c istate = 1 on input. (however, an internal counter was
c set to detect and prevent repeated calls of this type.)
c 2 means the integration was performed successfully.
c -1 means an excessive amount of work (more than mxstep
c steps) was done on this call, before completing the
c requested task, but the integration was otherwise
c successful as far as t. (mxstep is an optional input
c and is normally 500.) to continue, the user may
c simply reset istate to a value .gt. 1 and call again
c (the excess work step counter will be reset to 0).
c in addition, the user may increase mxstep to avoid
c this error return (see below on optional inputs).
c -2 means too much accuracy was requested for the precision
c of the machine being used. this was detected before
c completing the requested task, but the integration
c was successful as far as t. to continue, the tolerance
c parameters must be reset, and istate must be set
c to 3. the optional output tolsf may be used for this
c purpose. (note.. if this condition is detected before
c taking any steps, then an illegal input return
c (istate = -3) occurs instead.)
c -3 means illegal input was detected, before taking any
c integration steps. see written message for details.
c note.. if the solver detects an infinite loop of calls
c to the solver with illegal input, it will cause
c the run to stop.
c -4 means there were repeated error test failures on
c one attempted step, before completing the requested
c task, but the integration was successful as far as t.
c the problem may have a singularity, or the input
c may be inappropriate.
c -5 means there were repeated convergence test failures on
c one attempted step, before completing the requested
c task, but the integration was successful as far as t.
c this may be caused by an inaccurate jacobian matrix,
c if one is being used.
c -6 means ewt(i) became zero for some i during the
c integration. pure relative error control (atol(i)=0.0)
c was requested on a variable which has now vanished.
c the integration was successful as far as t.
c -7 means the length of rwork and/or iwork was too small to
c proceed, but the integration was successful as far as t.
c this happens when lsoda chooses to switch methods
c but lrw and/or liw is too small for the new method.
c note.. since the normal output value of istate is 2,
c it does not need to be reset for normal continuation.
c also, since a negative input value of istate will be
c regarded as illegal, a negative output value requires the
c user to change it, and possibly other inputs, before
c calling the solver again.

Which says that -1 indicates that the solver actually has succeeded and non=
mem could have continued by setting istate to 2 and mxstep to a larger valu=
e.... although completing the run could obviously take much more time.

For the nonmem development team: would it be an idea to (1) include LSODA r=
eturn codes in the html help and (2) allow the user control of the mxstep i=
nput to ADVAN13?

Best regards,

J. Elassaiss-Schaap
Scientist PK/PD
PO Box 20, 5340 BH Oss, Netherlands
Phone: + 31 412 66 9320
Fax: + 31 412 66 2506
e-mail: jeroen.elassaiss

From: owner-nmusers
 Behalf Of nonmem
Sent: Thursday, September 22, 2011 05:41
To: nmusers
Subject: [NMusers] "ERROR IN LSODA: CODE -1"

Hello NONMEM Users,

What is "ERROR IN LSODA: CODE -1"? Is there a list of explaned error codes=

Thank you!

Notice: This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates Direct contact information
for affiliates is available at that may be confidential,
proprietary copyrighted and/or legally privileged. It is intended solely
for the use of the individual or entity named on this message. If you are
not the intended recipient, and have received this message in error,
please notify us immediately by reply e-mail and then delete it from
your system.

Received on Thu Sep 22 2011 - 02:58:04 EDT

The NONMEM Users Network is maintained by ICON plc. Requests to subscribe to the network should be sent to:

Once subscribed, you may contribute to the discussion by emailing: