thk686 / odeintr

An R package for integrating differential equations in C++
18 stars 3 forks source link

issue with the functions compile_implicit and compile_sys #5

Closed soumyadebnath closed 6 years ago

soumyadebnath commented 6 years ago

There is a problem with the gcc-c++ compiler. Because it is trying to cast a variable to a string and failing because it's already a string. I've tried upgrading from 4.4.6-4 to the latest version of gcc-c++ for CentOS 6 (4.4.7-18), but the error still occurs.

The functions are working correctly in CentOS 7 with gcc-c++-4.8.3-9.el7.x86_64

I was trying to run the below code (examples in the reference manual) but they are not working and giving a huge error.

compile_sys("logistic", "dxdt = x * (1 - x)") Error in Rcpp::sourceCpp(code = code, env = env, ...) : Error 1 occurred building shared library. compile_implicit("lorenz", Lorenz.sys, pars, TRUE) Error in Rcpp::sourceCpp(code = code, env = env, ...) : Error 1 occurred building shared library.

I'm giving the final two lines of the error.

I'm using odeintr 1.3 and my session info is given below.

sessionInfo(package = NULL) R version 3.2.5 (2016-04-14) Platform: x86_64-pc-linux-gnu (64-bit) Running under: CentOS release 6.3 (Final)

locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] odeintr_1.3

loaded via a namespace (and not attached): [1] tools_3.2.5 Rcpp_0.12.4 vrwatch_1.0.0

thk686 commented 6 years ago

Fixed.