CS 220 Parallel Computing

basic_mpi.c

DownloadView Raw

/**
 * basic_mpi.c
 *
 * Demonstrates MPI program behavior without using any MPI functions.
 *
 * Compile:  mpicc -g -Wall -o basic_mpi basic_mpi.c
 * Run:      mpirun -n 2 ./basic_mpi
 */

#include <mpi.h>
#include <stdio.h>

int main(int argc, char ** argv) {
    MPI_Init(NULL, NULL);

    printf("Hello World!\n");

    MPI_Finalize();
    return 0;
}