202 Fortran Syntax of wings for NM7

3 messages 2 people Latest: Dec 13, 2011

202 Fortran Syntax of wings for NM7

From: Hong Li Date: December 12, 2011 technical
Dear All, I have exact same NONMEM code run in two command windows, NM7 and wings for NM7. The NONMEM run is successful in the NM7 but cannot start in wings for NM7. Below is the error message. AN ERROR WAS FOUND IN THE CONTROL STATEMENTS. AN ERROR WAS FOUND ON LINE 25 AT THE APPROXIMATE POSITION NOTED: MU_1 =THETA(12) LOG(THETA(1)) X THE CHARACTERS IN ERROR ARE: LOG 202 FORTRAN SYNTAX IS INCORRECT OR INAPPROPRIATE IN THIS CONTEXT. Error in NM-TRAN_Execution with ...... After several tests, I realized that it may be due to the setting of wings for NM7, such as parameter size. In my model, I have 12 THETAS, 10 ETAS and 3 SIGMA. If I delete THETA(12) , everything is working. We have NONMEM 7.1.0 and Wings for Nonmem version 703 installed with their default setting. Can anyone help me to handle this problem? Is this due to the size of parameter? How to increase the parameter size of wings for NM7. Here is my NONMEM code: $PROB $DATA $INPUT $SUBROUTINE ADVAN6 TOL=9 $MODEL NCOMP=5 COMP=(GI,DEFDOSE) ;COMPARTMENT 1 DEPOSIT IN GI TRACT COMP=(CENTER) ;COMPARTMENT 2 FOR CENTER COMPARTMENT COMP=(PERI) ;COMPARTMENT 3 FOR PERIPHERAL COMPARTMENT COMP=(MET) ;COMPARTMENT 4 FOR METABOLITE CENTER COMPARTMENT COMP=(FREE) ;COMPARTMENT 5 FOR FREE UNBOUND COMPARTMENT $PK IF (CNIT.EQ.1.OR.CNIT.EQ.3.OR.CNIT.EQ.-1) CSP=1 IF (CNIT.EQ.2.OR.CNIT.EQ.4) CSP=0 IF (ALB.NE.-1) NALB=ALB/3.4 IF (ALB.EQ.-1) NALB=1 MU_1 = LOG(THETA(1)) ALAG1 = EXP(MU_1+ETA(1)) MU_2 = LOG(THETA(2)) K12 = EXP(MU_2+ETA(2)) MU_3 = LOG(THETA(3))+0.75*LOG(BW/70) Q = EXP(MU_3+ETA(3)) MU_4 = LOG(THETA(4))-0.25*LOG(BW/70)+THETA(12)*LOG(NALB) K24 = EXP(MU_4+ETA(4)) MU_5 = LOG(THETA(5))-0.25*LOG(BW/70) K40 = EXP(MU_5+ETA(5)) MU_6 = LOG(THETA(6))+CSP*LOG(THETA(11)) K41 = (EXP(MU_6+ETA(6))) MU_7 = LOG(THETA(7)) + LOG(BW/70) V2 = EXP(MU_7+ETA(7)) MU_8 = LOG(THETA(8)) + LOG(BW/70) V3 = EXP(MU_8+ETA(8)) MU_9 = LOG(THETA(9)) + LOG(BW/70) V4 = EXP(MU_9+ETA(9)) MU_10 = LOG(THETA(10)) FR = EXP(MU_10+ETA(10)) K23 = Q/V2 K32 = Q/V3 S2 = V2 S4 = V4 S5 = V2 $DES DADT(1) = -K12*A(1)+K41*A(4) DADT(2) = K12*A(1)+K32*A(3)-(K23+K24)*A(2) DADT(3) = K23*A(2)-K32*A(3) DADT(4) = K24*A(2)-(K41+K40)*A(4) DADT(5) = FR*(K12*A(1)+K32*A(3)-(K23+K24)*A(2)) $ERROR (ONLY OBSERVATIONS) $EST METHOD=ITS NITER=50 PRINT=5 NSIG=3 SIGL=9 $EST METHOD=IMP NITER=500 ISAMPLE=1000 PRINT=1 NOABORT CTYPE=3 CITER=10 CALPHA=0.05 $THETA $OMEGA $SIGMA Thanks for your help, -- Hong Li, Ph.D. Postdoctoral Associate Department of Pharmaceutical Science University at Buffalo, SUNY 363 Hochstetter Hall Buffalo, NY 14260 Tel#: (716)645-4827

Re: 202 Fortran Syntax of wings for NM7

