File tree Expand file tree Collapse file tree 3 files changed +46
-0
lines changed Expand file tree Collapse file tree 3 files changed +46
-0
lines changed Original file line number Diff line number Diff line change 3
3
4
4
#include < cmdstan/arguments/arg_method.hpp>
5
5
#include < cmdstan/arguments/argument.hpp>
6
+ #include < cmdstan/write_stan.hpp>
7
+ #include < cmdstan/write_stan_flags.hpp>
6
8
#include < stan/services/error_codes.hpp>
7
9
#include < cstring>
8
10
#include < string>
@@ -86,6 +88,11 @@ class argument_parser {
86
88
print_help (info, true );
87
89
_help_flag |= true ;
88
90
args.clear ();
91
+ } else if (cat_name == " info" ) {
92
+ _help_flag |= true ;
93
+ write_stan (info);
94
+ write_stan_flags (info);
95
+ return stan::services::error_codes::OK;
89
96
}
90
97
91
98
if (_help_flag) {
Original file line number Diff line number Diff line change 16
16
#include < cmdstan/write_parallel_info.hpp>
17
17
#include < cmdstan/write_profiling.hpp>
18
18
#include < cmdstan/write_stan.hpp>
19
+ #include < cmdstan/write_stan_flags.hpp>
19
20
#include < stan/callbacks/interrupt.hpp>
20
21
#include < stan/callbacks/logger.hpp>
21
22
#include < stan/callbacks/stream_logger.hpp>
Original file line number Diff line number Diff line change
1
+ #ifndef CMDSTAN_WRITE_STAN_FLAGS_HPP
2
+ #define CMDSTAN_WRITE_STAN_FLAGS_HPP
3
+
4
+ #include < stan/callbacks/writer.hpp>
5
+ #include < string>
6
+
7
+ namespace cmdstan {
8
+
9
+ void write_stan_flags (stan::callbacks::writer &writer) {
10
+ #ifdef STAN_THREADS
11
+ writer (" STAN_THREADS=true" );
12
+ #else
13
+ writer (" STAN_THREADS=false" );
14
+ #endif
15
+ #ifdef STAN_MPI
16
+ writer (" STAN_MPI=true" );
17
+ #else
18
+ writer (" STAN_MPI=false" );
19
+ #endif
20
+ #ifdef STAN_OPENCL
21
+ writer (" STAN_OPENCL=true" );
22
+ #else
23
+ writer (" STAN_OPENCL=false" );
24
+ #endif
25
+ #ifdef STAN_NO_RANGE_CHECKS
26
+ writer (" STAN_NO_RANGE_CHECKS=true" );
27
+ #else
28
+ writer (" STAN_NO_RANGE_CHECKS=false" );
29
+ #endif
30
+ #ifdef STAN_CPP_OPTIMS
31
+ writer (" STAN_CPP_OPTIMS=true" );
32
+ #else
33
+ writer (" STAN_CPP_OPTIMS=false" );
34
+ #endif
35
+ }
36
+
37
+ } // namespace cmdstan
38
+ #endif
You can’t perform that action at this time.
0 commit comments