- OS (Operating System): Linux
- CXX (Compiler): g++
- CXX_TYPE gcc
- Compiler version: 7.7
In my program I have multiple threads running stan math’s auto differentiation (AD). As the AD is not thread-safe, I get a segfault doing so. I have read about enabling threading support but I could not make it work yet.
I created the file make/local
and I added the lines
CXXFLAGS += -DSTAN_THREADS
CXXFLAGS += -pthread
What do I have to do next? Recompile Stan-Math? If so, how?
Thanks in advance!