如何在Matlab中最充分地利用多线程CPU? [英] How can I utilize multithread CPU most in Matlab?

查看:2808
本文介绍了如何在Matlab中最充分地利用多线程CPU?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚购买了Matlab并行计算工具箱.

I just bought the Matlab Parallel Computing toolbox.

命令matlabpool open使用CPU中的内核数打开并行工作器.

The command matlabpool open opens parallel workers with the number of the cores in my CPU.

但是我的每个CPU内核都有两个线程.根据Windows任务管理器,每个工作人员只能使用一个CPU内核的一半性能,这似乎可以解释为一个工作人员=一个线程=半核心".

But each of my CPU core has two threads. According to Windows Task Manager, each worker can only use half performance of one CPU core, which seems could be interpreted as one worker = one thread = "half core".

因此,在所有工作人员都打开后,仍可以使用CPU总功率的一半.

Therefore, after all workers opened, still half of the total power of CPU could be utilized.

还有其他命令可以帮助您吗?

Is there any other command could help with that?

推荐答案

默认情况下,matlabpoollocal群集类型在选择默认启动的工作线程数时仅考虑真实"核心.这是因为对于MATLAB工作负载,超线程通常不会带来太多好处.但是,此值只是默认值-您可以编辑集群类型并运行最多12个本地工作程序.

By default, the local cluster type for matlabpool considers only "real" cores when choosing the default number of workers to launch. This is because for MATLAB workloads, hyperthreading often does not provide much benefit. However, this value is only a default - you can edit the cluster type and run anything up to 12 local workers.

这篇关于如何在Matlab中最充分地利用多线程CPU?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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