Fortran overflow

6 messages 5 people Latest: Feb 16, 2004

Fortran overflow

From: Rik Schoemaker Date: February 12, 2004 technical
From: Rik Schoemaker - RS@chdr.nl Subject: [NMusers] Fortran overflow Date: 2/12/2004 3:18 AM Dear all, I'm experiencing a nasty problem in running NONMEM. I have a model describing two-compartment parent PK with first order absorption. The parent is metabolised (and measured) and the metabolite is subsequently excreted. I run variants of this with the FO method and sometimes get convergence. At other times it converges but is then terminated by a Fortran overflow error message (forrtl error (72): floating overflow), leaving me with no results. If I try FOCE, it terminates with the same message during the first iteration. Could there be someting with empirical Bayes estimate generation (I request POSTHOC with FO) that kills the program...? Any clues? Rik Schoemaker p.s. I've tried Leonid's and Toufigh's trick by replacing the $ERROR block below with DRG1 = A(2)/S2 DRG2 = A(4)/S4 IF (CMT.EQ.4) THEN Y=DRG2*EXP(ERR(2)) ELSE Y=DRG1*EXP(ERR(1)) ENDIF and the result is the same.... $PROB DRUG1 and DRUG2; M_G17 $INPUT ID WK TIME DV AMT MDV CMT TRTI $DATA c:\data\DATNSS2.NM $SUBROUTINES ADVAN5 $MODEL COMP=(DEPOT,INITIALOFF, DEFDOSE) COMP=(CENTRAL) COMP=(PERID) COMP=(DRUG2) $PK CL = THETA(1)*EXP(ETA(1)) TABS= THETA(2)*EXP(ETA(2)) Q = THETA(3)*EXP(ETA(3)) S2 = THETA(4)*EXP(ETA(4)) VSS = THETA(5)*EXP(ETA(5)) S4 = THETA(6)*EXP(ETA(6)) K40 = THETA(7)*EXP(ETA(7)) K12 = 0.693/TABS S3 = VSS-S2 K24 = CL/S2 K23 = Q/S2 K32 = Q/S3 CLG = K40*S4 $ERROR PREDI = F IF (CMT.EQ.4) THEN Y=PREDI*EXP(ERR(2)) ELSE Y=PREDI*EXP(ERR(1)) ENDIF $THETA (1,15)(0.01,1,10) (1,20) (2,13,200) (50,1000) (0.1,5.5) (0.01,0.2) $OMEGA .2 2 .5 2 .2 1 .2 $SIGMA 0.1 0.01 $ESTIMATION MAXEVAL=9999 PRINT=1 NOABORT POSTHOC METHOD=0 $COV $TABLE ID WK TIME DV PREDI CMT CL Q S2 VSS TABS CLG K40 S4 TRTI FILE = M_G17.DAT NOHEADER NOPRINT NOAPPEND $TABLE ID WK CL Q S2 VSS TABS CLG K40 S4 TRTI FILE = M_G17.PAR NOHEADER NOPRINT NOAPPEND FIRSTONLY Data for the first subject (it's a multiple dose experiment and you're looking at 2 weeks of dosing): 1 12 0.00 . 2291 1 1 1 1 12 12.00 . 2291 1 1 1 1 12 24.00 . 2291 1 1 1 1 12 36.00 . 2291 1 1 1 1 12 48.00 . 2291 1 1 1 1 12 60.00 . 2291 1 1 1 1 12 72.00 . 2291 1 1 1 1 12 84.00 . 2291 1 1 1 1 12 96.00 . 2291 1 1 1 1 12 108.00 . 2291 1 1 1 1 12 120.00 . 2291 1 1 1 1 12 132.00 . 2291 1 1 1 1 12 144.00 . 2291 1 1 1 1 12 156.00 . 2291 1 1 1 1 12 168.00 . 2291 1 1 1 1 12 180.00 . 2291 1 1 1 1 12 192.00 . 2291 1 1 1 1 12 204.00 . 2291 1 1 1 1 12 216.00 . 2291 1 1 1 1 12 228.00 . 2291 1 1 1 1 12 240.00 . 2291 1 1 1 1 12 252.00 . 2291 1 1 1 1 12 264.00 . 2291 1 1 1 1 12 276.00 . 2291 1 1 1 1 12 288.00 . 2291 1 1 1 1 12 300.00 . 2291 1 1 1 1 12 312.00 . 2291 1 1 1 1 12 324.00 . 2291 1 1 1 1 12 336.00 . 2291 1 1 1 1 12 336.00 9.3662191695 . 0 2 1 1 12 336.00 98.696799404 . 0 4 1 1 12 336.20 . . 1 2 1 1 12 336.20 . . 1 4 1 1 12 336.40 . . 1 2 1 1 12 336.40 . . 1 4 1 1 12 336.60 . . 1 2 1 1 12 336.60 . . 1 4 1 1 12 336.80 . . 1 2 1 1 12 336.80 . . 1 4 1 1 12 337.00 29.971901342 . 0 2 1 1 12 337.00 112.79634218 . 0 4 1 1 12 337.20 . . 1 2 1 1 12 337.20 . . 1 4 1 1 12 337.40 . . 1 2 1 1 12 337.40 . . 1 4 1 1 12 337.60 . . 1 2 1 1 12 337.60 . . 1 4 1 1 12 337.80 . . 1 2 1 1 12 337.80 . . 1 4 1 1 12 338.00 14.985950671 . 0 2 1 1 12 338.00 161.13763168 . 0 4 1 1 12 338.50 . . 1 2 1 1 12 338.50 . . 1 4 1 1 12 339.00 10.615048392 . 0 2 1 1 12 339.00 193.36515802 . 0 4 1 1 12 339.50 . . 1 2 1 1 12 339.50 . . 1 4 1 1 12 340.00 7.4929753356 . 0 2 1 1 12 340.00 181.27983564 . 0 4 1 1 12 341.00 . . 1 2 1 1 12 341.00 . . 1 4 1 1 12 342.00 4.6831095848 . 0 2 1 1 12 342.00 161.13763168 . 0 4 1 1 12 344.00 . . 1 2 1 1 12 344.00 . . 1 4 1 1 12 346.00 . . 1 2 1 1 12 346.00 . . 1 4 1 1 12 348.00 . . 1 2 1 1 12 348.00 . . 1 4 1 Rik C. Schoemaker, PhD Biostatistician - pharmacokineticist Centre for Human Drug Research (CHDR) Zernikedreef 10, 2333CL Leiden, Netherlands tel +31 (0) 71 5246417; fax +31 (0) 71 5246499 email rs@chdr.nl; http://www.chdr.nl

