English 中文(简体)
.net 4.0 Task Parallel Library vs. MPI.NET
原标题:

Does .net 4.0 Task Parallel Library replace MPI.NET for High-performace computings?

MPI.NET found here http://www.osl.iu.edu/research/mpi.net/svn/ is a high-performance, easy-to-use implementation of the Message Passing Interface (MPI) for Microsoft s .NET environment. MPI is the de facto standard for writing parallel programs running on a distributed memory system, such as a compute cluster.

.NET 4 TPL says: "The Task Parallel Library (TPL) is a set of public types and APIs in the System.Threading and System.Threading.Tasks namespaces in the .NET Framework version 4. The purpose of the TPL is to make developers more productive by simplifying the process of adding parallelism and concurrency to applications. The TPL scales the degree of concurrency dynamically to most efficiently use all the processors that are available. In addition, the TPL handles the partitioning of the work, the scheduling of threads on the ThreadPool, cancellation support, state management, and other low-level details. By using TPL, you can maximize the performance of your code while focusing on the work that your program is designed to accomplish."

My Target is to build an application that can run on Windows HPC 2008 ... which way to go?

最佳回答

Message passing is a different way to address the idea of parallel programming. Axum and Erlang both use message passing. They aren t really comparable directly, as they are both addressing two specific implementations.

The benefit I ve seen with message passing is that any network/process boundaries can be made transparent and the message passing itself doesn t rely on underlying threads (all the messages and actors can be on one thread).

The TPL, from my limited understanding, is there to build upon/replace/much improve the current threading model in .NET, ie you have actual threads that you control and you communicate by transferring arguments or using shared state.

If its from the ground up, and the design suits being split into very small segments of code then I would suggest MPI.NET. If the type of work is CPU intensive (like mathematical work) I would suggest the TPL route.

Edit: long time edit, this answer is old! MPI.NET is directly suited to HPC as it makes the communication boundary of HPC nodes transparent and configurable. MPI.NET sends messages to endpoints - these are points are defined as IP/Port addresses in configuration files. The code doesn t know that an endpoint crosses a network boundary.

If you opt for TPL on HPC (not sure if it is supported) I think your code will then have to be aware of the nodes and how to transport processing from one to another, so you reap no benefits.

问题回答

From what I understand TPL does not support distributed computing while MPI.NET does.





相关问题
Manually implementing high performance algorithms in .NET

As a learning experience I recently tried implementing Quicksort with 3 way partitioning in C#. Apart from needing to add an extra range check on the left/right variables before the recursive call, ...

Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How do I compare two decimals to 10 decimal places?

I m using decimal type (.net), and I want to see if two numbers are equal. But I only want to be accurate to 10 decimal places. For example take these three numbers. I want them all to be equal. 0....

Exception practices when creating a SynchronizationContext?

I m creating an STA version of the SynchronizationContext for use in Windows Workflow 4.0. I m wondering what to do about exceptions when Post-ing callbacks. The SynchronizationContext can be used ...

Show running instance in single instance application

I am building an application with C#. I managed to turn this into a single instance application by checking if the same process is already running. Process[] pname = Process.GetProcessesByName("...

How to combine DataTrigger and EventTrigger?

NOTE I have asked the related question (with an accepted answer): How to combine DataTrigger and Trigger? I think I need to combine an EventTrigger and a DataTrigger to achieve what I m after: when ...

热门标签