Windows Azure的:在code的并行 [英] Windows Azure: Parallelization of the code

查看:123
本文介绍了Windows Azure的:在code的并行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些矩阵乘法操作。我想通过并行多个处理器的操作的执行。这可以被高性能计算集群上采用MPI(消息传递接口)来完成。

I have some matrix multiplication operation. I want to parallelize the execution of those operations through multiple processors.. This can be done on high performance computing cluster using MPI (Message Passing Interface).

像明智的,可以使用多个工作角色,我做了一些并行化在云中。是否有这样做的任何手段。

Like wise, can I do some parallelization in the cloud using multiple worker roles. Is there any means for doing that.

推荐答案

在Azure SDK和工具,版本1.2的6月发行,现在支持.NET 4.您现在可以采取并行扩展的优势包括.NET 4这包括Parallel.ForEach()和的Parallel.For(),如实施例。

The June release of the Azure SDK and Tools, version 1.2, now supports .NET 4. You can now take advantage of the parallel extensions included with .NET 4. This includes Parallel.ForEach() and Parallel.For(), as examples.

任务并行库(TPL)只会帮助你在一个虚拟机 - 它不会帮助跨多个虚拟机划分你的工作。所以,如果你设置了,比如说,2-,4-或8核VM,你应该看到并行执行显著的性能提升。

The Task Parallel Library (TPL) will only help you on a single VM - it's not going to help divide your work across multiple VMs. So if you set up, say, a 2-, 4-, or 8-core VM, you should really see significant performance gains with parallel execution.

现在:如果你想跨实例划分工作,你需要创建工作分配给每个实例的方式。例如:建立一个工人角色作为协调VM和另一名工人的作用,用的 N 的情况下,作为计算虚拟机。然后,有协调VM枚举计算虚拟机的所有实例和划分工作的 N 的方式。发送发送1 /的 N 的工作电子邮件每个实例在调用WCF通过内部端点。每个虚拟机实例处理每个工作信息(可能与TPL以及)和存储其结果要么BLOB或表存储,所有实例访问。

Now: if you wanted to divide work up across instances, you'll need to create a way of assigning work to each instance. For example: set up one worker role as a coordinator vm, and another worker role, with n instances, as the computation vm. Then, have the coordinator vm enumerate all instances of the computation vm and divide up work n ways. Send send 1/n work messages to each instance over WCF calls over an internal endpoint. Each vm instance processes each work message (potentially with the TPL as well) and stores its result in either blob or table storage, accessible to all instances.

这篇关于Windows Azure的:在code的并行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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