Error when using nimbleRcall

287 views
Skip to first unread message

soledad...@gmail.com

unread,
Nov 14, 2017, 12:43:41 PM11/14/17
to nimble-users

Dear Nimble team,

I’m want to fit an ODE model to data. To integrate the ODEs, I use the ode function from the ‘deSolve’ package in R.

After reading the thread “Functions from other packages” (last update on August 28), it seemed to me that there is a way to wrap a given output generated by the ode solver into a nimble function in order to use it in a nimble model.

When going through the worked example developed by Perry (August 8 message), I got an error message in the compilation step. In fact the error message comes from the nimble function named ‘nimbleDoSomethingInR’ that makes use of nimbleRcall. Both uncompiled and compiled versions give an error message that I don’t know how to interpret:

> nimbleDoSomethingInR(x=2,y=3) ## Uncompiled version

Error in NimArr_2_SEXP(x) : could not find function "NimArr_2_SEXP"

 

> compileNimble(nimbleDoSomethingInR,showCompilerOutput = TRUE) ## When trying to compile

compiling... this may take a minute. On some systems there may be some compiler warnings that can be safely ignored.

Warning message:

running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/etc/x64/Makeconf" -f "C:/PROGRA~1/R/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="dynamicRegistrations_11_14_18_25_13.dll" WIN=64 TCLBIN=64 OBJECTS="dynamicRegistrations_11_14_18_25_13.o"' had status 127

Error: Failed to create the shared library

In addition: Warning message:

running command 'C:/PROGRA~1/R/bin/x64/R CMD SHLIB dynamicRegistrations_11_14_18_25_13.cpp -o dynamicRegistrations_11_14_18_25_13.dll' had status 1

 

So if you have any hint that helps me to understand and fix this error message (not even clear whether this this is related to my R/nimble installation..) to further explore the use of nimbleRcall with a toy ODE model, I would really appreciate your feedback.

 

I’m working with the latest NIMBLE version (0.6-6) in Rstudio, R version 3.4.1.
This is the link to the thread from which I took the worked example:

 

Best,

Soledad

 

Sol Castaño

unread,
Nov 14, 2017, 2:09:48 PM11/14/17
to nimble-users

A small search sent me to the fact that my problem is due to the lack of a C/ C++ compiler (currently moving from Linux to Windows & Rstudio..).So fixing this to move forward into nimbleRcall and Nimble capabilities to fit ODE models.

Best

S. 

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to nimble...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nimble-users/8e4ec8dc-ecde-49cd-bc9f-2eedfdc92e45%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Soledad Castaño, PhD
Department of Epidemiology and Public Health
Swiss Tropical and Public Health Institute
Socinstrasse 57, Postfach,
CH-4002 Basel
Switzerland
Tel: +41 61 284 89 02
Fax: +41 61 284 81 05
Email:
soledad...@unibas.ch  soledad.castano@swisstph.ch

Reply all
Reply to author
Forward
0 new messages