Stan is not working on GPU in Linux

It seems that g++ 9.3.0 does not like something about our OpenCL backend in 2.26.1. Its fixed on develop but that obviously wont help you there.

Run:

cmdstan_make_local(cpp_options = "CXXFLAGS += -fpermissive")
rebuild_cmdstan(cores = 4)

and then try again.

The other solution is to switch to using clang++ for now:

cmdstan_make_local(cpp_options = "CXX = clang++")
rebuild_cmdstan(cores = 4)

Sorry for the inconvenience.

3 Likes