cmdstanr icon indicating copy to clipboard operation
cmdstanr copied to clipboard

Remove stanc flags munging for `cpp_options$stan_opencl`

Open WardBrian opened this issue 5 months ago • 1 comments

This code: https://github.com/stan-dev/cmdstanr/blob/edccf2d2f6449e7d80626a3ee6cc93845e82915b/R/model.R#L538-L540

Is redundant with the logic already in the cmdstan makefiles: https://github.com/stan-dev/cmdstan/blob/b2d14a30df8a843115aae9045ff5c01a031561e7/make/program#L59-L62

And is generating invalid calls to stanc3, see https://discourse.mc-stan.org/t/cannot-complile-and-then-use-gpu/40315

WardBrian avatar Sep 04 '25 13:09 WardBrian

After chatting with @WardBrian, we're going to hold off on changing this in cmdstanr and probably fix it in the compiler via https://github.com/stan-dev/stanc3/pull/1541 or maybe in the cmdstan makefiles.

jgabry avatar Sep 11 '25 15:09 jgabry

In 2.38, stanc will just ignore repeated flags, so this is resolved

WardBrian avatar Jan 06 '26 16:01 WardBrian

Great, thanks!

jgabry avatar Jan 06 '26 16:01 jgabry