OpenMp under matlab
10 次查看(过去 30 天)
显示 更早的评论
Hello
I am writing an m-file, part of which I want to parallelise. I was going to put that section into a mexFunction file and do the parallelisation using openmp. However, within the loop I call a matlab function (one which I have written), and was wondering, would this work under openmp? Since each thread would be accessing the function simultaneously. If it does not work, does anyone know of a workaround?
Thank you!
0 个评论
回答(1 个)
Jason Ross
2011-7-5
Have you looked at using the Parallel Computing Toolbox? The parfor and spmd constructs are specifically written to allow code to be distributed and parallelized. These commands will work with your local machine (8 workers), a jobmanager cluster (developed by MathWorks) or certain other commercial / open source clusters. You can also use the compiler for some things, as well.
There are some limitations on the functionality, but you might want to check out the documentation and see if it can solve your problem more quickly. I'm also assuming you have the license, as well.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!