r - openCPU and rstan - cannot open the connection -
i'm using opencpu create api estimate pretty basic models in rstan.
i have verified function works in environment when called normal r console session, opposed called opencpu.
but when called via opencpu, response following:
cannot open connection in call: file(con, "r")
by inserting checkpoints in source of rstan, i've traced 1 call in r/cxxfunplus.r (link line on github here):
dso <- new('cxxdso', sig = sig, dso_saved = save_dso, dso_filename = dso_filename, modulename = module_name, system = r.version$system, cxxflags = get_makefile_flags("cxxflags"), .cxxdsomisc = new.env(parent = emptyenv()))
what in call trying read connection might fail?
figured out - 1 of 2 makefiles rstan::get_makefile_txt
looking doesn't exist when run under opencpu. file /usr/share/r/share/make.
fortunately first makefile exist , sufficient, can corrected skipping second makefile , reading first.
before last line of rstan::get_makefile_text
, inserted following:
makefiles <- makefiles[file.exists(makefiles)]
Comments
Post a Comment