stan-dev / stan-dev/stanc3

add switch to enable threading (+ MPI?)

Open
#1,405 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
OCaml
Stars
160
Forks
59
Avg merge
21h 45m
Merged PRs (30d)
26

Description

Summary:

Right now it is a matter of specifying appropriate compile time defines like -DSTAN_THREADS in order to switch threading support on. We should consider changing stanc to have an option which turns on threading independent of compiler settings.

Description:

I guess all what we need to do is to add into the services a flag which will then cause the parser to output at the right position a #define STAN_THREADS.

The same logic can be applied to MPI (and possibly GPU).

The goal is to have a consistent way for the interfaces to request threading being enabled.

Reproducible Steps:

NA

Current Output:

NA

Expected Output:

NA

Additional Information:

Provide any additional information here.

Current Version:

v2.18.0

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 tracing stanc's services and parser output generation to find where compiler options are handled and defines are emitted. Done means an interface option can consistently request threading support without manual compiler defines; determine separately whether MPI or GPU support belongs in the same change.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
compilers
Issue type
Feature
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.