DOS emulation window issue

11 messages 5 people Latest: Nov 07, 2005

DOS emulation window issue

From: Mark Peterson Date: November 02, 2005 technical
From: Peterson, Mark markp@amgen.com Subject: [NMusers] DOS emulation window issue Date: Wed, 2 Nov 2005 10:53:12 -0800 Hello All, I have been running NONMEM under Windows 2000 using Compaq Digital Fortran to compile and have noticed that, on occasion, runs will "hang". Specifically, iterations are visible within the DOS emulation window, the task manager indicates no CPU usage, and the run has not completed. While the DOS window is activated, if I provide either a page down or down arrow keystroke, the CPU begins processing the run again at the point at which it hung, and continues normally to completion. I have also noticed that if I process the same run multiple times, the point at which the run hung in one instance will not necessarily repeat. Has anyone else observed this behavior and/or have insights into the cause? Thanks, Mark Peterson

RE: DOS emulation window issue

From: Toufigh Gordi Date: November 02, 2005 technical
From: Gordi, Toufigh Toufigh.Gordi@cvt.com Subject: RE: [NMusers] DOS emulation window issue Date: Wed, 2 Nov 2005 11:21:05 -0800 Hi Mark, I guess this is quite common and that's the major reason I moved to Windows XP. I had the same problem when using Windows 2000 but have never encountered it under XP since I changed to it for almost 3 years ago. Toufigh Gordi

RE: DOS emulation window issue

From: Mark Sale Date: November 02, 2005 technical
From: mark.e.sale@gsk.com Subject: RE: [NMusers] DOS emulation window issue Date: Wed, 2 Nov 2005 15:45:14 -0500 Mark, this is standard DOS, not NONMEM specific, what is happening is the app (NONMEM in this case) is trying to output to the console (which is considered a file, called standard output, like in UNIX). But the "file" is locked because you have "selected" some text. (e.g., right mouse button and drag). Look at the title bar, when this happens, you'll see "select MS-DOS". hit any key and the "select" goes away, and the "file" is open again. The annoying thing is that NONMEM doesn't freeze until it gets to a point where it tries to output to the console, then finds that the file is locked, and waits until it is unlocked. No specific cure, except to make sure you hit the ENTER key before you go home at night, or at least look at the title bar. Or, you could edit the BLKDAT.for file and get rid of the output to the console, haven't tried that but it should work. Mark Sale M.D. Global Director, Research Modeling and Simulation GlaxoSmithKline 919-483-1808 Mobile 919-522-6668

RE: DOS emulation window issue

From: Mark Peterson Date: November 02, 2005 technical
From: Peterson, Mark markp@amgen.com Subject: RE: [NMusers] DOS emulation window issue Date: Wed, 2 Nov 2005 13:32:41 -0800 Mark, Thank you for this explanation. This makes sense. All the best, Mark Peterson

RE: DOS emulation window issue

From: Mark Sale Date: November 03, 2005 technical
From: mark.e.sale@gsk.com Subject: RE: [NMusers] DOS emulation window issue Date: Wed, 2 Nov 2005 20:32:27 -0500 I see I had a small cerebral eructation, it is left mouse button and drag to "select" text in MS-DOS windows, not right mouse button. Mark Sale M.D. Global Director, Research Modeling and Simulation GlaxoSmithKline 919-483-1808 Mobile 919-522-6668

RE: DOS emulation window issue