From: Hong Li Date: December 13, 2011 technical
Dear Nick, Thanks so much for directing me to pay attention to the comments of $THETA block. The FORTRAN SYNTAX is caused by the way I apply comments to $THETA but I get the problem solved using the other way. The original $THETA as below: $THETA (0.228 FIXED) ;POP_TLAG (0.01,0.927,10) ;POP_K12 (5,14,100) ;POP_Q (0,0.972,50) ;POP_K24 (0,0.14,50) ;POP_K40 (0,0.01,1) ;POP_K41 (3,30.3,200) ;POP_V2 (243 FIXED) ;POP_V3 (3,9.82,200) ;POP_V4 (0,0.0167,0.1) ;POP_FR (0,0.3) ;CNI (-0.6) ; ALB The new $THETA block is: $THETA (0.228 FIXED) ;POP_TLAG (0.01,0.927,10) ;POP_K12 (5,14,100) ;POP_Q (0,0.972,50) ;POP_K24 (0,0.14,50) ;POP_K40 (0,0.01,1) ;POP_K41 (3,30.3,200) ;POP_V2 (243 FIXED) ;POP_V3 (3,9.82,200) ;POP_V4 (0,0.0167,0.1) ;POP_FR (0,0.3) ;CNI (-0.6) ;POP_ALB The only thing I did is to change comment of THETA12 from ALB to POP_ALB. My understanding now is that WFN get confused the comment of THETA12 (ALB) with MU_1 (which is assigned to ALAG1) because both of them start with "A". Thanks again, -- Hong Li, Ph.D. Postdoctoral Associate Department of Pharmaceutical Science University at Buffalo, SUNY 363 Hochstetter Hall Buffalo, NY 14260 Tel#: (716)645-4827
Quoted reply history
On Mon, Dec 12, 2011 at 6:08 PM, Nick Holford <[email protected]> wrote: > Hong, > > The error message you show below may be caused by the way you apply > comments to the $THETA, $OMEGA and $SIGMA records. Unfortunately you do not > show exactly how you coded these records. WFN uses the comment field to try > to identify name for parameters in the abbreviated code. If you repeat a > comment with the same 'name' then WFN will get confused when translating to > standard NM-TRAN. > e.g. > $THETA 1 ; LOG OF CL > $THETA 2 ; LOG of V > will cause a problem because the name LOG will applied to THETA(1) and > THETA(2). > If the comment is changed to > $THETA 1 ; CL LOG > $THETA 2 ; V LOG > then there is no problem because the name is taken from the first word in > the comment. > > Please read http://wfn.sourceforge.net/wfncs.htm#control_streams > > > There is something else you should be aware of but I don't think it is the > cause of the error you show. WFN for NONMEM 7.2 tries to help users save > time by avoiding the recompilation of NONMEM for every new problem. By > default WFN starts NONMEM with the -prdefault option. This works for most > problems but if you exceed the standard limits for parameter numbers etc > then it will fail. > > The solution is simple. You can disable the use of -prdefault by typing: > > set args7= > > before you use nmgo. > > Args7 is an environment variable used by WFN to pass the extra arguments > which may be used by NONMEM. By default args7 is set to -prdefault. If you > set args7 to a null value as shown above then NONMEM will work in the usual > way and recompile NONMEM as required for your particular problem. This will > of course mean it will take longer to run. > > Nick > > > On 13/12/2011 8:37 a.m., Hong Li wrote: > > Dear All, > > I have exact same NONMEM code run in two command windows, NM7 and > wings for NM7. The NONMEM run is successful in the NM7 but cannot > start in wings for NM7. Below is the error message. > > AN ERROR WAS FOUND IN THE CONTROL STATEMENTS. > > AN ERROR WAS FOUND ON LINE 25 AT THE APPROXIMATE POSITION NOTED: > MU_1 =THETA(12) LOG(THETA(1)) > X > THE CHARACTERS IN ERROR ARE: LOG > 202 FORTRAN SYNTAX IS INCORRECT OR INAPPROPRIATE IN THIS CONTEXT. > Error in NM-TRAN_Execution with ...... > > > After several tests, I realized that it may be due to the setting of > wings for NM7, such as parameter size. > In my model, I have 12 THETAS, 10 ETAS and 3 SIGMA. If I delete > THETA(12) , everything is working. > We have NONMEM 7.1.0 and Wings for Nonmem version 703 installed > with their default setting. > > Can anyone help me to handle this problem? Is this due to the size of > parameter? How to increase the parameter size of wings for NM7. > Here is my NONMEM code: > > $PROB > $DATA > $INPUT > $SUBROUTINE ADVAN6 TOL=9 > > $MODEL NCOMP=5 > > COMP=(GI,DEFDOSE) ;COMPARTMENT 1 DEPOSIT IN GI TRACT > COMP=(CENTER) ;COMPARTMENT 2 FOR CENTER COMPARTMENT > COMP=(PERI) ;COMPARTMENT 3 FOR PERIPHERAL COMPARTMENT > COMP=(MET) ;COMPARTMENT 4 FOR METABOLITE CENTER COMPARTMENT > COMP=(FREE) ;COMPARTMENT 5 FOR FREE UNBOUND COMPARTMENT > > $PK > > IF (CNIT.EQ.1.OR.CNIT.EQ.3.OR.CNIT.EQ.-1) CSP=1 > IF (CNIT.EQ.2.OR.CNIT.EQ.4) CSP=0 > IF (ALB.NE.-1) NALB=ALB/3.4 > IF (ALB.EQ.-1) NALB=1 > > MU_1 = LOG(THETA(1)) > ALAG1 = EXP(MU_1+ETA(1)) > > MU_2 = LOG(THETA(2)) > K12 = EXP(MU_2+ETA(2)) > > MU_3 = LOG(THETA(3))+0.75*LOG(BW/70) > Q = EXP(MU_3+ETA(3)) > > MU_4 = LOG(THETA(4))-0.25*LOG(BW/70)+THETA(12)*LOG(NALB) > K24 = EXP(MU_4+ETA(4)) > > MU_5 = LOG(THETA(5))-0.25*LOG(BW/70) > K40 = EXP(MU_5+ETA(5)) > > MU_6 = LOG(THETA(6))+CSP*LOG(THETA(11)) > K41 = (EXP(MU_6+ETA(6))) > > MU_7 = LOG(THETA(7)) + LOG(BW/70) > V2 = EXP(MU_7+ETA(7)) > > MU_8 = LOG(THETA(8)) + LOG(BW/70) > V3 = EXP(MU_8+ETA(8)) > > MU_9 = LOG(THETA(9)) + LOG(BW/70) > V4 = EXP(MU_9+ETA(9)) > > MU_10 = LOG(THETA(10)) > FR = EXP(MU_10+ETA(10)) > > K23 = Q/V2 > K32 = Q/V3 > > S2 = V2 > S4 = V4 > S5 = V2 > > $DES > > DADT(1) = -K12*A(1)+K41*A(4) > > DADT(2) = K12*A(1)+K32*A(3)-(K23+K24)*A(2) > > DADT(3) = K23*A(2)-K32*A(3) > > DADT(4) = K24*A(2)-(K41+K40)*A(4) > > DADT(5) = FR*(K12*A(1)+K32*A(3)-(K23+K24)*A(2)) > > $ERROR (ONLY OBSERVATIONS) > > $EST METHOD=ITS NITER=50 PRINT=5 NSIG=3 SIGL=9 > $EST METHOD=IMP NITER=500 ISAMPLE=1000 PRINT=1 NOABORT CTYPE=3 > CITER=10 CALPHA=0.05 > > $THETA > $OMEGA > $SIGMA > > > > Thanks for your help, > > > -- > Nick Holford, Professor Clinical Pharmacology > Dept Pharmacology & Clinical Pharmacology, Bldg 505 Room 202D > University of Auckland,85 Park Rd,Private Bag 92019,Auckland,New Zealand > tel:+64(9)923-6730 fax:+64(9)373-7090 mobile:+64(21)46 23 53 > email: [email protected] > http://www.fmhs.auckland.ac.nz/sms/pharmacology/holford

