stan-dev / stan-dev/rstan

Ternary operation on Windows 7 not compiling with 2.17.2

Open
#481 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
1.1k
Forks
266
Avg merge
2h 56m
Merged PRs (30d)
1

Description

Summary:

Ternary operation on Windows not compiling with 2.17.2

Description:

I'm getting the error below on Windows. Everything else on Stan seems to compile fine for me. As a sanity check I ran the same code on pystan 2.17.1.0 on Linux and it compiled fine (in the 2.17.1, did not compile in 2.17.0).

Reproducible Steps:
library(rstan)

devtools::session_info("rstan")

injected_data = list(
   
   y = 5
)

model_to_use = "
   data {
     real y; 
   }
   parameters {
      real a;
      real b;
   }
   model {
      target += (y==0) ? a : b; 
   }

"


#FIT THE MODEL
fit = stan(
   model_code = model_to_use,
   data = injected_data,
   iter = 500,
   chains = 1
)
Current Output:

source('~/workspace/rstan_applications/XXX/ternary.R')
In file included from C:/Program Files/R/R-3.4.3/library/BH/include/boost/config.hpp:39:0,
from C:/Program Files/R/R-3.4.3/library/BH/include/boost/math/tools/config.hpp:13,
from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math/rev/core/var.hpp:7,
from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math/rev/core/gevv_vvv_vari.hpp:5,
from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math/rev/core.hpp:12,
from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math/rev/mat.hpp:4,
from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math.hpp:4,
from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/src/stan/model/model_header.hpp:4,
from file1fb82c0c6a77.cpp:8:
C:/Program Files/R/R-3.4.3/library/BH/include/boost/config/compiler/gcc.hpp:186:0: warning: "BOOST_NO_CXX11_RVALUE_REFERENCES" redefined

define BOOST_NO_CXX11_RVALUE_REFERENCES

