Skip to content

Commit dc0d85b

Browse files
committed
update error message for num_chains/num_threads
1 parent 2367739 commit dc0d85b

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/cmdstan/arguments/arg_num_chains.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ class arg_num_chains : public int_argument {
1010
arg_num_chains() : int_argument() {
1111
_name = "num_chains";
1212
_description = std::string("Number of chains");
13+
_validity = "num_chains > 0";
14+
_default = "1";
15+
_constrained = true;
16+
_good_value = 2.0;
17+
_bad_value = 0.0;
1318
_default = "1";
1419
_default_value = 1;
1520
_value = _default_value;

src/cmdstan/arguments/arg_num_threads.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ class arg_num_threads : public int_argument {
1010
arg_num_threads() : int_argument() {
1111
_name = "num_threads";
1212
_description = std::string("Number of threads available to the program.");
13+
_validity = "num_threads > 0 || num_threads == -1";
1314
_default = "1";
1415
_default_value = 1;
16+
_good_value = 1.0;
17+
_bad_value = -2.0;
18+
_constrained = true;
1519
_value = _default_value;
1620
}
1721
#ifdef STAN_THREADS

0 commit comments

Comments
 (0)