Hui,
You dont give any important details like what goes wrong or what error message you get. But I will try to use the female side of my brain and make an inspired telepathic guess as to what the problem might be <grin>
Each time you use a command such as system() or dos() you are running independent instances of the CMD processor. You have to give the commands in the same instance to get them to work together.
The reason why it seems to work with the Digital compiler is because during installation of the compiler you asked for the compiler environment variables to be added to the system environment. Calling dfvars.bat doesnt actually do anything useful when you call nmfe5 with a separate dos() command. The nmfe5 command works for df because the environment is already set by the system. The Intel 9 installation does not reliably update the system environment so you have to call Ifortvars.bat (or set the variables some other way) to make nmfe5.bat work.
In order to get your system to work I suggest you try create a batch file somewhere called dosnmfe5.bat containing these lines:
rem initialize environment for Intel 9
call C:/Progra~1/Intel/Compiler/Fortran/9.0/IA32/Bin/IFortVars.bat"
rem change to the run directory
cd %1
rem start a low priory instance of the CMD processor to
rem call nmfe5 with control and output file name arguments
C:/WINNT/system32/cmd.EXE /K start /LOW/i C:/nmv9/run/nmfe5.bat %2 %3
then do this in your Splus script:
rundir<-"c:/nmv9/run" # location of control stream file (can be anywhere)
control<-"control" # name of control stream file that nmfe5 is expecting
output<-"delete" # name of NONMEM output file that nmfe5 will create
dos (paste("C:\\somewhere\\dosnmfe5.bat",rundir,control,output,sep=" "))
You could do something similar with WFN (after installing WFN and using NMQUAL to install NONMEM properly (see http://wfn.sourceforge.net):
Create a batch file somewhere called doswfn.bat containing these lines
rem initialize environment for WFN and Intel
rem use standard size NONMEM installation
call C:/nmv9/wfn/bin/wfn.bat ivf std
cd %1
rem a low priority instance of the CMD processor is obtained
rem by setting nmnice=y in wfn.bat
rem call nmgo with runname argument
call nmgo %2
then do this in your Splus script
rundir<-"c:/nmv9/run" # location of control stream file (can be anywhere)
control<-"control.ctl" # name of control stream file that nmgo is expecting
dos (paste("C:/somewhere/doswfn.bat",rundir,control,sep=" "))
Nick
> "Kimko, Hui [PRDUS]" wrote:
>
> Hello:
>
> Would you kindly let me know the command line to run NONMEM using INTEL 9 from S+?
> An example that does not work is : ============
> system("C:\\WINNT\\system32\\cmd.EXE /K start /LOW/i C:\\Progra~1\\Intel\\Compiler\\Fortran\\9.0\\IA32\\Bin\\IFortVars.bat")
>
> loc="C:\\nmv9\\run\\"
> action=paste(loc,"nmfe5.bat ",loc,"CONTROL3 ",loc,"delete",sep="")
> dos(action)
> =======================================
>
> A modification of the command works in Digital Fortran...
>
> Thanks in advance,
> Huicy
--
Nick Holford, Dept Pharmacology & Clinical Pharmacology
University of Auckland, 85 Park Rd, Private Bag 92019, Auckland, New Zealand
n.holford_at_auckland.ac.nz tel:+64(9)373-7599x86730 fax:+64(9)373-7090
www.health.auckland.ac.nz/pharmacology/staff/nholford
Received on Thu Jul 19 2007 - 16:58:15 EDT
This archive was generated by hypermail 2.2.0 : Tue Nov 06 2007 - 15:06:40 EST