Monday, May 25, 2009

MPI.NET Tutorial

In this post I will show step by step how to install and execute MPI (Message Passing Interface) parallel programs in the .NET environment.
A much more detailed tutorial is available here.

1) Installation:
My computer is running Windows Vista and Visual Studio 2008 is already installed.
Download and install the HPC Pack 2008 (next 5 figures):











Then install the MPI.NET SDK.msi (see next 4 figures):








2) Test the installation from the command line (next 3 figures):

A "Ping-Pong" program

Serial run:


As should be, the firewall detects the communication traffic and the user should allow it:


Parallel run:


3) MPI "Hello" demo using Visual Studio 2008 and C# (next 5 figures):

Start a new console C# project:


Add Reference to the MPI component:

Build the executable:


Execute the parallel program with 8 threads:

Verifying the execution of the 8 threads by looking at the Task Manager:


That's all for now.
Your comments are welcome.

Guy Tel-Zur
Email: tel-zur@computer.org

1 comment:

Mikey said...

This tutorial would be a lot more valuable if it showed how to do this on two computers instead of just one.