Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
matlab在多节点上的并行处理_Matlab_Parallel Processing_Cluster Computing - Fatal编程技术网

matlab在多节点上的并行处理

matlab在多节点上的并行处理,matlab,parallel-processing,cluster-computing,Matlab,Parallel Processing,Cluster Computing,我已经学习了关于matlab处理的页面和讨论,但我仍然不知道如何将我的程序分发到多个节点(不是核心)。在我使用的集群中,有10个节点可用,每个节点中有8个核心可用。在每个节点内部使用“parfor”(在8个核心之间本地使用)时,并行化工作良好。但是当使用多个节点时,我认为(不确定如何验证这一点)它不能很好地工作。下面是我在集群上运行的一个程序: function testPool2() disp('This is a comment') disp(['matlab number of cores

我已经学习了关于matlab处理的页面和讨论,但我仍然不知道如何将我的程序分发到多个节点(不是核心)。在我使用的集群中,有10个节点可用,每个节点中有8个核心可用。在每个节点内部使用“parfor”(在8个核心之间本地使用)时,并行化工作良好。但是当使用多个节点时,我认为(不确定如何验证这一点)它不能很好地工作。下面是我在集群上运行的一个程序:

function testPool2()
disp('This is a comment')
disp(['matlab number of cores : '   num2str(feature('numCores'))])

matlabpool('open',5);
disp('This is another comment!!')
tic; 
for i=1:10000 
    b = rand(1,1000);
end;
toc
tic; 
parfor i=1:10000 
    b = rand(1,1000);
end;
toc

end
其结果是:

This is a comment
matlab number of cores : 8
Starting matlabpool using the 'local' profile ... connected to 5 labs.
This is another comment!!
Elapsed time is 0.165569 seconds.
Elapsed time is 0.649951 seconds.
{Warning: Objects of distcomp.abstractstorage class exist - not clearing this
class
or any of its super-classes} 
{Warning: Objects of distcomp.filestorage class exist - not clearing this class
or any of its super-classes} 
{Warning: Objects of distcomp.serializer class exist - not clearing this class
or any of its super-classes} 
{Warning: Objects of distcomp.fileserializer class exist - not clearing this
class
or any of its 
超级类}

该程序首先使用“mcc-o out testPool2.m”编译,然后传输到服务器的临时驱动器。然后我使用MicrosoftHPCPack2008R2提交作业。还请注意,我无法访问安装在每个节点上的MATLAB图形界面。我只能使用MSR HPC作业管理器提交作业(请参见此:)

根据上述输出,我们可以看到,可用的核心数是8;因此我推断“matlabpool”只适用于机器中的本地内核;不在节点之间(相互连接的独立计算机)

那么,我如何将for循环(“parfor”)推广到节点呢


另外,我不知道输出末尾的警告是什么

为了在多个节点上运行MATLAB,除了并行计算工具箱外,还需要分布式计算服务器。必须在群集中的所有节点上安装并正确配置分布式计算服务器。通常,MATLAB分布式服务器带有shell脚本,用于在多个节点上基于调度器和集群设置启动并行MATLAB作业

如果无法访问分布式计算服务器,MATLAB只能在单个节点上运行。与集群管理员一起验证分布式计算服务器是否已正确设置和运行是很有价值的;在某些情况下,这些服务器的管理员甚至有一些示例脚本,用于启动和运行其用户群通用的作业,例如MATLAB

以下是指向分布式计算服务器上的文档的链接:
为了在多个节点上运行MATLAB,除了并行计算工具箱外,还需要分布式计算服务器。必须在群集中的所有节点上安装并正确配置分布式计算服务器。通常,MATLAB分布式服务器带有shell脚本,用于在多个节点上基于调度器和集群设置启动并行MATLAB作业

如果无法访问分布式计算服务器,MATLAB只能在单个节点上运行。与集群管理员一起验证分布式计算服务器是否已正确设置和运行是很有价值的;在某些情况下,这些服务器的管理员甚至有一些示例脚本,用于启动和运行其用户群通用的作业,例如MATLAB

以下是指向分布式计算服务器上的文档的链接: