charlesm93/StanCon2020

template argument deduction/substitution failed when running run_models.r

jasonfan1997 opened this issue · 3 comments

Hi, I installed using install.sh but encounter the following error when I tried to run run_models.r

The error message is long but all errors are similar to the following

/tmp/RtmpcqijjA/model-136d1a029cf5.hpp:368:63: error: no matching function for call to ‘laplace_marginal_poisson_log_lpmf<false>(const std::vector<int>&, const std::vector<int>&, const Eigen::Map<Eigen::Matrix<double, -1, 1>, 0, Eigen::Stride<0, 0> >&, disease_map_ela_model_namespace::K_functor__, Eigen::Matrix<stan::math::var_value<double>, -1, 1>&, const std::vector<Eigen::Matrix<double, -1, 1> >&, const std::vector<double, std::allocator<double> >&, const std::vector<int>&, const Eigen::Map<Eigen::Matrix<double, -1, 1>, 0, Eigen::Stride<0, 0> >&, std::ostream*&)’
           stan::
math::laplace_marginal_poisson_log_lpmf<false>(y, n_samples,
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
             ye, K_functor__(), phi, x, delta, delta_int, theta_0, pstream__));
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from stan/lib/stan_math/stan/math/laplace/laplace.hpp:5:0,
                 from stan/lib/stan_math/stan/math/rev.hpp:13,
                 from stan/lib/stan_math/stan/math.hpp:19,
                 from stan/src/stan/model/model_header.hpp:4:
stan/lib/stan_math/stan/math/laplace/laplace_marginal_poisson_log.hpp:39:6: note: candidate: template<class T0, class T1, class K> T1 stan::math::laplace_marginal_poisson_log_lpmf(const std::vector<int>&, const std::vector<int>&, const K&, const Eigen::Matrix<RhsScalar, -1, 1>&, const std::vector<Eigen::Matrix<double, -1, 1> >&, const std::vector<double, std::allocator<double> >&, const std::vector<int>&, const Eigen::Matrix<Scalar, -1, 1>&, std::ostream*, double, long int)
   T1 laplace_marginal_poisson_log_lpmf
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
stan/lib/stan_math/stan/math/laplace/laplace_marginal_poisson_log.hpp:39:6: note:   template argument deduction/substitution failed:
stan/lib/stan_math/stan/math/laplace/laplace_marginal_poisson_log.hpp:58:6: note: candidate: template<class T0, class T1, class K> T1 stan::math::laplace_marginal_poisson_log_lpmf(const std::vector<int>&, const std::vector<int>&, const VectorXd&, const K&, const Eigen::Matrix<RhsScalar, -1, 1>&, const std::vector<Eigen::Matrix<double, -1, 1> >&, const std::vector<double, std::allocator<double> >&, const std::vector<int>&, const Eigen::Matrix<Scalar, -1, 1>&, std::ostream*, double, long int)
   T1 laplace_marginal_poisson_log_lpmf
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
stan/lib/stan_math/stan/math/laplace/laplace_marginal_poisson_log.hpp:58:6: note:   template argument deduction/substitution failed:

make: *** [/tmp/RtmpcqijjA/model-136d1a029cf5] Error 1

It said the error comes from couldn't find the right argument substitution but I am not sure whether it is something related to the installation. Thanks for the help in advance.

Hi,
Thanks for reporting the issue. I'm currently writing an updated notebook which uses a more recent prototype and a more stable installation procedure. The new notebook will be released in a few days. I recommend waiting for the updated version.

A draft of the new notebook is now available on GitHub. I'm releasing it publically for a two weeks trial during which we'll collect feedback. You can follow the installation instructions on the ReadMe and report any issue you encounter.

Thank you for your prompt reply! I will definitely try it out