Re: 202 Fortran Syntax of wings for NM7

From: Nick Holford Date: December 13, 2011 technical
Hong, Your explanation does not make sense to me. WFN should not confuse ALB with ALAG1. Please send me the full control stream that causes the problem so I can find out what is happening. If there is a bug in WFN I'd like to be able to find it and fix it. Thanks, Nick
Quoted reply history
On 13/12/2011 4:19 p.m., Hong Li wrote: > Dear Nick, > > Thanks so much for directing me to pay attention to the comments of > $THETA block. > The FORTRAN SYNTAX is caused by the way I apply comments to $THETA > but I get the problem solved using the other way. > > The original $THETA as below: > > $THETA > (0.228 FIXED) ;POP_TLAG > (0.01,0.927,10) ;POP_K12 > (5,14,100) ;POP_Q > (0,0.972,50) ;POP_K24 > (0,0.14,50) ;POP_K40 > (0,0.01,1) ;POP_K41 > (3,30.3,200) ;POP_V2 > (243 FIXED) ;POP_V3 > (3,9.82,200) ;POP_V4 > (0,0.0167,0.1) ;POP_FR > (0,0.3) ;CNI > (-0.6) ; ALB > > The new $THETA block is: > > $THETA > (0.228 FIXED) ;POP_TLAG > (0.01,0.927,10) ;POP_K12 > (5,14,100) ;POP_Q > (0,0.972,50) ;POP_K24 > (0,0.14,50) ;POP_K40 > (0,0.01,1) ;POP_K41 > (3,30.3,200) ;POP_V2 > (243 FIXED) ;POP_V3 > (3,9.82,200) ;POP_V4 > (0,0.0167,0.1) ;POP_FR > (0,0.3) ;CNI > (-0.6) ;POP_ALB > > The only thing I did is to change comment of THETA12 from ALB to POP_ALB. > > My understanding now is that WFN get confused the comment of > THETA12 (ALB) with MU_1 (which is assigned to ALAG1) because both > of them start with "A". > > Thanks again, -- Nick Holford, Professor Clinical Pharmacology Dept Pharmacology& Clinical Pharmacology, Bldg 505 Room 202D University of Auckland,85 Park Rd,Private Bag 92019,Auckland,New Zealand tel:+64(9)923-6730 fax:+64(9)373-7090 mobile:+64(21)46 23 53 email: [email protected] http://www.fmhs.auckland.ac.nz/sms/pharmacology/holford