From: Malaz Abutarif Date: November 03, 2005 technical
From: Abutarif, Malaz malaz.abutarif@spcorp.com Subject: RE: [NMusers] DOS emulation window issue Date: Thu, 3 Nov 2005 17:37:26 -0500 Mark, This is appreciated. For automation of runs, I use SPLUS and run NonMem from SPLUS using the "dos" command. Do you know or does anyone know if this is also true in that case? Do we need to watch out for this? and how? (from within SPLUS, I will have to choose the option "multi=F" to be able to automate multiple runs and the output is inside the SPLUS script window (i.e., there is no title for a Dos window). Thanks in advance, Malaz

RE: DOS emulation window issue

From: Vladimir Piotrovskij Date: November 04, 2005 technical
From: Piotrovskij, Vladimir [PRDBE] VPIOTROV@PRDBE.jnj.com Subject: RE: [NMusers] DOS emulation window issue Date: Fri, 4 Nov 2005 10:03:33 +0100 *Malaz,* ** *"dos" function is deprecated in S-PLUS 2000 and higher (although still supported). I use the function "system" that is quite flexible. The following command: system("C:\\WINNT\\SYSTEM32\\CMD.EXE /c start /LOW/i C:\\nmv\\run\\nmfe5 mod.txt out.txt",multi=T) opens the dos window and sets the priority of the process to "low". You can use other applications and will observe no delays. After NONMEM run stops the dos window remains open allowing you to examine NONMEM messages (if any). Another command ystem("c:\\nmv\\run\\nmfe5.bat mod.txt out.txt",multi=T) creates the nonmem process with high priority, and after the run stops closes the dos window. It is convenient for multiple runs like bootstrapping. The argument "multi" regulates the availability of the S-PLUS session while the process is running. multi=F blocks the session. If multi=T you can use it.* *Best regards,* *Vladimir* -------------------------------------------------------------------- Vladimir Piotrovsky, PhD Research Fellow Global Clinical Pharmacology & Experimental Medicine J&J Pharmaceutical Research and Development Beerse Belgium

RE: DOS emulation window issue

From: Mark Sale Date: November 04, 2005 technical
From: mark.e.sale@gsk.com Subject: RE: [NMusers] DOS emulation window issue Date: Fri, 4 Nov 2005 09:06:04 -0500 I suspect that if you "selected" text in the open DOS window that NONMEM would stop when it tried to write to the window, but I'm not sure. I assume that Splus uses the standard windows API calls to create this window (createprocessbynum) which I think will hang. If you use the low level API calls, you can set an option about whether the DOS windows is visible while running. If you're just doing bootstraps, I assume you have little interest in following every iteration, so hiding the window will avoid it hanging (for this reason at least). I don't know if this is available in Splus, it is available in Windows API (which are easy to call from, for example Excel macros or Visual Studio). I'm happy to share the code for this (in Excel macro language VBA). Mark Sale M.D. Global Director, Research Modeling and Simulation GlaxoSmithKline 919-483-1808 Mobile 919-522-6668

RE: DOS emulation window issue

From: Malaz Abutarif Date: November 04, 2005 technical
From: Abutarif, Malaz Subject: RE: [NMusers] DOS emulation window issue Date: Fri, 4 Nov 2005 12:15:28 -0500 Thanks Vladimir. I didn't know about the "system" command. I'll try it for my future runs I used loops in SPLUS with the dos command to run several NM runs: e.g., for running several control streams named 100 to 110, I use i<- 100 while (i <= 110) { dos("...............", multi = F) i<- i+1 } If I use multi=T, as you mentioned, the dos command is executed and then returns to SPLUS which attempts running a second NM run before the first one ends. I get an error message when that happens. When I use multi=F, SPLUS waits for the first run to end and then starts the second one and I don't get any error messages. I only use this for Covariate testing (several runs with one covariate added at a time, i.e., stepwise forward addition or stepwise backward elimination). I'll be curious to see what happens with the "system" command. I'll try it out. Regards to my x-colleague at J&J PRD Malaz

RE: DOS emulation window issue

From: Malaz Abutarif Date: November 04, 2005 technical
From: Abutarif, Malaz malaz.abutarif@spcorp.com Subject: RE: [NMusers] DOS emulation window issue Date: Fri, 4 Nov 2005 15:20:39 -0500 Thanks Mark. There are two options in SPLUS with the dos command (for output), output=T and output=F. One will create a separate window and the other will use an open SPLUS window for output. It's worth testing in my free time to see which one is susceptible to "hang" and which one is not. I'll be interested to see the code for the Excel macro. Thanks for sharing. Malaz */Malaz A. AbuTarif,/*// */B.Sc. (Pharmacy), Ph.D., G.C.P.M./*// /Associate Principal Scientist/ /Schering- Plough Research Institute/ /2015 Galloping Hill Rd, K-15-2-2650/ /Kenilworth, NJ 07033/ /Tel: (908) 740-3835, Fax: (908) 740-2916/ /malaz.abutarif@spcorp.com/

RE: DOS emulation window issue

From: Malaz Abutarif Date: November 07, 2005 technical
From: Abutarif, Malaz malaz.abutarif@spcorp.com Subject: RE: [NMusers] DOS emulation window issue Date: Mon, 7 Nov 2005 13:29:49 -0500 Brian, I fail to realize the advantages of using this ("shell" with the "for" loop) over the "dos" command and with the "while" loop I've been using. The "dos" and "while" loop in SPLUS have been working just fine for me, I just didn't know if the "hanging" of the Dos window would apply when running from within SPLUS or not. Based on what Mark mentioned, it apparently applies. If there are any advantages of the "shell" command over the "dos" command, please share with the group. Regards, Malaz _______________________________________________________