Skip to content

Instantly share code, notes, and snippets.

View varun-nagaraja's full-sized avatar

Varun Nagaraja varun-nagaraja

  • Meta
  • Menlo Park, CA
View GitHub Profile
@varun-nagaraja
varun-nagaraja / mpi_sample.c
Created September 19, 2011 19:19
Sample MPI Program
#include <stdio.h>
#include <string.h>
#include "mpi.h"
int main(int argc, char* argv[]){
int my_rank; /* rank of process */
int p; /* number of processes */
int source; /* rank of sender */
int dest; /* rank of receiver */
int tag=0; /* tag for messages */