^
:0:0: note: this is the location of the previous definition
In file included from C:/Program Files/R/R-3.4.3/library/BH/include/boost/multi_array/base.hpp:28:0,
from C:/Program Files/R/R-3.4.3/library/BH/include/boost/multi_array.hpp:21,
from C:/Program Files/R/R-3.4.3/library/BH/include/boost/numeric/odeint/util/multi_array_adaption.hpp:29,
from C:/Program Files/R/R-3.4.3/library/BH/include/boost/numeric/odeint.hpp:61,
from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math/prim/arr/functor/integrate_ode_rk45.hpp:17,
from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math/prim/arr.hpp:38,
from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math/prim/mat.hpp:298,
from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math/rev/mat.hpp:12,
from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math.hpp:4,
from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/src/stan/model/model_header.hpp:4,
from file1fb82c0c6a77.cpp:8:
C:/Program Files/R/R-3.4.3/library/BH/include/boost/multi_array/concept_checks.hpp: In static member function 'static void boost::multi_array_concepts::detail::idgen_helper::call(Array&, const IdxGen&, Call_Type)':
C:/Program Files/R/R-3.4.3/library/BH/include/boost/multi_array/concept_checks.hpp:42:43: warning: typedef 'index_range' locally defined but not used [-Wunused-local-typedefs]
typedef typename Array::index_range index_range;
^
C:/Program Files/R/R-3.4.3/library/BH/include/boost/multi_array/concept_checks.hpp:43:37: warning: typedef 'index' locally defined but not used [-Wunused-local-typedefs]
typedef typename Array::index index;
^
C:/Program Files/R/R-3.4.3/library/BH/include/boost/multi_array/concept_checks.hpp: In static member function 'static void boost::multi_array_concepts::detail::idgen_helper<0ull>::call(Array&, const IdxGen&, Call_Type)':
C:/Program Files/R/R-3.4.3/library/BH/include/boost/multi_array/concept_checks.hpp:53:43: warning: typedef 'index_range' locally defined but not used [-Wunused-local-typedefs]
typedef typename Array::index_range index_range;
^
C:/Program Files/R/R-3.4.3/library/BH/include/boost/multi_array/concept_checks.hpp:54:37: warning: typedef 'index' locally defined but not used [-Wunused-local-typedefs]
typedef typename Array::index index;
^
In file included from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math/prim/mat/fun/promote_scalar.hpp:4:0,
from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math/prim/mat.hpp:174,
from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math/rev/mat.hpp:12,
from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math.hpp:4,
from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/src/stan/model/model_header.hpp:4,
from file1fb82c0c6a77.cpp:8:
C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math/prim/scal/fun/promote_scalar.hpp: In instantiation of 'static T stan::math::promote_scalar_struct<T, S>::apply(S) [with T = double; S = stan::math::var]':
C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math/prim/scal/fun/promote_scalar.hpp:68:50: required from 'typename stan::math::promote_scalar_type<T, S>::type stan::math::promote_scalar(const S&) [with T = double; S = stan::math::var; typename stan::math::promote_scalar_type<T, S>::type = double]'
file1fb82c0c6a77.cpp:196:83: required from 'T__ model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4_namespace::model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4::log_prob(std::vector&, std::vector&, std::ostream*) const [with bool propto__ = true; bool jacobian__ = true; T__ = stan::math::var; std::ostream = std::basic_ostream]'
C:/Program Files/R/R-3.4.3/library/StanHeaders/include/src/stan/model/log_prob_grad.hpp:45:39: required from 'double stan::model::log_prob_grad(const M&, std::vector&, std::vector&, std::vector&, std::ostream*) [with bool propto = true; bool jacobian_adjust_transform = true; M = model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4_namespace::model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4; std::ostream = std::basic_ostream]'
C:/Program Files/R/R-3.4.3/library/rstan/include/rstan/stan_fit.hpp:1164:99: required from 'SEXPREC* rstan::stan_fit<Model, RNG_t>::grad_log_prob(SEXP, SEXP) [with Model = model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4_namespace::model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4; RNG_t = boost::random::additive_combine_engine<boost::random::linear_congruential_engine<unsigned int, 40014u, 0u, 2147483563u>, boost::random::linear_congruential_engine<unsigned int, 40692u, 0u, 2147483399u> >; SEXP = SEXPREC*]'
file1fb82c0c6a77.cpp:376:170: required from here
C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math/prim/scal/fun/promote_scalar.hpp:32:19: error: invalid cast from type 'stan::math::var' to type 'double'
return T(x);
^
C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math/prim/scal/fun/promote_scalar.hpp: In static member function 'static T stan::math::promote_scalar_struct<T, S>::apply(S) [with T = double; S = stan::math::var]':
C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math/prim/scal/fun/promote_scalar.hpp:33:7: warning: control reaches end of non-void function [-Wreturn-type]
}
^
In file included from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math/rev/core/operator_unary_plus.hpp:7:0,
from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math/rev/core.hpp:36,
from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math/rev/mat.hpp:4,
from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math.hpp:4,
from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/src/stan/model/model_header.hpp:4,
from file1fb82c0c6a77.cpp:8:
C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math/prim/scal/fun/constants.hpp: At global scope:
C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math/prim/scal/fun/constants.hpp:65:18: warning: 'stan::math::NEGATIVE_EPSILON' defined but not used [-Wunused-variable]
const double NEGATIVE_EPSILON
^
In file included from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math/rev/core.hpp:44:0,
from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math/rev/mat.hpp:4,
from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math.hpp:4,
from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/src/stan/model/model_header.hpp:4,
from file1fb82c0c6a77.cpp:8:
C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math/rev/core/set_zero_all_adjoints.hpp:14:17: warning: 'void stan::math::set_zero_all_adjoints()' defined but not used [-Wunused-function]
static void set_zero_all_adjoints() {
^
make: *** [file1fb82c0c6a77.o] Error 1
Warning message:
running command 'make -f "C:/PROGRA1/R/R-341.3/etc/x64/Makeconf" -f "C:/PROGRA1/R/R-341.3/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="file1fb82c0c6a77.dll" WIN=64 TCLBIN=64 OBJECTS="file1fb82c0c6a77.o"' had status 2

ERROR(s) during compilation: source code errors or compiler configuration errors!

Program source:
1:
2: // includes from the plugin
3:
4:
5: // user includes
6: #define STAN__SERVICES__COMMAND_HPP// Code generated by Stan version 2.17.0
7:
8: #include <stan/model/model_header.hpp>
9:
10: namespace model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4_namespace {
11:
12: using std::istream;
13: using std::string;
14: using std::stringstream;
15: using std::vector;
16: using stan::io::dump;
17: using stan::math::lgamma;
18: using stan::model::prob_grad;
19: using namespace stan::math;
20:
21: typedef Eigen::Matrix<double,Eigen::Dynamic,1> vector_d;
22: typedef Eigen::Matrix<double,1,Eigen::Dynamic> row_vector_d;
23: typedef Eigen::Matrix<double,Eigen::Dynamic,Eigen::Dynamic> matrix_d;
24:
25: static int current_statement_begin__;
26:
27: stan::io::program_reader prog_reader__() {
28: stan::io::program_reader reader;
29: reader.add_event(0, 0, "start", "model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4");
30: reader.add_event(12, 12, "end", "model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4");
31: return reader;
32: }
33:
34: class model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4 : public prob_grad {
35: private:
36: double y;
37: public:
38: model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4(stan::io::var_context& context__,
39: std::ostream* pstream__ = 0)
40: : prob_grad(0) {
41: ctor_body(context__, 0, pstream__);
42: }
43:
44: model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4(stan::io::var_context& context__,
45: unsigned int random_seed__,
46: std::ostream* pstream__ = 0)
47: : prob_grad(0) {
48: ctor_body(context__, random_seed__, pstream__);
49: }
50:
51: void ctor_body(stan::io::var_context& context__,
52: unsigned int random_seed__,
53: std::ostream* pstream__) {
54: boost::ecuyer1988 base_rng__ =
55: stan::services::util::create_rng(random_seed__, 0);
56: (void) base_rng__; // suppress unused var warning
57:
58: current_statement_begin__ = -1;
59:
60: static const char* function__ = "model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4_namespace::model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4";
61: (void) function__; // dummy to suppress unused var warning
62: size_t pos__;
63: (void) pos__; // dummy to suppress unused var warning
64: std::vector vals_i__;
65: std::vector vals_r__;
66: double DUMMY_VAR__(std::numeric_limits::quiet_NaN());
67: (void) DUMMY_VAR__; // suppress unused var warning
68:
69: // initialize member variables
70: try {
71: current_statement_begin__ = 3;
72: context__.validate_dims("data initialization", "y", "double", context__.to_vec());
73: y = double(0);
74: vals_r__ = context__.vals_r("y");
75: pos__ = 0;
76: y = vals_r__[pos__++];
77:
78: // validate, data variables
79: current_statement_begin__ = 3;
80: // initialize data variables
81:
82:
83: // validate transformed data
84:
85: // validate, set parameter ranges
86: num_params_r__ = 0U;
87: param_ranges_i__.clear();
88: current_statement_begin__ = 6;
89: ++num_params_r__;
90: current_statement_begin__ = 7;
91: ++num_params_r__;
92: } catch (const std::exception& e) {
93: stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__());
94: // Next line prevents compiler griping about no return
95: throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ");
96: }
97: }
98:
99: ~model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4() { }
100:
101:
102: void transform_inits(const stan::io::var_context& context__,
103: std::vector& params_i__,
104: std::vector& params_r__,
105: std::ostream
pstream__) const {
106: stan::io::writer writer__(params_r__,params_i__);
107: size_t pos__;
108: (void) pos__; // dummy call to supress warning
109: std::vector vals_r__;
110: std::vector vals_i__;
111:
112: if (!(context__.contains_r("a")))
113: throw std::runtime_error("variable a missing");
114: vals_r__ = context__.vals_r("a");
115: pos__ = 0U;
116: context__.validate_dims("initialization", "a", "double", context__.to_vec());
117: double a(0);
118: a = vals_r__[pos__++];
119: try {
120: writer__.scalar_unconstrain(a);
121: } catch (const std::exception& e) {
122: throw std::runtime_error(std::string("Error transforming variable a: ") + e.what());
123: }
124:
125: if (!(context__.contains_r("b")))
126: throw std::runtime_error("variable b missing");
127: vals_r__ = context__.vals_r("b");
128: pos__ = 0U;
129: context__.validate_dims("initialization", "b", "double", context__.to_vec());
130: double b(0);
131: b = vals_r__[pos__++];
132: try {
133: writer__.scalar_unconstrain(b);
134: } catch (const std::exception& e) {
135: throw std::runtime_error(std::string("Error transforming variable b: ") + e.what());
136: }
137:
138: params_r__ = writer__.data_r();
139: params_i__ = writer__.data_i();
140: }
141:
142: void transform_inits(const stan::io::var_context& context,
143: Eigen::Matrix<double,Eigen::Dynamic,1>& params_r,
144: std::ostream
pstream__) const {
145: std::vector params_r_vec;
146: std::vector params_i_vec;
147: transform_inits(context, params_i_vec, params_r_vec, pstream__);
148: params_r.resize(params_r_vec.size());
149: for (int i = 0; i < params_r.size(); ++i)
150: params_r(i) = params_r_vec[i];
151: }
152:
153:
154: template <bool propto__, bool jacobian__, typename T__>
155: T__ log_prob(vector<T__>& params_r__,
156: vector& params_i__,
157: std::ostream
pstream__ = 0) const {
158:
159: T__ DUMMY_VAR__(std::numeric_limits::quiet_NaN());
160: (void) DUMMY_VAR__; // suppress unused var warning
161:
162: T__ lp__(0.0);
163: stan::math::accumulator<T__> lp_accum__;
164:
165: try {
166: // model parameters
167: stan::io::reader<T__> in__(params_r__,params_i__);
168:
169: T__ a;
170: (void) a; // dummy to suppress unused var warning
171: if (jacobian__)
172: a = in__.scalar_constrain(lp__);
173: else
174: a = in__.scalar_constrain();
175:
176: T__ b;
177: (void) b; // dummy to suppress unused var warning
178: if (jacobian__)
179: b = in__.scalar_constrain(lp__);
180: else
181: b = in__.scalar_constrain();
182:
183:
184: // transformed parameters
185:
186:
187:
188: // validate transformed parameters
189:
190: const char* function__ = "validate transformed params";
191: (void) function__; // dummy to suppress unused var warning
192:
193: // model body
194:
195: current_statement_begin__ = 10;
196: lp_accum__.add((logical_eq(y,0) ? stan::math::promote_scalar(a) : stan::math::promote_scalar(b) ));
197:
198: } catch (const std::exception& e) {
199: stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__());
200: // Next line prevents compiler griping about no return
201: throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ");
202: }
203:
204: lp_accum__.add(lp__);
205: return lp_accum__.sum();
206:
207: } // log_prob()
208:
209: template <bool propto, bool jacobian, typename T_>
210: T_ log_prob(Eigen::Matrix<T_,Eigen::Dynamic,1>& params_r,
211: std::ostream
pstream = 0) const {
212: std::vector<T_> vec_params_r;
213: vec_params_r.reserve(params_r.size());
214: for (int i = 0; i < params_r.size(); ++i)
215: vec_params_r.push_back(params_r(i));
216: std::vector vec_params_i;
217: return log_prob<propto,jacobian,T_>(vec_params_r, vec_params_i, pstream);
218: }
219:
220:
221: void get_param_names(std::vectorstd::string& names__) const {
222: names__.resize(0);
223: names__.push_back("a");
224: names__.push_back("b");
225: }
226:
227:
228: void get_dims(std::vector<std::vector<size_t> >& dimss__) const {
229: dimss__.resize(0);
230: std::vector<size_t> dims__;
231: dims__.resize(0);
232: dimss__.push_back(dims__);
233: dims__.resize(0);
234: dimss__.push_back(dims__);
235: }
236:
237: template
238: void write_array(RNG& base_rng__,
239: std::vector& params_r__,
240: std::vector& params_i__,
241: std::vector& vars__,
242: bool include_tparams__ = true,
243: bool include_gqs__ = true,
244: std::ostream
pstream__ = 0) const {
245: vars__.resize(0);
246: stan::io::reader in__(params_r__,params_i__);
247: static const char
function__ = "model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4_namespace::write_array";
248: (void) function__; // dummy to suppress unused var warning
249: // read-transform, write parameters
250: double a = in__.scalar_constrain();
251: double b = in__.scalar_constrain();
252: vars__.push_back(a);
253: vars__.push_back(b);
254:
255: if (!include_tparams__) return;
256: // declare and define transformed parameters
257: double lp__ = 0.0;
258: (void) lp__; // dummy to suppress unused var warning
259: stan::math::accumulator lp_accum__;
260:
261: double DUMMY_VAR__(std::numeric_limits::quiet_NaN());
262: (void) DUMMY_VAR__; // suppress unused var warning
263:
264: try {
265:
266:
267:
268: // validate transformed parameters
269:
270: // write transformed parameters
271:
272: if (!include_gqs__) return;
273: // declare and define generated quantities
274:
275:
276:
277: // validate generated quantities
278:
279: // write generated quantities
280: } catch (const std::exception& e) {
281: stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__());
282: // Next line prevents compiler griping about no return
283: throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ");
284: }
285: }
286:
287: template
288: void write_array(RNG& base_rng,
289: Eigen::Matrix<double,Eigen::Dynamic,1>& params_r,
290: Eigen::Matrix<double,Eigen::Dynamic,1>& vars,
291: bool include_tparams = true,
292: bool include_gqs = true,
293: std::ostream
pstream = 0) const {
294: std::vector params_r_vec(params_r.size());
295: for (int i = 0; i < params_r.size(); ++i)
296: params_r_vec[i] = params_r(i);
297: std::vector vars_vec;
298: std::vector params_i_vec;
299: write_array(base_rng,params_r_vec,params_i_vec,vars_vec,include_tparams,include_gqs,pstream);
300: vars.resize(vars_vec.size());
301: for (int i = 0; i < vars.size(); ++i)
302: vars(i) = vars_vec[i];
303: }
304:
305: static std::string model_name() {
306: return "model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4";
307: }
308:
309:
310: void constrained_param_names(std::vectorstd::string& param_names__,
311: bool include_tparams__ = true,
312: bool include_gqs__ = true) const {
313: std::stringstream param_name_stream__;
314: param_name_stream__.str(std::string());
315: param_name_stream__ << "a";
316: param_names__.push_back(param_name_stream__.str());
317: param_name_stream__.str(std::string());
318: param_name_stream__ << "b";
319: param_names__.push_back(param_name_stream__.str());
320:
321: if (!include_gqs__ && !include_tparams__) return;
322:
323: if (!include_gqs__) return;
324: }
325:
326:
327: void unconstrained_param_names(std::vectorstd::string& param_names__,
328: bool include_tparams__ = true,
329: bool include_gqs__ = true) const {
330: std::stringstream param_name_stream__;
331: param_name_stream__.str(std::string());
332: param_name_stream__ << "a";
333: param_names__.push_back(param_name_stream__.str());
334: param_name_stream__.str(std::string());
335: param_name_stream__ << "b";
336: param_names__.push_back(param_name_stream__.str());
337:
338: if (!include_gqs__ && !include_tparams__) return;
339:
340: if (!include_gqs__) return;
341: }
342:
343: }; // model
344:
345: }
346:
347: typedef model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4_namespace::model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4 stan_model;
348:
349: #include <rstan/rstaninc.hpp>
350: /

