Skip to content

[FR] Use new num_chains arg in cmdstan for hmc, fixed params, and generated quantities #534

@SteveBronder

Description

@SteveBronder

Is your feature request related to a problem? Please describe.

So once stan-dev/cmdstan#987 goes into cmdstan, as long as the user compiled with threading on then we should be able to run multiple chains within one Stan program by specifying num_chains inside of the sample argument!

Describe the solution you'd like

Is there a reasonable line for cmdstanr to check if the method is hmc with dense or diag_e inverse metric and then when the user specifies parallel chains, internally cmdstanr passes those as command args to cmdstan instead of using R level parallelism? This should save folks a lot of memory and likewise give a nice little speed bump.

This would also have to wait / check that cmdstanr is at least greater than version 2.27 and has compiled with threading on

Describe alternatives you've considered

I'm not familiar enough with the internals of cmdstanr to know other alts, though I'm happy to discuss whatever can work for yinz!

Additional context
Add any other context about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions