Matlab 2011a 使用 64 位 Linux 上可用的所有内核? [英] Matlab 2011a Use all Cores Available on 64 bit Linux?

查看:38
本文介绍了Matlab 2011a 使用 64 位 Linux 上可用的所有内核?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网上看过,但我似乎无法找到答案是否需要做任何事情才能让 matlab 使用所有内核?据我了解,自 2007 年以来,多线程已得到支持.在我的机器上,matlab 仅使用一个核心 @100%,其余的挂在 ~2% 处.我使用的是 64 位 Linux(Mint 12).在我的另一台只有 2 个内核并且是 32 位 Matlab 的计算机上,似乎同时使用了两个内核@100%.不是所有的时间,而是在足够多的情况下.在 64 位 4 核 PC 上,这种情况永远不会发生.

Hi I've looked online but I can't seem to find the answer whether I need to do anything to make matlab use all cores? From what I understand multi-threading has been supported since 2007. On my machine matlab only uses one core @100% and the rest hang at ~2%. I'm using a 64 bit Linux (Mint 12). On my other computer which has only 2 cores and is 32 bit Matlab seems to be utilizing both cores @100%. Not all of the time but in sufficient number of cases. On the 64 bit, 4 core PC this never happens.

我是否必须在 64 位中执行任何操作才能让 Matlab 尽可能使用所有内核?我必须在安装后进行一些自定义链接,因为 Matlab 没有找到库(例如 libc.so.6),因为它没有在正确的位置查找.

Do I have to do anything in 64 bit to get Matlab to use all the cores whenever possible? I had to do some custom linking after install as Matlab wasn't finding the libraries (eg. libc.so.6) because it wasn't looking in the correct places.

推荐答案

按照标准,从最新版本开始,您可以使用 Parallel Computing Toolbox 使用 12 个内核.没有这个工具箱,我猜你就不走运了.MATLAB Distributed Computing Server 可以访问任何额外的内核,您实际上需要为每个工作线程数付费.

By standard, since the latest release, you can use 12 cores using the Parallel Computing Toolbox. Without this toolbox, I guess you're out of luck. Any additional cores could be accessed by the MATLAB Distributed Computing Server, where you actually pay per number of worker threads.

要使 matlab 使用您必须执行的多个内核

To make matlab use your multiple cores you have to do

matlabpool open

如果您确实拥有多线程代码(例如使用 spmd 函数或 parfor 循环),当然效果会更好

And it of course works better if you actually have multithreaded code (like using the spmd function or parfor loops)

更多信息在 Matlab 主页

这篇关于Matlab 2011a 使用 64 位 Linux 上可用的所有内核?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