views:

240

answers:

2

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?

A: 

Hi,

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.

Adam
So, you suggest MPI.NET for HPC applications ?
jalchr
Have a look plzhttp://resourcekit.windowshpc.net/MORE_INFO/SeqToParallelHPC.html
jalchr
Hi jalchr, its not that simple unfortunately. If you are doing heavy mathematical lifting (ie it will throttle a single thread heavily) go for the TPL, its a good framework for threading in the standard model.The only beneficial area for MPI.NET (well, Axum for me) is currently networking, where actors can listen on network ports without consuming CPU. The MPI.NET would not be very suitable.
Adam
+1  A: 

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

Peladao