Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multidim fourier transforms error #603

Open
tpolakovic opened this issue Nov 2, 2018 · 7 comments
Open

multidim fourier transforms error #603

tpolakovic opened this issue Nov 2, 2018 · 7 comments

Comments

@tpolakovic
Copy link

When trying to use Fourier transforms (forward or inverse) like for example

let varr = Array.create 60 (Complex (1.0,0.0))
Fourier.ForwardMultiDim(varr, [|3; 4; 5|], o)

I get an error:

System.NotSupportedException: "Specified method is not supported."
  at MathNet.Numerics.Providers.FourierTransform.Managed.ManagedFourierTransformProvider.ForwardMultidim(Complex[] samples, Int32[] dimensions, FourierTransformScaling scaling)

This is on OS X Mojave 10.14 using Visual Studio 2017.

@cdrnet
Copy link
Member

cdrnet commented Nov 2, 2018

Yes, unfortunately multidim is supported only with the MKL native provider at this point - despite of our design principle that all functionality must work also with the built-in managed provider. I'll keep this issue open until this is fixed. Thanks for the reminder.

@tpolakovic
Copy link
Author

I see. On a related note, I tried using the MKL native provider (built following the steps on the MathNet website) and now I'm getting this error:

Unhandled Exception: System.NotSupportedException: MKL Native Provider not found. ---> System.DllNotFoundException: Unable to load shared library 'libdl.so' or one of its dependencies.

Any idea why that may be happening?

@cdrnet
Copy link
Member

cdrnet commented Nov 3, 2018

This used to work. Maybe we need to use libdl.dylib instead of libdl.so to dynamically load the provider on newer OSX versions? I don't have a mac, so I cannot test myself.

@bronco382
Copy link

Any updates or workarounds for the original issue?

@nrkramer
Copy link

nrkramer commented Aug 7, 2021

This issue is now 3 years old. It blocks more usage than just MultiDim API, because 2D Fourier transforms rely on a multidimensional transform. It makes it hard to do any kind of multidimensional Fourier analysis on macOS. It should be higher priority.

@cdrnet I'd say that your hunch about using the .dylib extension is spot on, seeing as darwin does not natively load elf binaries, but mach ones. If you want a guinea pig, I'm happy to test out the changes for you.

@nrkramer
Copy link

nrkramer commented Aug 7, 2021

Additionally, newer Macs now run an AMD architecture that requires the use of AVX2 hardware vectorized instructions in order to optimize for MKL. AVX2 support can be enabled by setting the environment variable MKL_DEBUG_CPU_TYPE=5 while compiling on an AMD system. I highly recommend this be enabled for AMD architectures if it isn't already.

@IS4Code
Copy link

IS4Code commented Jul 17, 2023

Any progress on this? It's not really the best thing to have to download 150 MB of MKL just for one Fourier transform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants