Re: Segmentation fault
Dear Maria,
This could be the result of faulty or unprotected code in your control stream,
or a compiler issue.
A segmentation fault is a crash that happens when a program (NONMEM in this
case) tries to access memory that cannot be accessed. This can happen when a
code error or non-optimal compiler setting (or flaw in the compiler itself)
leads to a faulty executable file being built. Your model is quite numerically
complex, and it's possible that it's exposed issues with the compiler that had
not been obvious before. It could also be masking a numerical problem with your
code.
You could try the following:
Since IPRED=LOG(F), I would add some code to make sure F can never be 0.
Check your data and code to make sure you don't have any other illegal
numerical actions taking place (e.g. divide by zero) - such an issue might be
masked by this kind of crash, if not handled properly by the compiler - one
simple way to do this is to implement the model in something like Berkeley
Madonna and see if it does what you expect. Does it behave the same way with
different initial estimates?
Try a different compiler, ideally on a different system, and see if the same
thing happens. If it does, it's likely to be a numerical issue, and I would try
a different ADVAN, and adjust TOL settings
If it works on another system, try less aggressive optimization settings for
the compiler (you can check these in the first few lines of the nmfe* execution
script) - this will require that NONMEM be recompiled, however
Best
Justin
Quoted reply history
On Nov 24, 2011, at 5:01 PM, Maria Matoses Osborne wrote:
> Dear Nonmem users,
>
> I just run a couple of times into the same problem, and still find myself
> incapable of solving it, hopefully you might come with some new ideas for
> this unusual problem (at least for the Navarra group).
>
> With NONMEM, I'm running a model of 12 compartments, the procedure used was
> adding one compartment at the time and fixing the thetas previously obtained
> before adding a new compartment. It went well until I reached the compartment
> 12, when a message came out of NONMEM saying:
>
> line 65: 8666 Segmentation fault ./nonmem $1 $3 -licfile=$lfile
>
> Do you have any idea of why that happens?
>
> Thanks in advance,
>
> María Matoses Osborne
>
> The NONMEM script is as follows:
>
>
> $PROBLEM RATS PK - IV ADM
> $INPUT ID TIME AMT CMT CMTT DVV DV WEIG ORWE RUTE DRUG EVID
> $DATA rat2.dta IGNORE= #
> $SUBROUTINES ADVAN9 TOL=5
> $MODEL COMP (DPL)
> COMP (MPL)
> COMP (DBR)
> COMP (MBR)
> COMP (DBM)
> COMP (MBM)
> COMP (DSP)
> COMP (MSP)
> COMP (DLN)
> COMP (DTRA)
> COMP (MLN)
> COMP (MTRA)
>
> $PK
>
> ;-------- DRUG AND MET IN PLASMA --------------
>
> V1=THETA(1)*EXP(ETA(1))
> V2=THETA(2)
> CLR=THETA(3)
> CLM12=THETA(4)
> CLM20=THETA(5)
>
> ;----------- DRUG IN BRAIN ------------
>
> V3=THETA(6)/1000
> CL13=THETA(7)
> CL30=THETA(8)
>
> ;----------- MET IN BRAIN --------------
>
> V4=THETA(9)
> CL24=THETA(10)
> CL40=THETA(11)
>
> ;----------- DRUG IN BONE MARROW -----
>
> V5=THETA(12)
> CL15=THETA(13)
> CL50=THETA(14)
>
> ;----------- MET IN BONE MARROW -------
>
> V6=THETA(15)/1000
> CL26=THETA(16)
> CL60=THETA(17)
>
> ;------------ DRUG IN SPLEEN -------
>
> V7=THETA(18)/1000
> CL17=THETA(19)
> CL70=THETA(20)
>
> ;----------- MET IN SPLEEN -------------
>
> V8=THETA(21)/1000
> CL28=THETA(22)
> CL80=THETA(23)/1000
>
> ;---------- DRUG IN LYMPN NODE ----------
>
> V9=THETA(24)/100000
> CL19=THETA(25)
> CL90=THETA(26)
>
> ;----------- MET IN LYMPH NODE ----------
>
> V11=THETA(27)
> CL211=THETA(28)
> CL110=THETA(29)
>
>
> S1=V1/1000
> S2=V2/1000
> S3=V3/1000
> S4=V4/1000
> S5=V5/1000
> S6=V6/1000
> S7=V7/1000
> S8=V8/1000
> S9=V9/1000
> S11=V11/1000
>
> $DES
>
> DADT(1)=-((CLR*CLM12)/V1)*A(1)
> DADT(2)=(CLM12/V1)*A(1)-(CLM20/V2)*A(2)
> DADT(3)=(CL13/V1)*A(1)-(CL30/V3)*A(3)
> DADT(4)=(CL24/V2)*A(2)-(CL40/V4)*A(4)
> DADT(5)=(CL15/V1)*A(1)-(CL50/V5)*A(5)
> DADT(6)=(CL26/V2)*A(2)-(CL60/V6)*A(6)
> DADT(7)=(CL17/V1)*A(1)-(CL70/V7)*A(7)
> DADT(8)=(CL28/V2)*A(2)-(CL80/V8)*A(8)
> DADT(9)=(CL19/V1)*A(10)-(CL90/V9)*A(9)
> DADT(10)=(CL19/V1)*A(1)-(CL19/V1)*A(10)
> DADT(11)=(CL211/V2)*A(12)-(CL110/V11)*A(11)
> DADT(12)=(CL211/V2)*A(2)-(CL211/V2)*A(12)
>
>
> $ERROR(OBSERVATION ONLY)
>
> IPRED=LOG(F)
>
> Y=IPRED+EPS(1)
> IF (CMT.EQ.2) Y=IPRED+EPS(2)
> IF (CMT.EQ.3) Y=IPRED+EPS(3)
> IF (CMT.EQ.4) Y=IPRED+EPS(4)
> IF (CMT.EQ.5) Y=IPRED+EPS(5)
> IF (CMT.EQ.6) Y=IPRED+EPS(6)
> IF (CMT.EQ.7) Y=IPRED+EPS(7)
> IF (CMT.EQ.8) Y=IPRED+EPS(8)
> IF (CMT.EQ.9) Y=IPRED+EPS(9)
> IF (CMT.EQ.11) Y=IPRED+EPS(10)
>
>
> $ESTIMATION MAXEVAL=9999 PRINT=5 METHOD=1 INTERACTION NOABORT
> $COV
>
> $THETA 2.9 FIX ; V1
> $THETA 5.8 FIX ; V2
> $THETA 1.22 FIX ; CLR
> $THETA 0.3 FIX ; CLM12
> $THETA 0.526 FIX ; CLM20
>
> $THETA 0.8 FIX ; V3
> $THETA 1.65 FIX ; CL13
> $THETA 0.2 FIX ; CL30
>
> $THETA 0.0129 FIX ; V4
> $THETA 0.82 FIX ; CL24
> $THETA 0.0289 FIX ; CL40
>
> $THETA 0.244 FIX ; V5
> $THETA 1.13 FIX ; CL15
> $THETA 1.55 FIX ; CL50
>
> $THETA 0.925 FIX ; V6
> $THETA 1.9 FIX ; CL26
> $THETA 3.67 FIX ; CL60
>
> $THETA 6.67 FIX ; V7
> $THETA 0.5 FIX ; CL17
> $THETA 0.0112 FIX ; CL70
>
> $THETA 1.23 FIX ; V8
> $THETA 0.09 FIX ; CL28
> $THETA 1.74 FIX ; CL80
>
> $THETA 0.959 FIX ; V9
> $THETA 5.77 FIX ; CL19
> $THETA 0.0544 FIX ; CL90
>
> $THETA (0,1) ; V11
> $THETA (0,1) ; CL211
> $THETA (0,1) ; CL110
>
>
>
> $OMEGA 0 FIX
> $SIGMA 0.1
> $SIGMA 0.187
> $SIGMA 0.15
> $SIGMA 0.37
> $SIGMA 0.22
> $SIGMA 0.64
> $SIGMA 0.212
> $SIGMA 0.2
> $SIGMA 0.167
> $SIGMA 0.1
>
>
> $TABLE ID TIME CMTT CMT EVID ONEHEADER NOPRINT FILE=sdtab46
>
> And the dataset head is:
>
> #ID TIME AMT CMTT CMT DVV DV WEIG ORWE RUTE
> DRUG EVID
> 1 0 0.165 1 1 0 0 220 . 1
> 1 4
> 1 0.16 . 1 1 82.13 4.41 220 . 1
> 1 0
> 1 0.16 . 2 2 0.864 -0.15 220 . 1
> 2 0
> 1 0.16 . 3 3 635.8 6.45 220 2.1 1
> 1 0
> 1 0.16 . 4 3 4.761 1.56 220 2.1 1
> 2 0
> 1 0.16 . 5 3 21.04 3.05 220 . 1
> 1 0
> 1 0.16 . 6 3 0.864 -0.15 220 . 1
> 2 0
> 1 0.16 . 7 3 708.13 6.56 220 1.03 1
> 1 0
> 1 0.16 . 8 3 2.35 0.85 220 1.03 1
> 2 0
> 1 0.16 . 9 3 1942.59 7.57 220 0.21 1
> 1 0
> 1 0.16 . 11 3 1.728 0.55 220 0.21 1
> 2 0
> 2 0 0.159 1 1 0 0 212 . 1
> 1 4
> 2 0.16 . 1 1 57.62 4.05 212 . 1
> 1 0
> 2 0.16 . 2 2 0.864 -0.15 212 . 1
> 2 0
> 2 0.16 . 3 3 414.11 6.03 212 2 1
> 1 0
> 2 0.16 . 4 3 4.761 1.56 212 2 1
> 2 0
> 2 0.16 . 5 3 15.56 2.74 212 . 1
> 1 0
> 2 0.16 . 6 3 0.864 -0.15 212 . 1
> 2 0
> 2 0.16 . 7 3 481.66 6.18 212 1.1 1
> 1 0
> 2 0.16 . 8 3 4.95 1.6 212 1.1 1
> 2 0
> 2 0.16 . 9 3 2890.95 7.97 212 0.22 1
> 1 0
> 2 0.16 . 11 3 1.728 0.55 212 0.22 1
> 2 0
>
>
--
Justin Wilkins, PhD
Exprimo NV
Tel: +41 (0) 81 599 23 82
Mobile: +41 (0) 76 561 09 49
E-mail: [email protected]
Web: www.exprimo.com
This e-mail is confidential. It is also privileged or otherwise protected by
work product immunity or other legal rules. The information is intended to be
for use of the individual or entity named above. If you are not the intended
recipient, please be aware that any disclosure, copying, distribution or use of
the contents of this information is prohibited. You should therefore delete
this message from your computer system. If you have received the message in
error, please notify us by reply e-mail. The integrity and security of this
message cannot be guaranteed on the Internet.
Thank you for your co-operation.