Contents: [slideshow]

Optimisation: Ways and Means

High Throughput Computing

High Performance/Parallel Computing




About this document

Optimisation, Distribution and Parallelisation

An MPI Example in C

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

int main (int argc, char *argv[]) {
  int process_id, n_proc; 

  MPI_Init (&argc, &argv);
  MPI_Comm_rank (MPI_COMM_WORLD, &process_id);
  printf( "Hello world from process %d\n", process_id);
  
  if (process_id == 0) {
      MPI_Comm_size (MPI_COMM_WORLD, &n_proc);
      printf( "Number of processes is %d\n", n_proc);
  }
  MPI_Finalize();
  return 0;
}


...previousup (conts)next...