UUPharmacometrics / PsN

Perl-Speaks-NONMEM
https://uupharmacometrics.github.io/PsN
GNU General Public License v2.0
65 stars 19 forks source link

Uninitialized value messages in execute and sumo #95

Closed billdenney closed 6 years ago

billdenney commented 6 years ago

When running execute (and it completes), I see the following repeated many times (~50 repetitions as the pair of lines) for a model:

Use of uninitialized value $element in string eq at /opt/PsN/4.7.0/PsN_4_7_0/output/problem/subproblem.pm line 3082.
Use of uninitialized value $element in eval "string" at /opt/PsN/4.7.0/PsN_4_7_0/output/problem/subproblem.pm line 3082.

When running sumo, I see the same error and after that, I see the below error repeated a similar (probably the same) number of times:

Use of uninitialized value in abs at /opt/PsN/4.7.0/PsN_4_7_0/output.pm line 419.

I'm not sure exactly how to troubleshoot it (and I can't readily share my .lst file), but here are some lines from the .lst file that I think may be the issue:

 ************************************************************************************************************************
 ********************                                                                                ********************
 ********************               FIRST ORDER CONDITIONAL ESTIMATION WITH INTERACTION              ********************
 ********************                            STANDARD ERROR OF ESTIMATE                          ********************
 ********************                                                                                ********************
 ************************************************************************************************************************

 THETA - VECTOR OF FIXED EFFECTS PARAMETERS   *********

         TH 1      TH 2      TH 3      TH 4      TH 5

              NaN       NaN       NaN       NaN       NaN

 OMEGA - COV MATRIX FOR RANDOM EFFECTS - ETAS  ********

         ETA1      ETA2      ETA3

 ETA1
+        1.3E+154

 ETA2
+       .........  1.3E+154

 ETA3
+       ......... .........  1.3E+154

 SIGMA - COV MATRIX FOR RANDOM EFFECTS - EPSILONS  ****

         EPS1      EPS2

 EPS1
+        1.3E+154

 EPS2
+       .........  1.3E+154

1

 OMEGA - CORR MATRIX FOR RANDOM EFFECTS - ETAS  *******

         ETA1      ETA2      ETA3

 ETA1
+             NaN

 ETA2
+       .........       NaN

 ETA3
+       ......... .........       NaN

 SIGMA - CORR MATRIX FOR RANDOM EFFECTS - EPSILONS  ***

         EPS1      EPS2

 EPS1
+             NaN

 EPS2
+       .........       NaN

1
 ************************************************************************************************************************
 ********************                                                                                ********************
 ********************               FIRST ORDER CONDITIONAL ESTIMATION WITH INTERACTION              ********************
 ********************                          COVARIANCE MATRIX OF ESTIMATE                         ********************
 ********************                                                                                ********************
 ************************************************************************************************************************

            TH 1      TH 2      TH 3      TH 4      TH 5      OM11      OM12      OM13      OM22      OM23      OM33      SG11
             SG12      SG22

 TH 1
+             NaN

 TH 2
+             NaN       NaN

 TH 3
+             NaN       NaN       NaN

 TH 4
+             NaN       NaN       NaN       NaN

 TH 5
+             NaN       NaN       NaN       NaN       NaN

 OM11
+             NaN       NaN       NaN       NaN       NaN       NaN

 OM12
+       ......... ......... ......... ......... ......... ......... .........

 OM13
+       ......... ......... ......... ......... ......... ......... ......... .........

 OM22
+             NaN       NaN       NaN       NaN       NaN       NaN ......... .........       NaN

 OM23
+       ......... ......... ......... ......... ......... ......... ......... ......... ......... .........

 OM33
+             NaN       NaN       NaN       NaN       NaN       NaN ......... .........       NaN .........       NaN

 SG11
+             NaN       NaN       NaN       NaN       NaN       NaN ......... .........       NaN .........       NaN       NaN

 SG12
+       ......... ......... ......... ......... ......... ......... ......... ......... ......... ......... ......... .........
         .........

 SG22
+             NaN       NaN       NaN       NaN       NaN       NaN ......... .........       NaN .........       NaN       NaN
         .........       NaN

1
 ************************************************************************************************************************
 ********************                                                                                ********************
 ********************               FIRST ORDER CONDITIONAL ESTIMATION WITH INTERACTION              ********************
 ********************                          CORRELATION MATRIX OF ESTIMATE                        ********************
 ********************                                                                                ********************
 ************************************************************************************************************************

            TH 1      TH 2      TH 3      TH 4      TH 5      OM11      OM12      OM13      OM22      OM23      OM33      SG11
             SG12      SG22

 TH 1
+             NaN

 TH 2
+             NaN       NaN

 TH 3
+             NaN       NaN       NaN

 TH 4
+             NaN       NaN       NaN       NaN

 TH 5
+             NaN       NaN       NaN       NaN       NaN

 OM11
+             NaN       NaN       NaN       NaN       NaN       NaN

 OM12
+       ......... ......... ......... ......... ......... ......... .........

 OM13
+       ......... ......... ......... ......... ......... ......... ......... .........

 OM22
+             NaN       NaN       NaN       NaN       NaN       NaN ......... .........       NaN

 OM23
+       ......... ......... ......... ......... ......... ......... ......... ......... ......... .........

 OM33
+             NaN       NaN       NaN       NaN       NaN       NaN ......... .........       NaN .........       NaN

 SG11
+             NaN       NaN       NaN       NaN       NaN       NaN ......... .........       NaN .........       NaN       NaN

 SG12
+       ......... ......... ......... ......... ......... ......... ......... ......... ......... ......... ......... .........
         .........

 SG22
+             NaN       NaN       NaN       NaN       NaN       NaN ......... .........       NaN .........       NaN       NaN
         .........       NaN

1
 ************************************************************************************************************************
 ********************                                                                                ********************
 ********************               FIRST ORDER CONDITIONAL ESTIMATION WITH INTERACTION              ********************
 ********************                      INVERSE COVARIANCE MATRIX OF ESTIMATE                     ********************
 ********************                                                                                ********************
 ************************************************************************************************************************

(To help me trace back for questions: it's from //2017-006*/Code/NONMEM/PK/run14.lst)

rikardn commented 6 years ago

Thanks for reporting this. It is a bug in the output parser. It could not handle NaN in the lst-file. My fix is to handle this as NA. It isn't entirely correct, but there is a lot more of the machinery that had to be rewritten if we would separate between an NA estimate and an NaN estimate. I don't see a great benefit of doing so currently.

My fix: 59728c34b770537a6e87f0e01e2941ba55d19296

billdenney commented 6 years ago

Thanks!