Tuesday, April 16, 2013

Current Gripes on MATLAB, MEX, OpenMP and OS X

I write a lot of C code around which I then bind to MEX so that I can use MATLAB to manage the pre/post processing phases of my simulations. Some of my recent work has a lot of loops for computing averages that are ripe for OpenMP, so it'd be great if I could get OpenMP and MEX to play together nicely. Currently, I'm facing a couple of obstacles, many of which seem to revolve around OS X 10.8. First, the only automated MEX configuration available for OS X 10.8 uses clang, which does not support OpenMP (yet). My next thought was to write pure C, but use MATLAB's .mat interface to handle the pre/post processing script. Unfortunately, to use the libraries needed for that, they need to be set in the DLYD_LIBRARY_PATH, and OS X 10.8 seems to have dyld issues. I know I could always resort to just reading/writing ASCII files, but this all makes me grumpy about OS X as a development environment for scientific computing. I moved to OS X about 10 years ago specifically thinking that it'd give me well maintained OS with the ability to leverage all sorts of *nix software.

No comments:

Post a Comment