Possible catches in interfacing Stan with black-box software?
Suppose for instance that someone has a model expressed as some black-box software, e.g. some numerical Fortran code or proprietary binary or whatnot. Now I know that Stan can be used with external C++ code, and in principle that code could call this outside software via
exec, etc. However, from what I’ve understood, Stan also needs gradients, and that might not play so nicely with calling outside code this way. I’ve seen this issue come up in a post on the old stan-users Google group, but that post dated from 2015, and I wasn’t sure if the information there had become dated over the last couple years.
Would there be a way to make calling this black box work, or would one be better off looking at different MCMC implementations for this use case?
(The main reason I’m asking is that I’m doing some cataloging of the capabilities and limitations of various UQ software, including MCMC codes, and I want to make sure that if I’m saying that Stan isn’t good for a particular application that I’m not blowing smoke.)