Dear everyone:
I have installed cmdstanr and Torsten 0.91.2. When I tried to execute the test example, the error occurred, as shown below:
C:/rtools45/x86_64-w64-mingw32.static.posix/lib/gcc/x86_64-w64-mingw32.static.posix/14.2.0/include/c++/cstdlib:141:11: error: 'at_quick_exit' has not been declared in '::'
141 | using ::at_quick_exit;
| ^~~~~~~~~~~~~C:/rtools45/x86_64-w64-mingw32.static.posix/lib/gcc/x86_64-w64-mingw32.static.posix/14.2.0/include/c++/cstdlib:164:11: error: 'quick_exit' has not been declared in '::'
164 | using ::quick_exit;
| ^~~~~~~~~~
C:/rtools45/x86_64-w64-mingw32.static.posix/lib/gcc/x86_64-w64-mingw32.static.posix/14.2.0/include/c++/stdlib.h:43:14: error: 'at_quick_exit' has not been declared in 'std'
43 | using std::at_quick_exit;
| ^~~~~~~~~~~~~
C:/rtools45/x86_64-w64-mingw32.static.posix/lib/gcc/x86_64-w64-mingw32.static.posix/14.2.0/include/c++/stdlib.h:46:14: error: 'quick_exit' has not been declared in 'std'
46 | using std::quick_exit;
| ^~~~~~~~~~
cc1plus.exe: note: unrecognized command-line option '-Wno-unknown-warning-option' may have been intended to silence earlier diagnosticsmingw32-make[1]: *** [C:/Users/LENOVO/.cmdstan/Torsten/cmdstan/stan/lib/stan_math/lib/tbb_2020.3/build/Makefile.tbbmalloc:65: backend.o] Error 1
mingw32-make: *** [stan/lib/stan_math/make/libraries:187: stan/lib/stan_math/lib/tbb/tbbmalloc.def] Error 2
The R scriptes were as follows:
library("cmdstanr")
set_cmdstan_path("C:/Users/LENOVO/.cmdstan/Torsten/cmdstan")
file.dir <- file.path("C:/Users/LENOVO/.cmdstan/Torsten", "example-models", "pk2cpt")
file <- file.path(file.dir, "pk2cpt.stan")
model <- cmdstan_model(file)
How can I solve this problem?
Operating System: windows 11
Interface Version: R studio 5 R 4.5.1
Compiler/Toolkit: cmdstanr Torsten
Looking forward to your replies!
Hi, are you able to use regular CmdStan using the directions here to run the bernoulli model? If so, then try that model with the Stan+Torsten installation. If not, then there’s likely an issue running on Windows. Unfortunately, I don’t have access to a Windows machine to try to debug, but I’ll bring the issue up in the next meeting of the Torsten Steering Committee.
Casey
1 Like
Hi! Thank you for your comment!
The version of regular cmdstanr is 2.36.1, and the Bernoulli model was successfully executed. I tried to use the cmdstan of Torsten’s installation package to implement the Bernoulli model, but it failed. The regular cmdstan(2.36.1) can not execute the “pk2cpt.stan“ of Torsten. What should I do next?
Ok, the only other thing I can think of is after you git cloneTorsten, you need to do something like (in the terminal) cd C:/your/path/to/Torsten/cmdstanand then mingw32-make build(I think that’s correct. It’s been a long time since I’ve worked on Windows, but it’s something like that). But to be honest, your error might be unrelated to that. If you have already or can get that make build command to work and still get errors running either the bernoulli model or pk2cpt.stan, then it’s likely an issue with the Torsten installation, and I’ll see if we can get it sorted out.
mod <- cmdstan_model(file)
Compiling Stan program...Ϣ: ṩģʽҵļ
'\"cscript /nologo /E:jscript ../tbb_2020.3/build/detect.js /arch gcc\""' ڲⲿҲǿеij
ļ'\"cscript /nologo /E:jscript ../tbb_2020.3/build/detect.js /runtime gcc\""' ڲⲿҲǿеij
ļ
../tbb_2020.3/build/common.inc:81: *** Architecture not detected. Stop.mingw32-make: *** [stan/lib/stan_math/make/libraries:187: stan/lib/stan_math/lib/tbb/tbbmalloc.def] Error 2
错误: An error occured during compilation! See the message above for more information.
The error now was shown above. How can I solve it?
if ! [[ mingw32-make =~ mingw32 ]]; then
echo “ERROR: Please use mingw32-make on Windows to build the Intel TBB library.”;
echo “This is packaged with RTools, for example.”;
exit 1;
fi
touch stan/lib/stan_math/lib/tbb/tbb-make-check
tbb_root=“../tbb_2020.3” CXX=“g++” CC=“gcc” LDFLAGS=‘-Wl,-L,“/c/Users/LENOVO/.cmdstan/Torsten/cmdstan/stan/lib/stan_math/lib/tbb” -Wl,-rpath,“/c/Users/LENOVO/.cmdstan/Torsten/cmdstan/stan/lib/stan_math/lib/tbb” ’ ‘mingw32-make’ -C “stan/lib/stan_math/lib/tbb” -r -f “/c/Users/LENOVO/.cmdstan/Torsten/cmdstan/stan/lib/stan_math/lib/tbb_2020.3/build/Makefile.tbbmalloc” compiler=none cfg=release stdver=c++1y malloc CXXFLAGS=“-Wno-unknown-warning-option -Wno-deprecated-copy -Wno-missing-attributes -Wno-class-memaccess -Wno-sized-deallocation "
mingw32-make[1]: Entering directory ‘/c/Users/LENOVO/.cmdstan/Torsten/cmdstan/stan/lib/stan_math/lib/tbb’
'“cscript /nologo /E:jscript ../tbb_2020.3/build/detect.js /arch none””’ 不是内部或外部命令,也不是可运行的程序
或批处理文件。
‘“cscript /nologo /E:jscript ../tbb_2020.3/build/detect.js /runtime none”"’ 不是内部或外部命令,也不是可运行的程序
或批处理文件。
../tbb_2020.3/build/common.inc:81: *** Architecture not detected. Stop.
mingw32-make[1]: Leaving directory ‘/c/Users/LENOVO/.cmdstan/Torsten/cmdstan/stan/lib/stan_math/lib/tbb’
mingw32-make: *** [stan/lib/stan_math/make/libraries:187: stan/lib/stan_math/lib/tbb/tbbmalloc.def] Error 2
model <- cmdstan_model(file)
Compiling Stan program...Ϣ: ṩģʽҵļ
mingw32-make: *** [make/program:14: src/cmdstan/main.o] Error 1错误: An error occured during compilation! See the message above for more information.
I do not know how to solve this prolem! I really want to study and use Torsten.
It’s a Windows issue. I’ll see if I can find someone who can help