Supporting Eigen & FFTW when STAN_THREADS is enabled
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 839
- Forks
- 220
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 14
Description
Description:
The FFTW library can be used seamlessly with Eigen and their FFT implementation which makes everything simple to use with Stan. Using FFTW has proven to yield huge speedups in our model.
There is however a problem when using threading. When using fftw in multi-threaded applications, you need to call fftw_make_planner_thread_safe(); once before calling fft().
Which means I need to add
#ifdef EIGEN_FFTW_DEFAULT
fftw_make_planner_thread_safe();
#endif
in main() of cmdstan.
Do we think this might be worth adding for all users? Or is this too niche?
Current Version:
v2.33.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue points to cmdstan's main() and the fftw_make_planner_thread_safe() call when EIGEN_FFTW_DEFAULT and STAN_THREADS are enabled. Start by tracing how these flags reach the executable and how FFTW initialization is handled. Done means the supported behavior for this configuration is decided and validated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100