I discussed the issue with Sebastien and it isn't a good idea to use an option of the preprocessor. In order to integrate the codes developed by Georges, we suggest to implement the following options, inside the *.mod file and that should be recognized and handled by the preprossor.
- AIM for triggering the use of the AIM algorithm in stoch_simul and estimation - perturb_dll (instead of k_order) for the use of perturbation.dll in stoch_simul and estimation. order > 2 should force perturb_dll in stoch_simul. perturb_dll should request that the Jacobian and Hessian be stored in full matrices rather than sparse ones.
I will come back on the issue of the model DLL in another message.
Best
Michel
Quoting Michel Juillard Michel.Juillard@ens.fr:
For the Matlab functions it is clearly superior to get a sparse Hessian from the DLL.
On the other hand, perturbation DLL doesn't use sparse code for the time being, so maybe the optimal solution is for the preprocessor to make a different DLL if perturbation.dll is called and avoid perturbation.dll and dynamic.dll to pass Matlab matrices (sparse or non sparse).
Sebastien, can you add an option to the preprocessor whether static and dynamic DLLs return full or sparse matrices?
Best
Michel
Quoting "G. Perendia" george@perendia.orangehome.co.uk:
I already committed the change but you may revoke it back once sparse hessian is coming back from the DLL.
However, I have to say, it would have been rather more difficult to read a sparse hessian from dynamic_DLL into the k-Order perturbation.dll. I.e.,
for
Dynare++ integration we already assume and use the plain 2D matrix hessian
I will then also need to make some changes once I know how it is going to be returned.
Best regards
George Perendia Tel.: 02072815392 Mob: 07951415480 ----- Original Message ----- From: "Sébastien Villemot" sebastien.villemot@ens.fr To: dev@dynare.org Sent: Tuesday, April 07, 2009 1:50 PM Subject: Re: [DynareDev] Sparse Hessian
"G. Perendia" george@perendia.orangehome.co.uk a écrit :
PS: The below sparse Hessian issue occurs when one uses the use_dll option - i.e. the hessian from compiled <mod>_dynamic.dll is not sparse
but
the one from the matlab version <mod>_dynamic.m is.
However, the solution I suggested below works in both cases
This is indeed an old issue that I need to fix in the preprocessor. I think it is better to fix it there rather than in the M-files. I will do the fix tonight or tomorrow.
Best
-- Sébastien Villemot
Dev mailing list Dev@dynare.org http://www.dynare.org/cgi-bin/mailman/listinfo/dev
Dev mailing list Dev@dynare.org http://www.dynare.org/cgi-bin/mailman/listinfo/dev
--
Dev mailing list Dev@dynare.org http://www.dynare.org/cgi-bin/mailman/listinfo/dev