Java heap space/OutOfMemory error (take 2)

Dear Dynare team,

last February, jpfeifer posted on the problem that with long enough MCMC chains, Java bombs because of memory problems arising from the waitbar in the MCMC step. Stephane’s solution was to use the -nojvm option. However, this only works on Unix platforms; windows doesn’t support it. Is there an equivalent option for windows, other than commenting out the waitbar code? It seems that the waitbar generates about 15 percent overhead, which is quite inefficient.
Thanks for your reply.
Pierre

Hi,
as I said in the mentioned post, there is the option to set the java.opts file. Note that the -nojvm method also works under Windows. Use “Execute” in the startbar to enter the command prompt (type “cmd”). In the command prompt, type “matlab -novjm” and matlab will start without java script.

Thanks; I did include the opts file, and it does solve the memory problem. I was just wondering whether the -nojvm command would speed things up by eliminating the waitbar window. I think an extra entry in the options_ structure that toggles the waitbar on and off would be useful, to avoid having to switch back and forth between java-enabled and disabled versions of matlab…

Dear Pierre, In the snapshot version of dynare I introduced a new option that removes the graphical waitbars and replace them
by text-based waitbars. You just have to write options_.console_mode = 1; (default is zero) before the estimation command.

It should work under windows…

Best,
Stéphane.