1
$\begingroup$

I am trying to run my matlab script on a Xeon Phi node with 68 physical cores. Using parpool I allocate 16 cores to enable SMD parallelization with a parfor loop. The script looks something like this.

parpool('local',16)
parfor i=1:N
    foo
end

When I run the script on Intel Xeon Phi processor (with MIC architecture), each MATLAB task uses only 6.5% CPU. There are no issues when I run on another machine with Intel Xeon processor (20 cores). How can I get the maximum out of my computing resources?

$\endgroup$
1
$\begingroup$

parpool is a part of Matlab Parallel Computing Toolbox. According to this discussion from 2015 and this discussion about Matlab2016a, Parallel Computing Toolbox did not have a support for Intel Xeon Phi. However, at that time only Intel Xeon Phis on KNC architecture were available (that allowed only co-processor mode of operation).

I also was not able to find mentioning of Intel Xeon Phi in the current (R2018a) documentation.

And while KNL architecture is a huge step towards "a standalone CPU" (as compared to KNC), I guess Parallel Computing Toolbox might still have troubles with its full usage.

$\endgroup$
  • $\begingroup$ Indeed, I tried to get this working many times and it never did. The automatic offloading of BLAS works great, but element-wise operations don't offload which left a lot of performance behind (and there were too many data transfers). Eventually I just gave up MATLAB since it works fine from Julia, and the serial code was much faster too meaning the multiplicative improvement of parallelism was pretty large. $\endgroup$ – Chris Rackauckas Aug 23 '18 at 13:46
  • $\begingroup$ @ChrisRackauckas with Intel discontinuing this product line this summer, I guess, this question will not be too popular. What's funny, is the announcement of discontinuing came July 23, I answered July 24 and read the announcement July 25. $\endgroup$ – Anton Menshov Aug 23 '18 at 14:11
  • 2
    $\begingroup$ Yeah, it's sad because it did do a lot of things well, but was just very hard to use from MATLAB, Python, and R. It did get Julia's compilation tools to an interesting point where you can compile to other architectures, and that is now used in compiling functions to things like WebAssembly and TPUs, and transpilation to OpenCL was a nice way to get arrays working on the Xeon Phi, but indeed the original purpose for all of this will be forgotten. RIP. $\endgroup$ – Chris Rackauckas Aug 23 '18 at 14:31

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.