From: "Olofsen, E. (ANST)" E.Olofsen@lumc.nl
Subject: [NMusers] g77 optimization fails with current versions 
Date: 12/11/2003 9:28 AM

Dear NONMEM users,

NONMEM + ADVAN3 compiled using g77 versions 3.2.2 and 3.2.3 with -O3
(and possibly with -O2 and other versions) may produce error messages
such as

PK PARAMETER FOR K12 IS NON-POSITIVE

or

PRED RETURNS DIFFERENT OUTPUTS WITH THE SAME INPUTS

When I compiled PREDI with -O3 -fno-gcse, these error messages
disappeared. This is probably related to a bug in these, rather
current, versions of gcc, and other NONMEM subroutines may be compiled
incorrectly as well.

I'm currently checking the gcc bug archives and testing the latest
version, 3.3.2, but it seems the bug hasn't been solved yet.

Erik Olofsen
Leiden University Medical Center

_______________________________________________________

From: "Bachman, William (MYD)" bachmanw@iconus.com
Subject: [NMusers] reporting "errors" or "bugs" to nmusers
Date: 12/12/2003 7:57 AM

In my opinion, unless you can provide the control streams and data to
reproduce the issues and give the details of your installation and error
messages, it is not useful to report alleged "bugs" or "errors".
Particularly if you have used non-standard installations or procedures.  We
cannot assess the value of these statements.  

nmconsult@globomaxnm.com
GloboMax®
The Strategic Pharmaceutical Development Division of ICON plc
7250 Parkway Drive, Suite 430
Hanover, MD 21076 
Voice: (410) 782-2205
FAX: (410) 712-0737
_______________________________________________________

From: "Olofsen, E. (ANST)" E.Olofsen@lumc.nl
Subject: [NMusers] g77 optimization fails with current versions
Date: 12/12/2003 8:14 AM

Dear NONMEM users,

Yesterday I reported about the g77 optimization bug.
I've now recompiled version 3.2.3 and compiled the latest version,
3.3.2, and did some more runs with ADVAN3 and two different data sets.

With 3.2.3 and -O3, it is possible to get a variety of error messages,
or possibly no error message at all, so I don't think the results with
-O3 (and possibly -O2) can be trusted. I've tested this under two
different Linux distributions and kernels.

With 3.2.3 and -O3 -fno-gcse, runs may or may not be different from
runs without optimization, but this may just be because with optimized
code rounding errors accumulate differently.

Runs with the latest version, 3.3.2, were consistent, so it appears
the bug has been removed. Interestingly, runs were also more
consistent than those of using version 2.95.3 with the model/data
combination with low stability.

Erik Olofsen
Leiden University Medical Center
_______________________________________________________

From: Erik Olofsen [mailto:e.olofsen@xs4all.nl]
Subject: RE: reporting "errors" or "bugs" to nmusers
Date: Friday, December 12, 2003 1:28 PM

Bill,

I installed NONMEM from the floppies using SETUP on another computer
and this gives the same problem.


>> 1. the control stream and data file that reproduces the issue.

Proprietary

>> information should be masked (e.g product names, physioligical marker
>> identification, etc.), data may be a subset of the whole sufficient to
>> reproduce the issue.


Files are attached (the same as yesterday + the report file).
 

>> 2. complete details of system:
>> - operating system and version, e.g. Windows 2000 or Red Hat Linux 9


Gentoo Linux version 1.4, with kernel 2.4.21


>> - compiler and version, e.g. Compaq Visual Fortran 6.6 or GNU g77 3.2


GNU Fortran (GCC 3.2.2) 3.2.2 20030205 (release)


>> - NONMEM version and level, e.g. NONMEM V Level 1.1


NONMEM V Level 1.1


>> - method used to install NONMEM, e.g setup.bat or SETUP C-shell script
>> supplied with NONMEM distribution, user-defined custom installation (Note:
>> We cannot trouble-shoot custom installs.)


The SETUP C-shell script with compiler option -O3

So now I've tested different computers, different Linux distributions
(Slackware too), my NONMEM source directory and the original files
(NSIZES etc.) and my and the original installation procedures. The
problem appears to lie with compilers 3.2.2 and 3.2.3. I might try to
find the time to look at MinGW.

Erik

_______________________________________________________


From: Erik Olofsen [mailto:e.olofsen@xs4all.nl]
Subject: [NMusers] RE: reporting "errors" or "bugs" to nmusers -> -O3 optimization r esults corroborated
Date: 12/15/2003 9:50 AM

Bill,


>> My results with gcc 3.2.2 on Red Hat Linux 9 are as follows:
>>
>> -O and '-O3 -fno-gcse':
>>  MINIMIZATION TERMINATED
>>  DUE TO PROXIMITY OF LAST ITERATION EST. TO A VALUE
>>  AT WHICH THE OBJ. FUNC. IS INFINITE (ERROR=136)
>>
>> obj. fcn for -O: 785.8
>> obj. fcn for '-O3 -fno-gcse': 498.5


It could be that the latter result is also correctly computed,
but that with this unstable model/data combination, rounding
errors accumulate in a different way in the (correctly) optimized
code causing NONMEM to abort at quite another point.


>> -O3: PK PARAMETER FOR K12 IS NON-POSITIVE
>>
>> These results corroborate your results.  Additionally, results with runs of
>> CONTROL5 and THEOPP (distributed with NONMEM) indicate there indeed is a
>> problem with -O3 optimization in general:
>>
>> -O and '-O3 -fno-gcse': minimization successful
>> -O3: PK PARAMETERS FOR KA AND K ARE EQUAL


And (see above) I guess with -O and '-O3 -fno-gcse' the obj. func.
values are equal.


>> My recommendation for g77 would be to use -O optimization for versions 3.2.2
>> and 3.2.3 and test optimization options for future versions.
>> Have you been able to get any additional information on the source of the
>> problem?


I haven't found a description of exactly this problem on the gnu bug
lists, but some other reports of problems with optimization. Indeed it
is best to be careful with strong optimization with any compiler.

Erik

_______________________________________________________

From: "Bachman, William (MYD)" bachmanw@iconus.com
Subject: RE: reporting "errors" or "bugs" to nmusers -> -O3 optimization r esults corroborated
Date: 12/16/2003 9:56 AM

Erik,

My results with gcc 3.2.2 on Red Hat Linux 9 are as follows:

-O and '-O3 -fno-gcse': 
 MINIMIZATION TERMINATED
 DUE TO PROXIMITY OF LAST ITERATION EST. TO A VALUE
 AT WHICH THE OBJ. FUNC. IS INFINITE (ERROR=136)

obj. fcn for -O: 785.8
obj. fcn for '-O3 -fno-gcse': 498.5

-O3: PK PARAMETER FOR K12 IS NON-POSITIVE

These results corroborate your results.  Additionally, results with runs of
CONTROL5 and THEOPP (distributed with NONMEM) indicate there indeed is a
problem with -O3 optimization in general:

-O and '-O3 -fno-gcse': minimization successful
-O3: PK PARAMETERS FOR KA AND K ARE EQUAL

Thank you for providing the additional information to evaluate the issue.
My recommendation for g77 would be to use -O optimization for versions 3.2.2
and 3.2.3 and test optimization options for future versions.

Have you been able to get any additional information on the source of the
problem?

Bill

nmconsult@globomaxnm.com
GloboMax®
The Strategic Pharmaceutical Development Division of ICON plc
7250 Parkway Drive, Suite 430
Hanover, MD 21076 
Voice: (410) 782-2205
FAX: (410) 712-0737

_______________________________________________________