351: * Define Rcpp Module to expose stan_fit's functions to R.
352: */
353: RCPP_MODULE(stan_fit4model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4_mod){
354: Rcpp::class_<rstan::stan_fit<model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4_namespace::model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4,
355: boost::random::ecuyer1988> >("stan_fit4model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4")
356: // .constructorRcpp::List()
357: .constructor<SEXP, SEXP, SEXP>()
358: // .constructor<SEXP, SEXP>()
359: .method("call_sampler",
360: &rstan::stan_fit<model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4_namespace::model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4, boost::random::ecuyer1988>::call_sampler)
361: .method("param_names",
362: &rstan::stan_fit<model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4_namespace::model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4, boost::random::ecuyer1988>::param_names)
363: .method("param_names_oi",
364: &rstan::stan_fit<model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4_namespace::model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4, boost::random::ecuyer1988>::param_names_oi)
365: .method("param_fnames_oi",
366: &rstan::stan_fit<model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4_namespace::model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4, boost::random::ecuyer1988>::param_fnames_oi)
367: .method("param_dims",
368: &rstan::stan_fit<model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4_namespace::model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4, boost::random::ecuyer1988>::param_dims)
369: .method("param_dims_oi",
370: &rstan::stan_fit<model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4_namespace::model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4, boost::random::ecuyer1988>::param_dims_oi)
371: .method("update_param_oi",
372: &rstan::stan_fit<model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4_namespace::model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4, boost::random::ecuyer1988>::update_param_oi)
373: .method("param_oi_tidx",
374: &rstan::stan_fit<model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4_namespace::model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4, boost::random::ecuyer1988>::param_oi_tidx)
375: .method("grad_log_prob",
376: &rstan::stan_fit<model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4_namespace::model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4, boost::random::ecuyer1988>::grad_log_prob)
377: .method("log_prob",
378: &rstan::stan_fit<model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4_namespace::model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4, boost::random::ecuyer1988>::log_prob)
379: .method("unconstrain_pars",
380: &rstan::stan_fit<model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4_namespace::model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4, boost::random::ecuyer1988>::unconstrain_pars)
381: .method("constrain_pars",
382: &rstan::stan_fit<model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4_namespace::model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4, boost::random::ecuyer1988>::constrain_pars)
383: .method("num_pars_unconstrained",
384: &rstan::stan_fit<model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4_namespace::model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4, boost::random::ecuyer1988>::num_pars_unconstrained)
385: .method("unconstrained_param_names",
386: &rstan::stan_fit<model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4_namespace::model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4, boost::random::ecuyer1988>::unconstrained_param_names)
387: .method("constrained_param_names",
388: &rstan::stan_fit<model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4_namespace::model1fb837373e6_d8fb5a4b005b985fd6da85b66601bbe4, boost::random::ecuyer1988>::constrained_param_names)
389: ;
390: }
391:
392: // declarations
393: extern "C" {
394: SEXP file1fb82c0c6a77( ) ;
395: }
396:
397: // definition
398:
399: SEXP file1fb82c0c6a77( ){
400: return Rcpp::wrap("d8fb5a4b005b985fd6da85b66601bbe4");
401: }
402:
403:
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! In file included from C:/Program Files/R/R-3.4.3/library/BH/include/boost/config.hpp:39:0,
from C:/Program Files/R/R-3.4.3/library/BH/include/boost/math/tools/config.hpp:13,
from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math/rev/core/var.hpp:7,
from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math/rev/core/gevv_vvv_vari.hpp:5,
from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math/rev/core.hpp:12,
from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math/rev/mat.hpp:4,
from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/stan/math.hpp:4,
from C:/Program Files/R/R-3.4.3/library/StanHeaders/include/src/stan/model/model_header.hpp:4,
from file1fb82c0c6a77.cpp:8:
C:/Program Files/R/R-3.4.3/library/BH/include/boost/config/comp
In addition: Warning message:
running command 'C:/PROGRA1/R/R-341.3/bin/x64/R CMD SHLIB file1fb82c0c6a77.cpp 2> file1fb82c0c6a77.cpp.err.txt' had status 1

Expected Output:

Compiles

RStan Version:

packageVersion("rstan")
[1] ‘2.17.2’

R Version:

R.version.string
[1] "R version 3.4.3 (2017-11-30)"

Operating System:

Windows 7

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the model in the reported ternary.R script on Windows 7 with rstan 2.17.2, then inspect the generated C++ around the reported promote_scalar.hpp error. Compare the behavior with the stated Linux and rstan 2.17.1 results; done means the ternary model compiles successfully on the affected Windows setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, r
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.