Home| Installation| Control Streams| Autocovariate| Bootstrap| Randomization Test | Files | References
Updated 07 March 2007
It is assumed you have already installed NONMEM and a Fortran compiler and wish to install WFN only.
IMPORTANT
WFN will only work once NONMEM and a Fortran
compiler have already been installed. You must be able to identify the
file directory paths ('home directory') for NONMEM and the compiler in order to complete the
installation of WFN.
There are 3 'home' directories that need to be identified. A home directory contains files and sub-directories used by each main component i.e. WFN, NONMEM and the F77 compiler. Typical values for these home directories are:
Wings for NONMEM C:\nmvi\wfn6
NONMEM C:\nmvi
Intel Visual Fortran (ivf) Compiler C:\Program Files\Intel\Compiler\Fortran\9.1
Note the home directory is not the same as the directory containing executable files such as the compiler program. These executable files are found in sub-directories of the home directory e.g. in IA32\bin for the ivf compiler.
Installing WFN depends on how NONMEM has been installed and the compiler that is used. The NONMEM distribution from Globomax has a suggested installation for use with the (obsolete) Microsoft Powerstation Fortran, Compaq (Digital) Fortran, GNU G77, Intel Fortran and Open Watcom F77/32 compilers. These compilers are also supported by WFN. Compiler specific installation details can be found here.
Installing WFN
WFN is distributed as wfn***.exe (where *** is the version number e.g. 600). You should extract its contents into the WFN home directory. It can be any directory you choose . The suggested default for extracting files when you run wfn***.exe is C:\nmvi\wfn6.
The WFN home directory will be referred to as WFNHOME in the following description. Note that when environment variables such as WFNHOME are used as part of a DOS command expression they are written as %WFNHOME%. When DOS environment variables are set the surrounding % is not used to define the variable name.
Extracting files from wfn***.exe creates a %WFNHOME%\bin directory which contains the WFN command files, a %WFNHOME%\web directory which contains this documentation and a %WFNHOME%\run directory which contains some examples which you can use to run nmgo and qualify your installation.
You will need to use a Windows shortcut to open an MS-DOS prompt window and invoke a special startup batch file (wfn.bat). Because WFN makes a lot of use of DOS environment variables you must make sure you have enough environment space memory allocated. The procedure for doing this depends on whether you use Windows 95/98 or Windows XP/2000/NT. You will need to know the full path to wfn.bat. It is in %WFNHOME%\bin e.g. C:\nmvi\wfn6\bin.
Windows 95/98/ME
In the Working box enter the full path to a directory you will use to run WFN commands e.g.
In the Batch file box enter the full path for wfn.bat e.g.
where C:\nmvi\wfn6 may need to be changed to reflect your WFN home directory
On the Windows desktop make a right click and select New Shortcut. When prompted to "Type the location of the item" enter %SystemRoot%\system32\cmd.exe /k followed by the full path for wfn.bat e.g.
%SystemRoot%\system32\cmd.exe /k C:\nmvi\wfn6\bin\wfn.bat
where C:\nmvi\wfn6 should be changed to reflect your WFN home directory
All Operating Systems
Creating WFN.BAT
It is essential that you create a file called wfn.bat. You should do this by copying the wfn.txt file in the %WFNHOME% directory e.g.
copy C:\nmvi\wfn6\bin\wfn.txt C:\nmvi\wfn6\bin\wfn.bat.
wfn.bat is used to set up environment
variables when you open a Command Prompt window. These
variables are used to individualize your WFN installation.
Be prepared to make changes
to
wfn.bat that reflect the setup of NONMEM and the Fortran
compiler you use. Look for the sections marked:
rem ******* Check this ************.
The changes you make are to the
Command Prompt environment variables.
IMPORTANT: Environment variable
names should be uppercase e.g. 'WFNHOME' not 'wfnhome'. This is essential
to allow the GNU make command to work under both Win9* and Win2000.
Change the NMHOME value to the directory which has your installation of NONMEM files in it (e.g. C:\nmvi).Location of WFN and NONMEM and specify Compiler version
Change F77VER to one of the following compiler types:
g77 - Gnu Fortran
gf - Gfortran
df - Visual Fortran
ivf - Intel Fortran
ms - Microsoft PowerStation Fortran
wc - Open Watcom Fortran
Note these compiler types are not necessarily the same as the compiler executable name.
rem ******* Check this ************
set NMHOME=C:\nmvi
set WFNHOME=C:\nmvi\wfn6
set F77HOME=C:\g77
set F77VER=g77
Obtaining the GNU g77 compiler and installation for use with NONMEM is described here .
set F77HOME=C:\gfortran
set F77VER=gf
Gfortran need source code changes similar to g77. Look here for details.
Change F77HOME to the home directory for the DF compiler. The F77HOME directory contains df98, vc98 and common directories. It is usually C:\Program Files\Microsoft Visual Studio. Set the compiler version F77VER to df.
set F77HOME=C:\Program Files\Microsoft Visual Studio
set F77VER=df
Further instructions can be found in the :df section of wfn.bat for unusual installations.
Change F77HOME to the home directory for the ivf compiler. Set the compiler version F77VER to ivf
set
F77HOME=C:\Program Files\Intel\Compiler\Fortran\9.0
set
F77VER=df
The ivf compiler also needs to know about the Microsoft Visual Studio .NET location. You will need to go to the :ivf section of wfn.bat (search for the text ":ivf").
Change MVSHOME to the home directory for Microsoft Visual Studio .NET
e.g.
:ivf
rem ******* Check this ************
set MVSHOME=C:\Program Files\Microsoft Visual Studio .NET 2003
rem ******* End Check this ********
set F77HOME=C:\watcom
set F77VER=wc
set F77HOME=C:\f32
set F77VER=ms
Unix
Set the NMOS variable to unix
rem ******* Other Software
******
rem If you use Crossgraphs
then set cghome
set CGHOME=C:\Program Files\PPD
Informatics\CrossGraphs
rem If you have installed
the full GNU compiler tools
rem you may want to
include them in your path by setting GNUPATH
rem to the compiler
bin directory. The path is set later in this file.
set GNUPATH=C:\gnu\bin
Do this by looking at the sub-directories in the nmhome directory (e.g. C:\nmvi). The environment variable NMNM must be set to the name of the sub-directory that contains the NONMEM object files, the variable NMPR must be set to the sub-directory containing the PREDPP object files, the variable NMTR must be set to the sub-directory containing nmtran.exe. NMTL is not required unless you use the NM-TRAN library. If you do then set NMTL to the sub-directory containing the NM-TRAN library files.
rem ******* Check nmhome sub-dirs
match these names ************
rem ******* e.g. set NMNM=nm if C:\nmvi\nm
rem ******* or set
NMNM=nmd.dir if C:\nmvi\nmd.dir
set NMNM=nm
set NMTR=tr
set NMPR=pr
set NMTL=tl
rem ********************************
You need to be aware that there are 2 steps in compilation of NONMEM. The first
is performed at installation of NONMEM and creates a set of obj files and a
nonmem.lib library. This compilation step is only repeated if you make changes
to NONMEM source code and rerun the NONMEM project group setup.bat (or
wfnsetup.bat). The second is when the user supplied sub-routine FSUBS
created by NM-TRAN is compileed and linked with the pre-compiled obj files. This
happens every time that nmgo is used. You should take care that the
compiler options used for both of these compilation steps are identical.
The compiler options used by WFN are set in wfn.bat and are displayed
when wfn.bat is executed e.g. for the df compiler:
F77OPT =/nologo /nbs /w /4Yportlib /Gs
/Ob1gyti /Qprec_div
and can also be found in the *.log
file created in the run sub-directory e.g.
ifort /nologo /nbs /w /4Yportlib /Gs
/Ob1gyti /Qprec_div /Fetheopd FSUBS.for @link.txt
The compiler options in wfn.bat may be changed by modifying the compiler
specific section of wfn.bat where F77OPT is set.
The standard NONMEM group installation creates an nmfe5.bat file with the
compiler options set in the variable op e.g. the default options for the df
compiler are shown here
set op=/optimize:1 /fpe:0
Note that these nmfe5 options are not the same as those used by default in WFN.
WFN uses options that allow df to run faster. These alternative options were
chosen on the basis of a note from Alison Boechmann
http://www.cognigencorp.com/nonmem/nm/99oct291999.html.
If you compare the results of NONMEM runs using both nmfe5 and nmgo and and discover small differences in the output of NONMEM then this is most likely due to using different compiler options. Be sure to check the compiler options that are set in nmfe5.bat and wfn.bat.
WFN Options
There are five WFN options in wfn.bat that you may wish to change:
Use the WFN shortcut to open an MS-DOS window. You should see a short list showing the variables WFN is using (OS will be blank if you are not using Windows NT). Here is an example using the g77 compiler settings:
OS =Windows_NT
WFNHOME =C:\nmvi\wfn6
NMHOME =C:\nmvi
NMSRCHOME=C:\nmvi\src6_20070227
NMBINHOME=C:\nmvi\ver6_20070227\g77\std
F77HOME =C:\nmv\g77
F77TYP =g77
F77EXE =g77
F77OPT =-fno-backslash -O
NMCTL =.ctl
NMOUT =.lst
NMTBL =.fit
NMLOG =.log
NMIGNORE =#
NMDIR =.std
NMOBJ =std
NMAWK =gawk
LIBRARY_PATH=c:\nmv\g77\lib
Assuming you start in C:\nmvi\wfn6\run you should see the DOS prompt:
C:\nmvi\wfn6\run>
If necessary you should change to the wfn6\run directory. There is no need to do this if you start in the C:\nmvi\wfn6\run directory.
cd C:\nmvi\wfn6\run
Then run NONMEM using the nmgo command. The run directory contains theopd.ctl and an associated data file, theopd.dat. If you have changed the NMCTL value from .ctl then you will need to rename theopd.ctl to your preferred extension e.g. if you change NMCTL to .mod then rename theopd.ctl to theopd.mod before trying to use the nmgo command.
nmgo theopd
If nmgo runs correctly you should see this when it finishes (the timing information in the last line will depend on the computer you use) (GNU Fortran (GCC 3.1) 3.1 20020514):
THETA: POPE0 POPEMAX POPEC50
ETA: ETAE0 ETAEMAX ETAEC50
ERR: ERRSD
theopd.lst 5802.086 eval=324 sig=+4.5 sub=153 obs=574 CCIL=NNNN NVI1.1
THETA = 146 165 6.57
ETASD = 0.0413521 0.487852 1.2083
ERRSD = 81.1788
THETA:se% = 7.6 12.5 30.0
OMEGA:se% = 4350.9 42.9 78.8
SIGMA:se% = 10.6
MINIMIZATION SUCCESSFUL
user 0:2.33 real 0:2.33 tcl 0:3.22
Once you have qualified the
installation you can go ahead and use nmgo on your own data. You
can execute nmgo from any directory you wish but the NMTRAN control stream
file (e.g. theopd.ctl) must be in the current directory. Do not
attempt to use a path to point to a control stream in another directory.
Problems
It is normal to see a message from NM-TRAN giving warnings like this:
WARNINGS
AND ERRORS (IF ANY) FOR PROBLEM 1
(WARNING 2) NM-TRAN INFERS THAT THE DATA ARE POPULATION.
(WARNING 13) WITH USER-WRITTEN PRED OR $PRED, NM-TRAN CANNOT APPEND THE
MDV DATA ITEM.
It is also normal to find this at the end of the log file created in the run directory:
[status]
Error=None
If you have problems running WFN please let me know and I will try to help. It is helpful if you make a copy of the WFN window that appears immediately after opening the WFN shortcut and send this to me. If you right click on the WFN window title bar you will see an Edit option. Use this to Mark and Copy the WFN window contents and paste it into an email. Please also send a copy of the screen showing error messages and the command you typed that led to the error. Please do not send bit map screen dumps.
Uninstall
If you wish to remove all wfn files please use the unwfn\unwfn.bat DOS batch command file. Open a DOS window, change to the WFNHOME directory and execute unwfn.bat . This will leave the directory structure, any files not installed by wfn and the unwfn\unwfn.bat file. You may delete the unwfn and unwfn.bat file.
cd C:\nmvi\wfn6
unwfn\unwfn
Using More than One Compiler
wfn.bat can be modified to support more than one compiler. There are 2 ways of doing this.
The first involves finding the compiler version specific sections and setting F77HOME to the appropriate value. e.g. if you are currently using the df compiler and want to also use the g77 compiler then find this section in wfn.bat, uncomment the F77HOME line and set F77HOME e.g.
:g77
rem ******* Check this ************
set F77HOME=C:\nmvi\f77\g77
rem ******* End Check this ********
The second method can be convenient if you have installed your compilers in sub-directories of a common home directory and use the %F77VER% version codes to distinguish the sub-directories. If you do this then you should set F77HOME to the common home directory at the start of wfn.bat e.g. you might have your Fortran compilers installed as sub-directories of C:\f77 like this C:\f77\df, C:\f77\g77. In that case set F77HOME=C:\f77 and uncomment the line referring to F77VERHOME as shown below:
rem **** Uncomment for Multiple Compilers
***************
set F77VERHOME=%F77HOME%\%F77VER%
rem *****************************************************
With either method you can then select the compiler version you want by invoking the wfn command from the DOS prompt e.g.
wfn g77
or
wfn df
You can add the compiler version code after wfn.bat in the shortcut properties if you want to be able to automatically set up the environment for each compiler by opening a shortcut.
e.g.
or
NONMEM Versions
See the NONMEM Versions page for instructions on using more than one version of NONMEM with WFN. Installation of NONMEM using NMQual and the WFN utililty nmqinstall.bat is the simplest way to do this.
Home| Installation| Control Streams| Autocovariate| Bootstrap| Randomization Test | Files | References