nimble installation

111 views
Skip to first unread message

Lei Cao

unread,
Nov 30, 2021, 5:30:49 AM11/30/21
to nimble-users

Dear all,

     There are some issues when I reinstall my nimble packages in one  of my computer. My other computer could install the nimle, when I use the same installation method. Here is the information, I dont have the C:/Rtools/usr/mingw_64, the other computers which can succefully install nimble show that C:/Rtools/mingw_64 compile

 

R_PACKAGE_DIR: C:/Users/caole/Documents/R/win-library/3.5/nimble
R_HOME = C:/PROGRA~1/R/R-35~1.2, R_ARCH=/x64
Creating inst/CppCode/libnimble_x64.a
C:/Rtools/usr/mingw_64/bin/g++  -I"C:/PROGRA~1/R/R-35~1.2/include" -DNDEBUG -DR_NO_REMAP -I"../include"         -O2 -Wall  -mtune=generic -c RcppUtils.cpp -o RcppUtils.o
sh: C:/Rtools/usr/mingw_64/bin/g++: No such file or directory
make: *** [C:/PROGRA~1/R/R-35~1.2/etc/x64/Makeconf:215: RcppUtils.o] Error 127
The R package directory has not been created yet
** libs
Warning: this package has a non-empty 'configure.win' file,
so building only the main architecture
 
C:/Rtools/usr/mingw_64/bin/g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-35~1.2/include" -DNDEBUG -DR_NO_REMAP -I../inst/include         -O2 -Wall  -mtune=generic -c RcppUtils.cpp -o RcppUtils.o
sh: C:/Rtools/usr/mingw_64/bin/g++: No such file or directory
make: *** [C:/PROGRA~1/R/R-35~1.2/etc/x64/Makeconf:215: RcppUtils.o] Error 127
ERROR: compilation failed for package 'nimble'
* removing 'C:/Users/caole/Documents/R/win-library/3.5/nimble'
In R CMD INSTALL
Warning in install.packages :
  installation of package ‘C:/Users/caole/AppData/Local/Temp/Rtmp6JhplM/downloaded_packages/nimble_0.6.13.tar.gz’ had non-zero exit status.
   
   

  Thank's already,

   Best regards,

   Lei

 
 
 
     
   
  
      

 

 

 

 

Windows 邮件发送

 

Perry de Valpine

unread,
Nov 30, 2021, 11:51:10 AM11/30/21
to Lei Cao, nimble-users
It looks like your versions of R and nimble aren't up to date.  I would start by using current versions.  You'll need to install Rtools on Windows and set the path.

See the link about Rtools from here: https://r-nimble.org/download


--
You received this message because you are subscribed to the Google Groups "nimble-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nimble-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nimble-users/TYCP286MB1316CDB4796E2BEDD65D6CE5C3679%40TYCP286MB1316.JPNP286.PROD.OUTLOOK.COM.

Lei Cao

unread,
Dec 4, 2021, 8:27:11 PM12/4/21
to Perry de Valpine, nimble-users

Dear ALL;

I exactly follow the link about Rtools from here: https://r-nimble.org/download. I type PATH="${RTOOLS40_HOME}\usr\bin;${PATH}", restart R, and type  Sys.which("make") , the R shows ## "C:\\rtools40\\usr\\bin\\make.exe". But when I use the code in the nimble manual to check whether nimbles works. I’ve checked the code in my other computer and it works well. This the example code in the manual.

 

pumpCode <- nimbleCode({ 
  for (i in 1:N){ 
    theta[i] ~ dgamma(alpha,beta) 
    lambda[i] <- theta[i]*t[i] 
    x[i] ~ dpois(lambda[i])
  } 
  alpha ~ dexp(1.0) 
  beta ~ dgamma(0.1,1.0)
})
pumpConsts <- list(N = 10, t = c(94.3, 15.7, 62.9, 126, 5.24, 31.4, 1.05, 1.05, 2.1, 10.5))
pumpData <- list(x = c(5, 1, 5, 14, 3, 19, 1, 1, 4, 22))
pumpInits <- list(alpha = 1, beta = 1, theta = rep(0.1, pumpConsts$N))

pump <- nimbleModel(code = pumpCode, name = "pump", constants = pumpConsts, data = pumpData, inits = pumpInits)
mcmc.out <- nimbleMCMC(code = pumpCode, constants = pumpConsts,
                      data = pumpData, inits = pumpInits,
                       nchains = 2, niter = 10000,
                       summary = TRUE, WAIC = TRUE,
                       monitors = c(&apos;alpha&apos;,&apos;beta&apos;,&apos;theta&apos;))

The R shows that


Defining model

Building model

Setting data and initial values

Running calculate on model

  [Note] Any error reports that follow may simply reflect missing values in model variables.

Checking model sizes and dimensions

Checking model calculations

Compiling

  [Note] This may take a minute.

  [Note] Use 'showCompilerOutput = TRUE' to see C++ compilation details.

 

Failed to create the shared library. Run 'printErrors()' to see the compilation errors.

I also used the code which works in my other computer in the R 3.5.3 , unfortanately, it doen’t work neither. Path0=Sys.getenv('PATH')

Pathrtools = paste("C:\\Rtools\\bin;C:\\Rtools\\mingw_64\\bin")  Sys.setenv(PATH = Pathrtools).

  

      I reall appreciate that some methods to fix this problem.

 

               Best wishes,

               Lei

 

 

 
 

 

 

 

Windows 邮件发送

 


发件人: Perry de Valpine <pdeva...@berkeley.edu>
发送时间: Wednesday, December 1, 2021 12:49:20 AM
收件人: Lei Cao <caole...@outlook.com>
抄送: nimble-users <nimble...@googlegroups.com>
主题: Re: nimble installation
 

Lei Cao

unread,
Dec 5, 2021, 6:38:39 AM12/5/21
to Perry de Valpine, nimble-users

Dear All;

I fixed nimble installation, especiall thank Perry de Valpine, your link is very useful.

 

Thanks.

Lei

 

Windows 邮件发送

 


发件人: nimble...@googlegroups.com <nimble...@googlegroups.com> 代表 Lei Cao <caole...@outlook.com>
发送时间: Sunday, December 5, 2021 9:27:05 AM
收件人: Perry de Valpine <pdeva...@berkeley.edu>
抄送: nimble-users <nimble...@googlegroups.com>
主题: 回复: nimble installation
 
Reply all
Reply to author
Forward
0 new messages