Dynamic model derivatives

Is there any way to prevent the preprocessor from calculating the second-order dynamic model derivatives without running stoch_simul with option order=1? I just want Dynare to produce the modefile_dynamic.m with first-order derivatives. I have figured out that I can impose it by using simul(periods=1) in the mod-file, but maybe there is a more efficient way.
Any help / suggestion would be highly appreciated.


If you could tell me what you are trying to do, there might be an easier way to achieve your goal.

I am using the Occbin toolkit which uses dynamic model derivatives produced by the preprocessor and stored in the *_dynamic.m file. Some of model variants do not satisfy the B-K conditions and hence are cannot be run with stoch_simul, which seems to me the only place where imposing order=1 prevents the preprocessor from calculating 2nd order model derivatives. In my case, calculating them is harmful since the model is quite big.

Did you try to use the noprint option of stoch_simul? That should suppress any crashes and continue running the file, i.e.

Thanks a lot, Johannes! I did not know that noprint suppresses any crashes. And your solution works about twice faster than my brute-force fix.