Hello,
I have a model that ran too slowly, without divergences or any other issues in sampling, so I manually specified gradients for the functions in the likelihood. The functions take vector arguments and return a vector. When compiling the model on RStan and Windows 10 x64, I get the following error.
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! In file included from E:\Downloads\Software\Stanmath\math-develop/stan/math/rev/mat/functor/integrate_ode_adams.hpp:4:0,
from E:\Downloads\Software\Stanmath\math-develop/stan/math/rev/mat.hpp:68,
from E:\Downloads\Software\Stanmath\math-develop/stan/math.hpp:4,
from E:/R/library/StanHeaders/include/src/stan/model/model_header.hpp:4,
from file2441e9f602.cpp:8:
E:\Downloads\Software\Stanmath\math-develop/stan/math/rev/mat/functor/cvodes_integrator.hpp: In member function ‘std::vector<std::vector<typename stan::return_type<T_initial, T_param>::type> > stan::math::cvodes_integrator::integrate(const F&, const std::vector<T_initial>&, double, const std::vector&, const std::vector<T_param>&, const std::vector&, const std::vector&, std::ostream*, double, double, long int)’:
E:\Downloads\Software\Stanmath\math-develop/stan/math/rev/mat/fun
In addition: Warning message:
In system(cmd, intern = !verbose) :
running command ‘E:/R/bin/x64/R CMD SHLIB file2441e9f602.cpp 2> file2441e9f602.cpp.err.txt’ had status 1
Error in sink(type = “output”) : invalid connection
On compiling the model with verbose=TRUE, I found this at the location of the first error.
Compilation argument:
E:/R/bin/x64/R CMD SHLIB file244154a2103.cpp 2> file244154a2103.cpp.err.txt
In file included from E:\Downloads\Software\Stanmath\math-develop/stan/math/rev/mat/functor/integrate_ode_adams.hpp:4:0,
from E:\Downloads\Software\Stanmath\math-develop/stan/math/rev/mat.hpp:68,
from E:\Downloads\Software\Stanmath\math-develop/stan/math.hpp:4,
from E:/R/library/StanHeaders/include/src/stan/model/model_header.hpp:4,
from file244154a2103.cpp:8:
E:\Downloads\Software\Stanmath\math-develop/stan/math/rev/mat/functor/cvodes_integrator.hpp: In member function ‘std::vector<std::vector<typename stan::return_type<T_initial, T_param>::type> > stan::math::cvodes_integrator::integrate(const F&, const std::vector<T_initial>&, double, const std::vector&, const std::vector<T_param>&, const std::vector&, const std::vector&, std::ostream*, double, double, long int)’:
E:\Downloads\Software\Stanmath\math-develop/stan/math/rev/mat/functor/cvodes_integrator.hpp:111:39: error: too few arguments to function ‘void* CVodeCreate(int, int)’
void* cvodes_mem = CVodeCreate(Lmm);
^
In file included from E:\Downloads\Software\Stanmath\math-develop/stan/math/rev/mat/functor/cvodes_utils.hpp:4:0,
from E:\Downloads\Software\Stanmath\math-develop/stan/math/rev/mat.hpp:66,
from E:\Downloads\Software\Stanmath\math-develop/stan/math.hpp:4,
from E:/R/library/StanHeaders/include/src/stan/model/model_header.hpp:4,
from file244154a2103.cpp:8:
E:\R\library\StanHeaders\include/cvodes/cvodes.h:546:23: note: declared here
SUNDIALS_EXPORT void *CVodeCreate(int lmm, int iter);
^
file244154a2103.cpp: At global scope:
file244154a2103.cpp:91:48: error: ‘model24468e1abe_deconv_db_trapz_grad_namespace::stan::io’ has not been declared
model24468e1abe_deconv_db_trapz_grad(stan::io::var_context& context__,
^
file244154a2103.cpp:91:63: error: expected ‘)’ before ‘&’ token
model24468e1abe_deconv_db_trapz_grad(stan::io::var_context& context__,
^
file244154a2103.cpp:97:48: error: ‘model24468e1abe_deconv_db_trapz_grad_namespace::stan::io’ has not been declared
model24468e1abe_deconv_db_trapz_grad(stan::io::var_context& context__,
^
file244154a2103.cpp:97:63: error: expected ‘)’ before ‘&’ token
model24468e1abe_deconv_db_trapz_grad(stan::io::var_context& context__,
^
file244154a2103.cpp:104:26: error: ‘model24468e1abe_deconv_db_trapz_grad_namespace::stan::io’ has not been declared
void ctor_body(stan::io::var_context& context__,
^
file244154a2103.cpp:104:41: error: expected ‘,’ or ‘…’ before ‘&’ token
void ctor_body(stan::io::var_context& context__,
^
file244154a2103.cpp:400:38: error: ‘io’ in namespace ‘model24468e1abe_deconv_db_trapz_grad_namespace::stan’ does not name a type
void transform_inits(const stan::io::var_context& context__,
^
file244154a2103.cpp:400:53: error: expected unqualified-id before ‘&’ token
void transform_inits(const stan::io::var_context& context__,
I also attempted to compile the model on Ubuntu 18.04, and got the following error under verbose=TRUE.
file13e84e54d7a6.cpp:91:50: error: ‘model13e82a6ed0e9_deconv_db_trapz_grad_namespace::stan::io’ has not been declared
model13e82a6ed0e9_deconv_db_trapz_grad(stan::io::var_context& context__,
^~
file13e84e54d7a6.cpp:91:65: error: expected ‘)’ before ‘&’ token
model13e82a6ed0e9_deconv_db_trapz_grad(stan::io::var_context& context__,
^
file13e84e54d7a6.cpp:97:50: error: ‘model13e82a6ed0e9_deconv_db_trapz_grad_namespace::stan::io’ has not been declared
model13e82a6ed0e9_deconv_db_trapz_grad(stan::io::var_context& context__,
^~
file13e84e54d7a6.cpp:97:65: error: expected ‘)’ before ‘&’ token
model13e82a6ed0e9_deconv_db_trapz_grad(stan::io::var_context& context__,
^
file13e84e54d7a6.cpp:104:26: error: ‘model13e82a6ed0e9_deconv_db_trapz_grad_namespace::stan::io’ has not been declared
void ctor_body(stan::io::var_context& context__,
^~
file13e84e54d7a6.cpp:104:41: error: expected ‘,’ or ‘…’ before ‘&’ token
void ctor_body(stan::io::var_context& context__,
^
file13e84e54d7a6.cpp:400:38: error: ‘io’ in namespace ‘model13e82a6ed0e9_deconv_db_trapz_grad_namespace::stan’ does not name a type
void transform_inits(const stan::io::var_context& context__,
^~
file13e84e54d7a6.cpp:400:53: error: expected unqualified-id before ‘&’ token
void transform_inits(const stan::io::var_context& context__,
^