RE: Fortran overflow

From: Atul Bhattaram Venkatesh Date: February 12, 2004 technical
From: "Bhattaram, Atul" - BhattaramA@cder.fda.gov Subject: RE: [NMusers] Fortran overflow Date: 2/12/2004 9:23 AM Hello Schoemaker Did you try to analyze the data by first analysing the parent drug and fixing them prior to adding the metabolite data? Venkatesh Atul Bhattaram CDER, FDA.

Re: Fortran overflow

From: Leonid Gibiansky Date: February 12, 2004 technical
From: Leonid Gibiansky - lgibiansky@emmes.com Subject: Re: [NMusers] Fortran overflow Date: 2/12/2004 9:31 AM As a first try: With overflow error, there might be a division by zero. If you look on your control stream, one place is S3 = VSS-S2 K32 = Q/S3 Here S3 can be anything. You may try IF(S3.LE.0.001) EXIT K32 = Q/S3 Alternative is to use S2 = THETA(4)*EXP(ETA(4)) S3 = THETA(5)*EXP(ETA(5)) VSS = S2 +S3 Leonid

Re: Fortran overflow

From: Ekaterina Gibiansky Date: February 12, 2004 technical
From: Ekaterina Gibiansky - GibianskyE@guilfordpharm.com Subject: Re: [NMusers] Fortran overflow Date: 2/12/2004 9:34 AM Ric, in my experience, the solution to overflow problem (when everything else was exhausted including EXIT statements) was to switch to G77 fortran from Visual Fortran (Compaq, Digital, etc whatever it was called at the time). It always worked for me. Katya Ekaterina Gibiansky, PhD Head, Pharmacometrics & Principal Scientist Guilford Pharmaceuticals Inc Phone: (410)-631-6828 Fax: (410)-631-6828 E-mail: gibianskye@guilfordpharm.com

Re: Fortran overflow

From: Diane Mould Date: February 12, 2004 technical
From: Diane R Mould - drmould@attglobal.net Subject: Re: [NMusers] Fortran overflow Date: 2/12/2004 10:00 AM All Katya's findings (that moving to another compiler can sometimes correct problems) seem to be consistent with what Peter Bonate's findings when he tested Nonmem performance on different processors and compilers. If I recall correctly, Pete found that the results obtained from an analysis seem to be more likely to differ using different compilers as model stability decreases. I think that a very stable model is generally robust to different compilers. Perhaps Pete can comment on that? Diane

Re: Fortran overflow

From: Rik Schoemaker Date: February 16, 2004 technical
From: Rik Schoemaker - RS@chdr.nl Subject: Re: [NMusers] Fortran overflow Date: 2/16/2004 4:36 AM Dear Leonid, I like it when simple suggestions are the best! It certainly had to do with estimating VSS; by switching to estimating S2 and S3 the problem was solved. Thanks! Rik _______________________________________________________