… I think we need to revise our test platforms to get threading properly tested. We just broke threading support under clang in develop due to this part not being tested. This is due to a complicated situation:
Travis only has a super old Linux Ubuntu LTS 14.04 which causes a ton of problems => we can test things with g++, but not with clang (which needs extra hacks which we do not ship at the moment with stan-math as its beyond me to reliably configure the build system to detect systems which need this fix apparently needed for 14.04).
our Jenkins runs with a pre-2016 clang Apple compiler which does not support the C++11
thread_localkeyword. Hence, we cannot test on the Jenkins box any of the threading stuff.
So much for the background. A solution from my angle would be to use on the Jenkins box an open-source clang which does support the
thread_local keyword. My suggestion here would be to use the so-called clang4 as used for CRAN binaries for macosx. Would others agree on that this is a good idea to switch the target compiler on macos to the clang4?
On an additional note I wonder what our policy is for supported compilers. That is, with the threading I am running into all sorts of walls as travis shipping too old distributions, compiler having bugs, etc… It is really hard for me to digest all this and even harder to get a handle on systems which I do not have access to. I have started to download virtualbox to have a chance to understand this, but honestly, I do not really like to go down that route unless we decide that’s needed. I mean, it is a lot to expect from me to juggle virtualbox LTS images in order to run tests - my opinion.
Threading is super important, but this feature does not fly on all compilers/os combinations equally well. How can we deal with that in a way that makes development easy for us?
Any thoughts here would be helpful. The goal is to find a good solution for developers and users.