Thanks Michel
I am well aware of the efficiency of sparse matrices being used for Hessian in general.
However, k-order-perturbation dll has problem in finding out what size matrix should be passed to dll to get the Hessian back in.. Not knowing the number of non-zero elements in advance can result in having to pass between two DLLs as much as 3 times larger matrix than the flat Hessian (for both data and indices) which can be rather large - and mostly empty!!
Best regards
George
----- Original Message ----- From: "Michel Juillard" michel.juillard@ens.fr To: "List for Dynare developers" dev@dynare.org Sent: Friday, June 26, 2009 7:11 AM Subject: Re: [DynareDev] 2nd and 3rd model derivatives + k-order
Hi George,
it is inefficient to pass full hessian from *_dynamic.m or *_dynamic.dll
In k_ord_dynare, one uses only non-zero elements to populate the tensors.
The details of implementation will change again in the future, but passing only non-zero elements is a step in the right direction.
All the best,
Michel
G. Perendia wrote:
Dear Sebastien
If USE_DLL is going to be discontinued why is MEX/DLL now going to return sparse matrix exclusively when its only future use is for
k-ord-perturbation
which requires full matrix. Can we than have PERTURB_DLL option now and return full hessian using the existing (old) mex/dll dynamic model (but renamed e.g. <model>_kordpert.mexXX/dll) when that option is used rather than fixing k-ordpert rather unnecessarily and poss. just temporary since
we
may revert to the full hessian returned form mex/dll once USE_DLL is abandoned.
I think to remember we initially agreed this course of action anyway. In your email from 9th April 09 you mention:
..."For your own purposes, I have understood that you need a full hessian (instead of a sparse one). Can you confirm this? If it is the case, then I shall implement the "pertub_dll" option (as suggested by Michel), so that the preprocessor gives you a full hessian in that case."
And, there are actually quite few issues to be resolved for sparse
matrices
being returned from dll. For a start, one problem with fixing k-ordpert
is
finding out what size matrix should be passed to dll to get hessian in:
i.e.
it may be as much as 3 times bigger than the flat hessian - which can be rather large!!
Best regards
George ----- Original Message ----- From: "Sébastien Villemot" sebastien.villemot@ens.fr To: "List for Dynare developers" dev@dynare.org Sent: Thursday, June 25, 2009 1:44 PM Subject: Re: [DynareDev] 2nd and 3rd model derivatives + k-order
Le jeudi 25 juin 2009 à 13:41 +0100, G. Perendia a écrit :
Just to recap, both dr1.m and k-order-perturbation.dll are affected but
only
k-order-perturbation would need to be fixed to cope with this change
since
dr1.m will not be using USE_DLL mex option anyway.
Yes, indeed.
_______________________________________________ Dev mailing list Dev@dynare.org http://www.dynare.org/cgi-bin/mailman/listinfo/dev