Blog :: 2011/08/...

Install MPICH2 on a Mac
Posted 2011/08/31
I am currently using a Macbook Pro, I had to install MPICH2 to use MPI. Install MacPorts from sudo port install mpich2 This is almost exactly the same as I used to do on Gentoo: sudo emerge mpich2 I have never had to install it on Windows but I am pretty sure it is [...]
MPI Hello World
Posted 2011/08/31
I have included compilation and execution examples. hello.c #include <stdio.h> #include <string.h> #include <stddef.h> #include <stdlib.h> #include "mpi.h" main(int argc, char **argv ) { char message[20]; int i,rank, size, type=99; MPI_Status status; MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD,&size); MPI_Comm_rank(MPI_COMM_WORLD, &rank); if(rank == 0) { strcpy(message, "Hello, world"); [...]