Hi,
I have tested k-order and it works fine under Linux/Octave and Linux/MATLAB.
Le mardi 08 décembre 2009 à 09:38 +0000, G. Perendia a écrit :
Did anyone managed to run <model>_dynamic.mex* compiled with Matlab lcc with k_order_perturbation? Despite exporting Dynamic explicitly for lcc, (as for gcc as in the mexopts.bat I sent), k_order_perturbation (under Windows Matlab) still does not seem to be able to load the Dynamic function.
Under Windows, I have the same problem when trying to compile the MEX file with MS Visual C++. Previously I had a MATLAB crash, now I have an error message indicating that MATLAB can't find the "Dynamic" symbol in the MEX.
So unless we figure out how to change the exported symbols with LCC and Visual C++, the only supported compiler for k-order will be GCC.
An alternative may be to try to call mexFunction from k_order_perturbation's dynamic_dll only if calling Dynamic() directly fails (e.g. for the lcc users). Another alternative may be to change <modelname>_dynamic.c so that there is no separate Dynamic function but only mexFunction. In both cases k_order_perturbation's dynamic_dll wil need to be changed to call mexFunction
We shouldn't modify existing mexFunction, because some users (at least Stéphane! ;) want to keep the USE_DLL option as it is now.
Also remember that using a MEX for the dynamic model in k-order is only a temporary solution for Dynare 4.1. In the next 4.2 release of Dynare, we will use the bytecode as a replacement.
Best