Re: Failure to execute NONMEM from R

From: Devin Pastoor Date: December 21, 2017 technical Source: mail-archive.com
I believe the problem is actually that is cross referenced http://discuss.go-isop.org/t/psn-execute-failed-to-start-when-called-from-rstudio/1119 It is not a path issue Mike and I have had a small amount of offline exploration and can confirm it a pervasive issue with NM74 being called from Rstudio. This is not just PsN, I also use a separate language (go) to manage the nmfe commands and invoking that from Rstudio via system2/processx/sys all fails in the same fashion. At this point, I believe it is likely a permissions issue, but I am unsure of if the (primary) culprit is nonmem or Rstudio. We will need to get Bob's input whether there was a change in the mechanics of how nonmem is invoked from 73 --> 74 to hopefully narrow the surface area of what could be causing the problem.
Quoted reply history
On Wed, Dec 20, 2017 at 10:47 PM HUI, Ka Ho <[email protected]> wrote: > Thanks for attending the problem, Bill. > > > > Exactly which path should I be looking for? Am I to check if the desired > path exists in the list or not? > > I tried adding the paths for NONMEM, PsN, R and Rstudio into the list and > executed commands in R again – nothing has changed so far. Any idea? > > > > Thanks, > > Matthew > > > > *From:* Bill Denney [mailto:[email protected]] > *Sent:* Thursday, December 21, 2017 11:11 AM > *To:* HUI, Ka Ho <[email protected]> > *Cc:* [email protected] > *Subject:* Re: [NMusers] Failure to execute NONMEM from R > > > > Hi Matthew, > > > > Since everything is working when run directly from the command line (cmd), > I would guess that it's something like a path issue. > > > > Check your path at the command prompt (type "path") and in RStudio > ("Sys.getenv("PATH")"). > > > > Thanks, > > > > Bill > > > On Dec 20, 2017, at 21:54, HUI, Ka Ho <[email protected]> > wrote: > > Dear NMusers, > > > > Recently I need to execute NONMEM 7.4 from Rstudio terminal. I have tried > the following scripts: > > 1. `system2(“execute FIT_01.mod”)` #Through > PsN, using `system2` > 2. `shell(“execute FIT_01.mod”)` > #Through PsN, using `shell` > 3. `write(“execute FIT_01.mod”, “FIT_01.bat”)` > `shell(“FIT_01.bat”)` > #Through PsN, using `shell` to call a batch file > 4. `write(“execute FIT_01.mod”, “FIT_01.bat”)` > `shell.exec(“FIT_01.bat”)` > #Through PsN, using `shell.exec` to call a batch file > 5. The above commands, but call through C:/nm74g64/run/nmfe74.bat > directly > > > > The above were also tested using the test dataset `CONTROL5` > > > > Results: > > 1. gave me the `running command '"execute FIT_01.mod"' had status 127` > warning without any execution > > > > (2)-(4) gave me the following messages: > > Starting 1 NONMEM executions. 1 in parallel. > S:1 .. > All executions started. > Starting NMTRAN > NMtran failed. There is no output for model 1. Contents of FMSG: > > Not restarting this model. > F:1 .. > execute done > > (5) similar to (1) but the status/error code became 107 > > > > None of the above has led to a successful NONMEM run. But the above > command lines work when outside R (i.e. through `cmd` +/- PsN) > > Is there anyone experiencing the same issue? > > > > System/software info: > > OS: Windows 10 > > NONMEM v7.4 > > R3.4.2 > > Rstudio v1.1.383 > > > > Best regards, > > *Matthew Hui* > > PhD Student > > School of Pharmacy > > *Faculty of Medicine* > > *The Chinese University of Hong Kong* > > > >
Dec 21, 2017 Ka Ho Hui Failure to execute NONMEM from R
Dec 21, 2017 Bill Denney Re: Failure to execute NONMEM from R
Dec 21, 2017 Devin Pastoor Re: Failure to execute NONMEM from R
Dec 21, 2017 Tarj Sahota Re: Failure to execute NONMEM from R
Dec 22, 2017 Ka Ho Hui RE: Failure to execute NONMEM from R
Jan 02, 2018 Mike K Smith RE: Failure to execute NONMEM from R
Jan 02, 2018 Robert Bauer RE: Failure to execute NONMEM from R