OpenMp under matlab

조회 수: 13 (최근 30일)
Laila
Laila 2011년 7월 5일
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!

답변 (1개)

Jason Ross
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.
  댓글 수: 1
Laila
Laila 2011년 7월 6일
Thank you very much!
Unfortunately I do not have the parallel computing toolbox, and so for now I need to write a couple of c-functions in Mex and try to use openmp with it.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile 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!

Translated by