Do not error out in stochastic mode if mfs > 0 but “block” option not passed

In that case, the block-DR routines will not be called.
master
Sébastien Villemot 2022-10-18 17:28:25 +02:00
parent 5a6e276750
commit 219c8d2a47
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 5 additions and 2 deletions

View File

@ -369,9 +369,12 @@ ModFile::checkPass(bool nostrict, bool stochastic)
}
// See dynare#1726
if ((stochastic_statement_present || mod_file_struct.check_present) && dynamic_model.mfs > 0)
if ((stochastic_statement_present || mod_file_struct.check_present) && block && dynamic_model.mfs > 0)
{
cerr << "ERROR: mfs > 0 is incompatible with check, stoch_simul, estimation, osr, ramsey_policy, discretionary_policy, calib_smoother, identification, methods_of_moments and sensitivity commands" << endl;
/* NB: If mfs>0 but “block” is not passed, the block-DR routines will not
be called, so do not fail in that case (we may want to use the sparse
block representation) */
cerr << "ERROR: the `block` option used in conjunction with `mfs > 0` is incompatible with check, stoch_simul, estimation, osr, ramsey_policy, discretionary_policy, calib_smoother, identification, methods_of_moments and sensitivity commands" << endl;
exit(EXIT_FAILURE);
}
}