Debugging stanify on win / cmdstanpy issue #145
tomfid
started this conversation in
people; relating
Replies: 1 comment 7 replies
-
I think the 'cut' errors are a distraction - they seem to come from a piped command, It seems like the real issue is the attempt to rm -f the .o file. The file exists, so I don't know why the attempt to delete it fails. |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I tracked the issue a little farther.
The error message arises in cmdstanpy\model.py around 563, due to an earlier failure of do_command around 530.
do_command is defined in cmdstanpy\utils\command.py, which launches a subprocess with:
cmd = ['mingw32-make', 'STANCFLAGS+=--include-paths=C:/bayes/git/stanify/vignette/stan_files/hier_preypredator', 'C:/bayes/git/stanify/vignette/stan_files/hier_preypredator/draws2data_hier_preypredator.exe']
cwd = 'C:\Users\tom\.cmdstan\cmdstan-2.31.0'
To test this I opened up a cmd prompt and ran the same thing manually:
c:\Users\tom.cmdstan>cd cmdstan-2.31.0
c:\Users\tom.cmdstan\cmdstan-2.31.0>mingw32-make STANCFLAGS+=--include-paths=C:/bayes/git/stanify/vignette/stan_files/hier_preypredator C:/bayes/git/stanify/vignette/stan_files/hier_preypredator/draws2data_hier_preypredator.exe
'cut' is not recognized as an internal or external command,
operable program or batch file.
'cut' is not recognized as an internal or external command,
operable program or batch file.
process_begin: CreateProcess(NULL, expr >= 8, ...) failed.
mingw32-make: makefile:125: pipe: Bad file descriptor
INFO: Could not find files for the given pattern(s).
''
'--- Translating Stan model to C++ code ---'
bin/stanc.exe --include-paths=C:/bayes/git/stanify/vignette/stan_files/hier_preypredator --o=C:/bayes/git/stanify/vignette/stan_files/hier_preypredator/draws2data_hier_preypredator.hpp C:/bayes/git/stanify/vignette/stan_files/hier_preypredator/draws2data_hier_preypredator.stan
''
'--- Compiling, linking C++ code ---'
g++ -std=c++1y -m64 -D_REENTRANT -Wall -Wno-unused-function -Wno-uninitialized -Wno-unused-but-set-variable -Wno-unused-variable -Wno-sign-compare -Wno-unused-local-typedefs -Wno-int-in-bool-context -Wno-attributes -Wno-ignored-attributes -I stan/lib/stan_math/lib/tbb_2020.3/include -O3 -I src -I stan/src -I stan/lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.9 -I stan/lib/stan_math/lib/boost_1.78.0 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -D_USE_MATH_DEFINES -DBOOST_DISABLE_ASSERTS -c -x c++ -o C:/bayes/git/stanify/vignette/stan_files/hier_preypredator/draws2data_hier_preypredator.o C:/bayes/git/stanify/vignette/stan_files/hier_preypredator/draws2data_hier_preypredator.hpp
g++ -std=c++1y -m64 -D_REENTRANT -Wall -Wno-unused-function -Wno-uninitialized -Wno-unused-but-set-variable -Wno-unused-variable -Wno-sign-compare -Wno-unused-local-typedefs -Wno-int-in-bool-context -Wno-attributes -Wno-ignored-attributes -I stan/lib/stan_math/lib/tbb_2020.3/include -O3 -I src -I stan/src -I stan/lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.9 -I stan/lib/stan_math/lib/boost_1.78.0 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -D_USE_MATH_DEFINES -DBOOST_DISABLE_ASSERTS -Wl,-L,"c:/Users/tom/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/tbb" -Wl,-rpath,"c:/Users/tom/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/tbb" C:/bayes/git/stanify/vignette/stan_files/hier_preypredator/draws2data_hier_preypredator.o src/cmdstan/main.o -static-libgcc -static-libstdc++ -Wl,-L,"c:/Users/tom/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/tbb" -Wl,-rpath,"c:/Users/tom/.cmdstan/cmdstan-2.31.0/stan/lib/stan_math/lib/tbb" stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_nvecserial.a stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_cvodes.a stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_idas.a stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_kinsol.a stan/lib/stan_math/lib/tbb/tbb.dll -o C:/bayes/git/stanify/vignette/stan_files/hier_preypredator/draws2data_hier_preypredator.exe
rm -f C:/bayes/git/stanify/vignette/stan_files/hier_preypredator/draws2data_hier_preypredator.o
process_begin: CreateProcess(NULL, rm -f C:/bayes/git/stanify/vignette/stan_files/hier_preypredator/draws2data_hier_preypredator.o, ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make: *** [make/program:60: C:/bayes/git/stanify/vignette/stan_files/hier_preypredator/draws2data_hier_preypredator.exe] Error 2
There seem to be multiple errors, so I'm not sure what's going on here. The weird thing is that it does end up with an .exe built, in spite of all the complaints.
Beta Was this translation helpful? Give feedback.
All reactions