All pastes #1236982 Raw Edit

Hello World MPI

public text v1 · immutable
#1236982 ·published 2008-10-26 15:42 UTC
rendered paste body
using System;

using Alchemi.Parallel;

using Environment = Alchemi.Parallel.Environment;

namespace ConsoleApplication1

{

class Program

{

static void Main(string[] args)

{

MPI mpi = Environment.GetInstance().GetMPI;

int nprocs = -1;

int rank = -1;

if (args.Length < 1)

{

Console.WriteLine("gunakan : MPIRun  HelloWorld MPI");

System.Environment.Exit(0);

}

mpi.Init();

mpi.Comm_Size(out nprocs);

mpi.Comm_Rank(out rank);

Console.WriteLine("Rank no. {0} of a total of {1} says Hello World", rank, nprocs);

mpi.Finalise();

}

}

}

Send dan Recv S