Commit Graph

29 Commits (7e770f69e791e705ab535126e0157130dc9d40c6)

Author SHA1 Message Date
Sébastien Villemot 7e770f69e7
Remove workaround for errors in MEX files
Because at some point throwing exceptions from MEX files (with mexErrMsgTxt())
was not working under Windows 64-bit, we had designed a workaround to avoid
using exceptions.

Most MEX files were returning an error code as their first (or sometimes last)
argument, and that code would have to be checked from the MATLAB code.

Since this workaround is no longer needed, this commit removes it. As a
consequence, the interface of many MEX files is modified.

For some background, see https://www.dynare.org/pipermail/dev/2010-September/000895.html
2020-01-10 18:33:11 +01:00
Sébastien Villemot 82cef48eb4
A_times_B_kronecker_C MEX: remove the OpenMP codepath
Testing shows that it is slower than the BLAS path.
2019-06-25 17:26:14 +02:00
Sébastien Villemot c6a09a65e9
kronecker MEX: improve comments using UTF-8 2019-06-25 14:34:18 +02:00
Sébastien Villemot 1199d4abae
kronecker DLLs: various modernizations and simplifications 2019-04-30 15:54:48 +02:00
Sébastien Villemot f5e2bfc30a
Ask GCC to warn about C-style casts (-Wold-style-cast)
Adapt the code accordingly.
2019-04-23 13:03:20 +02:00
Sébastien Villemot 57848930c6
Use Unicode copyright symbol (in UTF-8 encoding)
Do not use it in MATLAB source files, since unfortunately the MATLAB editor
does not support UTF-8.
2019-04-16 11:42:16 +02:00
Stéphane Adjemian (Charybdis) 560800bcc5 Changed the order of the output arguments in kronecker product related mex routines. 2011-09-05 18:57:42 +02:00
Sébastien Villemot cc2a9d90ac Global reindentation of MEX source files 2011-02-04 16:53:12 +01:00
Sébastien Villemot ffc53ca910 Fix integer types in Kronecker DLLs 2011-01-13 19:34:49 +01:00
Sébastien Villemot 5a9615951c Kronecker DLL: fix minor issue (was creating a lot of warnings under Octave) 2010-11-24 19:12:03 +01:00
Stéphane Adjemian (Charybdis) 5c709e4733 Changed set_dynare_threads.m. The number of threads in parallelized mex files to be used if dynare is built with the openmp flag
(--with-openmp) is not passed by an environment variable anymore. The function set_dynare_threads changes the default value of the
number of threads (default is 1) in the options_.threads structure. Changed calls to sparse_hessian_times_B_kronecker_C and
A_times_B_kronecker_C dlls accordingly.
2010-11-15 13:06:39 +01:00
Houtan Bastani ca24c92ed7 A_times_B_kronecker_C: remove instances of mexErrMsgTxt 2010-09-23 10:45:08 +02:00
sebastien f3549b4c64 Beautified MEX source code
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3251 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-12-16 17:18:38 +00:00
sebastien dde3f3795f Build system:
* Simplified the way we deal with various Octave/MATLAB contexts from MEX files:
  - only three defines: MATLAB_MEX_FILE, MATLAB_VERSION (hex number) and OCTAVE_MEX_FILE
  - one header for MEX files: dynmex.h
  - headers for BLAS and LAPACK: dynblas.h and dynlapack.h (used from Dynare++ and the MEX files)
* Merged the two sources trees of sylvester library


git-svn-id: https://www.dynare.org/svn/dynare/trunk@3006 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-10-01 14:17:02 +00:00
sebastien 2ac1194d39 Build system: change the flag used for OpenMP compilation
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2950 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-09-18 10:34:04 +00:00
sebastien 2fac4b624f trunk mex/A_times_B_kronecker_C: fixed typo introduced in r2577
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2603 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-18 14:19:05 +00:00
michel 9fa3457791 4.1: fixing again compatibility for Matlab 7.8
adding matlab_versions_compatibility.h to start factorizing necessary code

git-svn-id: https://www.dynare.org/svn/dynare/trunk@2577 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-09 13:36:06 +00:00
stepan fe7c01675a Changes related to the multithreaded mex files (part I).
* Removed from build_matlab.m the compilation of mex files with openmp.
* Added build_matlab_multithread.m (where openmp is used if availabe).
* Cosmetic changes.


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2549 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-03 11:01:55 +00:00
stepan acee5581a9 v4.1: Cosmetic changes and more (set USE_OMP equal to one iff _OPENMP exists).
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2472 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-03-14 22:51:50 +00:00
stepan 34f1a39428 v4.1: Parallelization of A_times_B_kronecker_C.cc using OpenMp if
available. Due  to incompabilities between the optimized MKL (blas)
library shipped with matlab and the free OpenMp library (libgomp), the dgemm
routine is replaced by nested loops.


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2471 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-03-14 22:35:44 +00:00
stepan c8a86252c7 v4.1: Added the possibility of multithreading for some mex files
(OpenMp is used).


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2453 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-03-11 14:57:34 +00:00
sebastien c633f68b12 v4 mex/sources: added copyright+license header to all remaining files
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1973 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-07-31 09:10:29 +00:00
sebastien d3e739d9be v4 mex: fixed compilation for Octave/Windows/MSVC2008
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1904 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-06-27 23:22:52 +00:00
sebastien 66c5c66e2f v4 mex: cleanups related to Blas and Lapack function calls
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1894 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-06-23 21:58:45 +00:00
michel 7054fd2f87 v4 mex: fixed problem with A_times_B_kronecker_C on Linux/64 bits
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1892 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-06-23 09:38:46 +00:00
sebastien 5ae83c57b8 v4 mex:
* fixed type of mwIndex and mwSize: int instead of unsigned int
* removed extra line in build.m


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1883 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-06-19 13:12:41 +00:00
michel aafe00138d v4 A_times_B_kronecker_C.cc: removed remaining cast (int *)
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1818 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-05-02 13:02:58 +00:00
michel 4c7c181b15 v4 mex: removed castings from call to DGEMM
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1771 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-04-02 12:52:49 +00:00
michel 80eb1faab2 moving mex directory
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1690 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-02-04 21:31:12 +00:00