I had problems with hessian when I used mode_compute=4, so I changed to mode_compute=5, but I get this message:
Error using reshape
To RESHAPE the number of elements must not change.
Error in newrat (line 160)
hhx = reshape(dum,nx,nx);
Error in dynare_minimize_objective (line 255)