Appendix 5 - MS-DOS Installation Utility CDSETUP6.BAT
Appendix 5 is an expanded description of the Windows instructions in the file readme_6.1.0.txt and readme_6.1.0.doc on the NONMEM CD. Please review the readme file; it may contain important information that was developed too late for inclusion in this guide.
Note that the readme file suggests options suitable for several different compilers, as in the following examples.
CDSETUP6 can be used in an MS-DOS window running under Microsoft Windows (3.x or 95 or NT or XP or Vista), using Microsoft PowerStation Fortran 1.0 or 4.0. It can be used with DIGITAL Visual Fortran. It can also be used in MS-DOS 6.22 running alone (no window system), using Microsoft PowerStation Fortran 1.0. It may work with other platforms.
NONMEM VI installation involves no changes to system files or directories.
The automatic installation utility CDSETUP6.BAT is an MS-DOS batch file. It is recorded on all NONMEM VI distribution diskettes. The SETUP command must be typed at the MS-DOS prompt. (If a windowing operating system is used, an MS-DOS window can be opened by double clicking the MS-DOS shortcut, or from the PROGRAM menu.) With Windows NT, CDSETUP6.BAT can also be run from the RUN menu or from Windows NT Explorer.
The essential commands in CDSETUP6.BAT are shown in Appendix 3. CDSETUP6.BAT creates a file named path.for, which is needed by the NMLINK6 program. CDSETUP6.BAT modifies the batch file nmfe6.bat (which is used to run NONMEM after installation) to contain the correct path and the same compile command that was used to compile NONMEM. It also installs On-Line Help from the Help Guide directory of the CD. (optional).
If your compiler requires a command such as
compile.bat
or
f32env.bat
or
g77setup.bat
prior to using the compiler, be sure to type this command 1) prior to using CDSETUP6.BAT, and 2) each time you open a new MS-DOS window to run NONMEM.
CDSETUP6.BAT makes the following assumptions:
• The hard drive is c
• the CD drive is d
• the NONMEM VI directory is to be named nmvi
• the command for Fortran compiles is df (e.g., DIGITAL
Visual Fortran)
• compiles are to be optimized
• the command for the linker is link.
See Sections 3 and 4 below for command line options and other ways of overriding CDSETUP6.BAT’s defaults; we recommended that you do so with DIGITAL Visual Fortran.
If the defaults are appropriate, type the following command at the MS-DOS prompt to run CDSETUP6.BAT:
d:\cdsetup6
The directory c:\nmvi and all necessary sub-directories
will be created for NONMEM VI, and all necessary files will
be read from diskettes and installed.
1
----------
(If the files have already been obtained, e.g., via ftp from a networked computer, make sure the files are located in directory c:\nmvi, change to this directory, and type the command SETUP.)
Before certain steps, CDSETUP6.BAT pauses and asks if you want to continue. Press any key to continue, or type Ctrl C ("Control C") to stop. See Section 2 below for reasons to stop at various steps.
CDSETUP6.BAT creates a file SETUP.TXT documenting the
command as typed and as executed (i.e., including any
defaults). If changes or updates are made to NONMEM VI in
the future, it will be important that recompiles be done
with the same options. 2
SETUP.TXT can be examined to help recall what these options
were.
----------
After installation, the nmfe6 command is used (at the MS-DOS prompt) to run NONMEM. This can be done from any directory, although CDSETUP6.BAT creates a directory named run that you may find useful for this purpose and copies nmfe6 to this directory. CDSETUP6.BAT also copies CONTROL3 and DATA3, as well as CONTROL5 and THEOPP, to directory run. These are input files for NM-TRAN that may be used for testing purposes. They are supplied on the distribution medium, as are other control and data files (see Chapter II), and they can also be found in directory nmvi/util when CDSETUP6.BAT is finished.
For example, NONMEM may be tested with these commands:
cd run nmfe6 control5 report5.txt
When the NONMEM run is finished, NONMEM output will be
found in file report5.txt.
3
----------
To run NONMEM from other directories, copy c:\nmvi\util\nmfe6.bat to your those directories, or copy it to a directory in your path, or put the complete pathname (e.g., c:\nmvi\util) in your path.
See Chapter VII for a detailed description of nmfe6.bat and its utility program nmlink6.for, and error messages that may appear during its use.
If On-line Help was installed, you may at any time change to the help directory:
cd c:\nmvi\help.dir
To obtain help for a given topic (e.g., advan2), enter the command
nmhelp advan2
More information about On-line Help may be found in Chapter XI.
Once NONMEM has been installed correctly, considerable disk space may be recovered by removing certain files. See Chapter VIII.
CDSETUP6.BAT performs fourteen steps during the installation. Before certain steps, CDSETUP6.BAT pauses and asks if you want to continue. You may safely stop CDSETUP6.BAT at these steps by typing Ctrl C. You may choose to make changes at these points (see below). Resume installation by retyping the SETUP command exactly as before. CDSETUP6.BAT will skip the steps that were completed and will resume at the next step. If CDSETUP6.BAT is interrupted at other times you may not be able to restart it properly, and may need to uninstall NONMEM (see Chapter VIII) and start all over.
The fourteen steps and the stopping points are listed below.
Step 1. Make the NONMEM VI directory Step 1a. Make sub-directories. Step 2a. Read files from CD-ROM Step 2b. Read NM-TRAN and miscellaneous files from CD-ROM PAUSE Step 3. Copy NMLINK6, etc. to sub-directories Step 4. Compile sep utility. Step 5. Separate files NMD, PPD1, PPD2, TRAN, and TRLD. Step 5a. Separate NMD ... Step 5b. Separate PPD1 and PPD2 ... Step 5c. Separate TRAN ... Step 5d. Separate TRLD ... Step 6. Compile source files *.for. PAUSE Step 6a. Compile NONMEM (this may take a while) ... Step 6b. Compile PREDPP (this may take a while) ... Step 6c. Compile NM-TRAN (this may take a while) ... Step 6d. Compile NM-TRAN Library Routines (this may take a while) ... Step 7. Build NONMEM library nm\nonmem.lib Step 8. Build nmtran.exe Step 9a. Create nmlink6.for or makeg77bat.for Step 9b. Create path.for Step 9c. Compile nmlink6.for, makeg95bat.for or makeg77bat.for Step 10. Create batch file util\nmfe6.bat Step 11. Create directory run Step 12. Install on-line help HTML files from NONMEM 6 Installation CD-ROM. PAUSE Step 13. Install on-line NONMEM Guide files from NONMEM 6 Installation CD-ROM. PAUSE Step 14. Install on-line help DOS files from NONMEM 6 Installation CD-ROM. echo Reading On-line Help DOS files Do you want to install DOS tools? PAUSE Reading DOS Tools ...
CDSETUP6.BAT will not separate files in a directory when certain files with extension ".for" exist in the directory. To prevent CDSETUP6.BAT from separating a file, copy the file to the appropriate directory using the same name and adding extension ".for". E.g., to avoid separating the file of NONMEM routines, and/or the file of NM-TRAN routines, type one or both of these commands from the NONMEM VI directory:
copy NMD nm\NMD.for copy TRAN tr\TRAN.for
Then retype the SETUP command as you did originally.
Note that CDSETUP6.BAT must be allowed to separate files in pr (PREDPP) and tl (NM-TRAN Library).
The pause before Step 6 allows you to make code changes to the SIZES file, or to NONMEM, PREDPP, NM-TRAN and/or NM-TRAN Library routines, in sub-directories nm, pr, nt, or nl, respectively. For example, to increase the maximum number of observation records per individual record, stop at this point and modify SIZES as described in Chapter III.
CDSETUP6.BAT will not compile files in a directory if certain object files (files which have extension .obj) exist in the directory. If you modify source files in any directory after installing NONMEM, you must remove all object modules in that directory. E.g., in each directory in which you made source code changes, type
erase *.obj
Then retype the CDSETUP6 command as you did originally.
The pause before Step 12 allows you to choose whether to install On-line Help HTML files from the HTML directory of the CD. If you do not choose to do so initially, you may install On-line HTML files at a later time. Retype the SETUP command as you did originally. It will skip all steps prior to Step 12.
Similarly, you may choose to install the NONMEM Users Guides (as pdf files) at this time or later, and may choose to install the MS-DOS format help files from the help directory, and the DOS tools, at this time or later.
CDSETUP6.BAT allows several options to be changed using command-line options. To find out what they are, type the command
d:\cdsetup6 help
The response is as follows:
Usage: cdsetup6 a h n f o where a = CD-ROM drive letter h = hard drive letter n = name of NONMEM VI directory f = command for FORTRAN compile (df, g95, g77, ifl, wfl386, or fl32) o = optimization (y or n) l = command for linker Default: setup d c nmvi df y link
This indicates that by default NONMEM VI will be read from d:, installed in c:\nmvi, and compiled with the command df with optimization, and linked with the command link.
If an option is to be changed, you must type explicit values for any preceding option(s); these may be identical to the default values. Options that follow the last one typed will be given their default values.
Here is an example. Suppose that the CD drive is b; the hard drive is e; the NONMEM VI directory is nmvi; the command for FORTRAN compiles is df (for DIGITAL Visual Fortran); and that optimization is not desired. Suppose also that the linker command is link32. The command is:
b:\setup b e nmvi df n link32
To change only the compiler to GNU g77 and use all other defaults, the command is:
a:\setup d c nmvi g77
It is possible to read CDSETUP6.BAT from diskette to the NONMEM VI directory, make changes directly to it, and run the modified version. One such change is to the Fortran compiler options.
Built-in choices that require no change to CDSETUP6.BAT are as follows:
The compilers recognized by the CDSETUP6.BAT utility for Windows and their options are as follows (all but the first request optimization):
If you use a different compiler or prefer other options, locate these lines of CDSETUP6.BAT:
if "%o%" == "y" if "%f%" == "fl32" set op=/Ox /Op if "%o%" == "y" if "%f%" == "df" set op=/optimize:1 /fpe:0 etc.
Make the desired changes to the options, or insert a line for your own compiler.
Other changes and advanced features are described in Chapter VII. Users of Watcom FORTRAN 77 should look in Chapter VII and in the index at the back of this document. Entries for "Watcom" will help you find suggestions sent to us by other Watcom users.
TOP
TABLE OF CONTENTS
NEXT APPENDIX ...