PRODUCTS: NONMEM® USER TIPS

These tips are brought to you as information of interest from experiences in using NONMEM. All tips can also be found in the tips folder on the NONMEM Repository@GloboMax.

Tip # 15 - NONMEM V using Open Watcom 1.0 Fortran for Windows:

A free FORTRAN compiler for the Microsoft Windows environment is available from Open Watcom. Open Watcom is a joint effort between SciTech Software Inc, SybaseŽ, and the Open Source development community to maintain and enhance the Sybase Watcom C/C++ and Fortran compiler products. http://www.openwatcom.org/


A new setup file, setup4.bat, for installing NONMEM V with Open Watcom 1.0 for Windows has been created. An additional file, NMow1.bat, which is a template for the nmfe5.bat file for Open Watcom 1.0, is also required. Both files can be downloaded from the GloboMax ftp site at:
ftp://ftp.globomaxnm.com/Public/nonmem/watcom/

Setup4.bat can implemented in either of two ways:
1. Copy setup4.bat and NMow1.bat to COPIES of your NONMEM distribution diskettes 1 and 3. Then run setup4.bat with arguments from the command line at the appropriate floppy drive directory, e.g. from a:
a:> setup4 a c nmv wfl386 y lib

OR:

2. Create a new directory on your hard-drive e.g., c:\nmow1. Copy setup4.bat, NMow1.bat and all the files within the main installation directory of an existing NONMEM directory, e.g. from c:\nmv, to the new directory. (DO NOT copy the subdirectories from c:\nmv) Then run setup4.bat with arguments from the command line at the appropriate new directory, e.g. from c:\nmow1. e.g.:
c:\nmow1> setup4 a c nmow1 wfl386 y lib setup4.bat is used in the same manner as the original "setup.bat" file. Arguments must be specified from the DOS command prompt, e.g.:
setup4 a c nmv wfl386 y lib

where
a is the diskette drive
c is the hard drive
nmv is the install directory
wfl386 is the compiler command (for Open Watcom Fortran)
y is yes for optimization
lib is the name of the link program (or, in this case, the library program)

(setup4.bat can also be used with Intel 7.0, Compaq/Digital, GNU G77, or MS Powerstation 4.0, by substituting ifl, df, g77 or fl32 for wfl386 in the above command line).

The critical changes to the file related to:
a. compiler optimizations:
/ox - basically all optimizations (see Open Watcom documentation)
/6 - CPU target optimized for Pentium Pro
/fp6 - floating point options optimized for Pentium Pro

b. *SIZES files copied to *SIZES.for
The NONMEM files that must be modified during setup are:
1. BLKDAT.FOR: change "con" to "nul"
Note: Iterations will not be output to the console.
2. FLU.FOR:
comment out "CALL COMMITQQ(I)"
Note: Flushing the buffer was not required for Open Watcom 1.0 on Windows 2000 Professional.
If required with other OS's, substitute the following for "CALL COMMITQQ(I)":

INCLUDE 'FSUBLIB.FI'
INTEGER ISTAT
ISTAT=FLUSHUNIT(I)

Evaluation of Open Watcom with NONMEM V level 1.1 gave comparable results to the Intel 7.0, Compaq/Digital and g77 Fortran compilers for CONTROL3, CONTROL4, CONTROL5, CONTROL6, CONTROL7 and a library of control streams consisting of all the standard ADVAN's and TRANS's (models and parameterizations) available in NONMEM V. Test operating system was Windows 2000 Professional.

References:
1. NONMEM Users Guide Part III, pp.14,18,24,32,35,39,49,53,59,66,75,79,131.
2. Personal communication from Nick Holford: 3-18-2003 and information obtained by searching for "watcom" available from the NONMEM archive:
(http://www.cognigencorp.com/nonmem/sitesearch/index.html)