[an error occurred while processing this directive]

STRIDE Brown Bag Lunch: Intro to MPI for Scientists

A practical question and answer session on MPI.
 
$ cat <<EOF >> mpihello_simple.cc
#include <mpi.h>
#include <iostream>
 
int main (int argc, char** argv)
{
  int rank;
  MPI_Init (&argc, &argv);
  MPI_Comm_rank (MPI_COMM_WORLD, &rank);
  std::cout << "Hello world from process " << rank << std::endl;
  MPI_Finalize();
  return 0;
}
EOF
 
$ mpiicpc mpihello_simple.cc
$ ./a.out
Hello world from process 0
 
$ mpiexec -np 2 ./a.out
Hello world from process 1
Hello world from process 0

 

Speaker

Dr. Robert J. Harrison

Date

Monday, April 10, 2017

Time

12:00pm

Location

IACS Seminar Room