[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Matlab, Mex, FFTW3
Re: Matlab, Mex, FFTW3
Wed, 9 Dec 2015 10:25:14 -0500
On Tue, Dec 08, 2015 at 19:17:01 +0100, Hugo Raguet wrote:
> I am switching from Octave to MATLAB, after having developed a series of
> tools for my research in the latter language. As is usual (or should be
> usual), I wrote the most time-consuming operations in C, interfaced with
> I have two specific questions, which I will justify below.
> 1) is it possible that a mex-file properly written for Matlab (i.e.
> fully deterministic behavior, no segmentation violation, etc.) would not
> behave correctly when compiled and used within Octave ?
> 2) are there known incompatibilities between Mex (either Matlab or
> Octave) and the famous library FFTW3 ?
> I am asking those questions because of the following observations:
> 1) Under Matlab, I encontered the following, very strange, bug:
> . In brief, I compile C codes linked with FFTW3, and the resulting
> mex-file crashes in very specific and odd circumstances. The same bug is
> not reproducible within Octave, but it is expected, given the extreme
> specificity of this bug.
> 2) However, I have a huge routine in mex, which by the way also uses
> FFTW3, which seems to work perfectly fine : deterministic behavior, no
> crash, results coherent with the data.
> Now when I use it within Octave, I get *sometimes* what looks like the
> same results as in Matlab, sometimes different results (still
> 'resembling' in some sense the Matlab results, but different), and
> sometimes it crashes.
> Any help, commentary, pointer, hint, idea concerning the above would be
> greatly appreciated.
You also asked here
which IMHO is the best place to ask. (Best to mention all
Not having a lot of information, I can only guess at answers:
1) anything is possible,
2) not that I know of.
You say your simple code example always crashes in Matlab but never in
Octave. Just a guess, but does Matlab link against a different ABI
version of FFTW than the one you are trying to link your mex file to?
No way to even speculate on the "huge routine" without diving into the
> PS: unrelated: where should I report very small errors, like typos in
> the French version of the GUI?
The bug tracker: