使用网络计算机进行Matlab并行处理 [英] Matlab parallel processing using a network computer

查看:97
本文介绍了使用网络计算机进行Matlab并行处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我熟悉matlabpoolparfor的用法,但是我仍然需要加快计算速度.

I'm familiar with matlabpool, and parfor usage, but I still need to speedup the computation.

我的1GB网络中有一台功能更强大的计算机.两台计算机都具有R2010b,并且具有相同的代码和路径.

I have a more powerful computer in my 1GB network. Both computers have R2010b, and have the same code and paths.

使用两台计算机进行并行计算的最简单方法是什么?

What is the simplest way to use both computers for parallel computation?

我今天使用的代码示例:

Example of the code I use today:

--- main.m ---

--- main.m---

matlabpool('open', 3);
% ...
x = randn(1e5,1);
y = nan(size(x));
parfor k = 1 : length(x)
    y(k) = myfunc(x(k));
end

-myfunc.m-

function y = myfunc(x)
    y = x; % some computation
return

推荐答案

对于真正的集群计算,您需要并行计算信息页面上阅读:

For real cluster computing, you'll need the distributed computing toolbox, as you can read on the parallel computing info page:

在不更改代码的情况下,您可以在计算机集群或网格计算服务上运行同一应用程序(使用MATLAB Distributed Computing Server™).您可以交互或批量运行并行应用程序.

Without changing the code, you can run the same application on a computer cluster or a grid computing service (using MATLAB Distributed Computing Server™). You can run parallel applications interactively or in batch.

但是安装(=购买)仅用于将一台计算机添加到工作池的工具箱可能有点太昂贵.幸运的是,还有其他选择: http://www.mathworks.com/matlabcentral/fileexchange/13775

But installing (=buying) a toolbox just for adding one computer to the worker pool might be a bit too expensive. Luckily there are also alternatives: http://www.mathworks.com/matlabcentral/fileexchange/13775

我个人没有使用过,但是绝对值得一看.

I personally haven't used this, but think it's definitely worth a look.

这篇关于使用网络计算机进行Matlab并行处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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