Operating System: MacOS 10.13.6
Interface Version: ScalaStan 0.5.11
Compiler/Toolkit:
We would like to use Stan with a large-scale Java project so the obvious choice is the ScalaStan interface. While this works nicely, I noticed some things that are less than ideal in a server setting.
The first thing is an artifact of ScalaStan being an interface to CommandStan’s generated model executable, that is, it will create and use R data files and Sample output CSV files.
The second thing is that when running ScalaStan (i.e. model.compile.withData().run()) with the same seed in multiple threads, errors start to pop up. I suspect this might be an issue because the seed value is part of the sample output file name, but I don’t know for sure.
Ideally we would like all the benefits ScalaStan brings without it writing and reading from files. I suspect the only current way to not use R or Sample.csv files would be to use the stanc C++ output directly (with a JNI interface). Is that correct?