Appendix 4 - UNIX Installation Utility SETUP
Appendix 4 is an expanded description of the Solaris and Linux instructions in the file readme~1.txt and readme~1.doc (Linux: 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 on the CD recommends that the defaults be not be used, and that the command be as in the following examples.
Solaris unix:
./SETUP /nmvi f77 ’-O -fnonstd’ ‘which ar‘
Linux on an Intel PC:
./SETUP /opt/nmvi g77 -O /usr/bin/ar Intel
Another platform of interest is the MacBook Pro running OS X:
./SETUP /opt/nmvi g95 ’-O -fsloppy-char’ /usr/bin/ar
SETUP can be used in SunOS UNIX running under Solaris 1 (SunOS 4.x) or Solaris 2 (SunOS 5.x) and Red Hat Linux, in a Shell Tool or Command Tool window. (The only difference is the path and file names on the CD-ROM.) It may require some modifications for other versions of UNIX.
NONMEM VI installation involves no changes to UNIX system files or directories and does not require root privilege (except that root privilege may be needed to create the suggested NONMEM VI directory /export/home/nmvi, although a different directory may be used).
The automatic installation utility SETUP is a C shell script. It is recorded on the NONMEM CD in file nonmem~1.0/unix/nonmemvi.tar (Linux: NONMEM_6.1.0/UNIX/nonmemvi.tar). The SETUP command must be typed at a UNIX prompt, e.g., if a windowing operating system is used, in a command or shell tool window.
The essential commands in SETUP are shown in Appendix 3. SETUP implements changes marked by *** in Appendix 3, changes which otherwise need to be performed by the installer using an editor. Specifically, SETUP uses the UNIX sed command to change the contents of program SEP and of NONMEM routines BLKDAT, BEGIN and FLU to the UNIX platform. If the option "intel" is not coded when SETUP is run, SETUP changes constants in BLKDAT to the IEEE values. When the compiler is gfortran, SETUP makes changes to BLKDAT specific to the that compiler.†
----------
SETUP creates a file named path.for, which is needed by the NMLINK6 program. SETUP modifies the C-shell script nmfe6 (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 diskettes (optional).
SETUP makes the following assumptions:
• The NONMEM VI directory has been created,
as suggested in Appendix 3, Section 1.
• all files have been read from the distribution medium
into the NONMEM VI directory, as suggested in Appendix 3,
Section 1.
• the command for FORTRAN compiles is f77
• the option "-O" (optimization) is to be
used for the compiles
• the UNIX ar command (which creates a library archive
and runs the UNIX ranlib command) is in the user’s
path.
• NONMEM is being installed on a computer that uses
IEEE floating point architecture.
See Sections 3 and 4 below for command-line options and other ways of overriding SETUP’s defaults.
If the defaults are appropriate, change to the NONMEM VI directory and type the following commands at the UNIX prompt to make SETUP executable and run SETUP:
chmod 755 SETUP SETUP
(Depending how the files were read from the distribution medium, SETUP may have a lower case name setup. If so, use the lower case name in the preceding instructions, or precede them with the command "mv setup SETUP" ).
All necessary sub-directories will be created and NONMEM VI will be installed. Before certain steps, SETUP pauses and asks if you want to continue. Type the letter "n" followed by carriage return to stop. Type any other key to continue. See Section 2 below for reasons to stop at various steps.
SETUP 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‡. SETUP.TXT can be examined to
help recall what these options were.
----------
After installation, the nmfe6 command is used (at the UNIX prompt) to run NONMEM. This can be done from any directory, although SETUP creates a directory named run that you may find useful for this purpose and copies nmfe6 to this directory. SETUP also copies CONTROL3 and DATA3 to directory run, as well as CONTROL5 and THEOPP. 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 SETUP is finished.
For example, NONMEM may be tested with these commands:
cd run nmfe6 CONTROL3 report3
When the NONMEM run is finished, NONMEM output will be found in file report3.
To run NONMEM from other directories, copy util/nmfe6 to those directories, or copy it to a directory in your path, or put the complete pathname (e.g., /export/home/nmvi/util) in your path variable.
See Chapter VII for a detailed description of nmfe6 and its utility program nmlink6.f, and error messages that may appear during its use.
If On-line Help was read from the On-line Help diskettes (see Appendix 3 Section 1) it is installed by SETUP. You may at any time change to the help directory:
cd /export/home/nmvi/help
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.
Note that SETUP does not install the HTML files or the NONMEM Users Guide pdf files; see Chapter 11 and Appendix 3.
Once NONMEM has been installed correctly, considerable disk space may be recovered by removing certain files. See Chapter VIII.
SETUP performs twelve steps during the installation. Before certain steps, SETUP pauses and asks if you want to continue. You may safely stop SETUP at these points by typing the letter "n" followed by carriage return. You may choose to make changes at these points (see below). Resume installation by retyping the SETUP command exactly as before (from the NONMEM VI directory). SETUP will skip the steps that were completed and will resume at the next step. If SETUP is interrupted with the Ctrl C keys, you may not be able to restart it properly, and may need to uninstall NONMEM (see Chapter VIII) and start all over.
The twelve steps and the stopping points are listed below.
Step 1. Make sub-directories. Step 2. Rename files with upper case names. Step 3. Copy NMLINK6, etc. to sub-directories. Step 4a. Make changes to sep.f Step 4. Compile sep utility. Step 5. Separate files NMD, PPD1, PPD2, TRAN, and TRLD. Continue (y/n) [y]? Step 5a. Separate NMD ... Step 5b. Separate PPD1 and PPD2 ... Step 5c. Separate TRAN ... Step 5d. Separate TRLD ... Step 6. Compile source files *.f. Continue (y/n) [y]? 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 archive nm/nonmem.a Step 8. Build nmtran.exe Step 9a. Create nmlink6.f Step 9b. Create path.for Step 9c. Compile nmlink6.f Step 10. Create shell script util/nmfe6 Step 11. Create directory run Step 12. Make changes to help/nmhelp
The pause before Step 5a allows you to override the automatic separation of files in directories nm (NONMEM) and/or tr (NM-TRAN). SETUP will not separate files in a directory when certain files with extension ".f" exist in the directory. To prevent SETUP from separating a file, copy the file to the appropriate directory using the same name and adding extension ".f". 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:
cp NMD nm/NMD.f cp TRAN tr/TRAN.f
Then retype the SETUP command as you did originally (from the NONMEM VI directory).
Note that SETUP 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.
SETUP will not compile files in a directory if certain object files (which have extension .o) 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
rm *.o
Then retype the SETUP command as you did originally (from the NONMEM VI directory).
If the On-line Help files were not read from the Help Guide diskettes prior to installing NONMEM , you may create the help sub-directory and read the files now, as suggested in Appendix 3 Section 1. Retype the SETUP command as you did originally (from the NONMEM VI directory). It will skip all steps prior to Step 12 and install On-Line Help.
SETUP allows several options to be changed using command-line options. To find out what they are, type the command
SETUP help
The response is as follows:
Usage: SETUP n f o ar in where n = name of NONMEM VI directory f = command for FORTRAN compiles o = compiler options (e.g., -O or -g) ar = full path name of ar command in = Intel for Pentium computers. Default: SETUP ‘pwd‘ f77 -O ‘which ar‘
The string ‘pwd‘ will be replaced by the full path name of the directory in which the command SETUP is typed and ‘which ar‘ will be replaced by the full path name of the ar command. By default, NONMEM VI will be installed in the current directory. It will be compiled with the command f77 -O. The NONMEM archive will be built with the default ar command.
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. The optimization option may be enclosed in quotes if more than one such option is desired; e.g., ’-fast -O4’.
With SUN Solaris 1, there may be two versions of ar, /bin/ar and /usr/5bin/ar. It is preferable to use /usr/5bin/ar because it runs the UNIX ranlib command. If /bin/ar is used, it will be necessary for the user to run ranlib himself (See Chapter III Section 3).
With SUN Solaris 2, ar may not be in the user’s path. If necessary, specify /usr/xpg4/bin/ar as the last option of the SETUP command.
If the computer uses Intel architecture for floating point constants, include the option "Intel". This will be necessary when installing with the Linux or Solaris operating system on a Pentium PC.
Here is an example. Suppose that the NONMEM VI directory is /home/nmvi; the command for FORTRAN compiles is f77; optimization is not desired. The option "-g" is useful when "-O" is not used, because it provides better debugging information. Suppose also that the ar command is /usr/5bin/ar, which is appropriate to Solaris 1. The command is:
SETUP /home/nmvi f77 -g /usr/5bin/ar
It is possible to make changes directly to SETUP and run the modified version. For example, the ar command may need to be followed by the ranlib command on some systems. Although you can type the ranlib command yourself after SETUP finishes, the ranlib command can be inserted into SETUP itself. Remove the NONMEM archive nm/nonmem.a. Then retype the SETUP command as you did originally (from the NONMEM VI directory). Other changes and advanced features are described in Chapter VII.
TOP
TABLE OF CONTENTS
NEXT APPENDIX ...