Re: [NMusers] Failure to execute NONMEM from R

From: Tarj Sahota <t.sahota0_at_gmail.com>
Date: Thu, 21 Dec 2017 13:50:50 +0100

Hi Matthew,

Are you using gfortran? If so, RStudio creates additional
environmental variables which messes up how NONMEM generates outputs.

Try Sys.unsetenv("GFORTRAN_STDOUT_UNIT").

Tarj.

On Thu, Dec 21, 2017 at 4:41 AM, HUI, Ka Ho
<matthew.hui_at_link.cuhk.edu.hk> 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 id=
ea?
>
>
>
> Thanks,
>
> Matthew
>
>
>
> From: Bill Denney [mailto:bill_at_denney.ws]
> Sent: Thursday, December 21, 2017 11:11 AM
> To: HUI, Ka Ho <matthew.hui_at_link.cuhk.edu.hk>
> Cc: nmusers_at_globomaxnm.com
> 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 <matthew.hui_at_link.cuhk.edu.hk> wrot=
e:
>
> Dear NMusers,
>
>
>
> Recently I need to execute NONMEM 7.4 from Rstudio terminal. I have tried
> the following scripts:
>
> `system2(“execute FIT_01.mod”)` =
  #Through PsN,
> using `system2`
> `shell(“execute FIT_01.mod”)` =
      #Through PsN,
> using `shell`
> `write(“execute FIT_01.mod”, “FIT_01.bat”=
)`
> `shell(“FIT_01.bat”)`
> #Through PsN, using `shell` to call a batch file
> `write(“execute FIT_01.mod”, “FIT_01.bat”=
)`
> `shell.exec(“FIT_01.bat”)` =
          #Through
> PsN, using `shell.exec` to call a batch file
> The above commands, but call through C:/nm74g64/run/nmfe74.bat directly
>
>
>
> The above were also tested using the test dataset `CONTROL5`
>
>
>
> Results:
>
> gave me the `running command '"execute FIT_01.mod"' had status 127` warni=
ng
> 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 comma=
nd
> 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
>
>

Received on Thu Dec 21 2017 - 07:50:50 EST

This archive was generated by hypermail 2.3.0 : Fri Sep 27 2019 - 16:57:26 EDT