vuls: init at 0.27.0
[NixPkgs.git] / nixos / tests / mpich-example.c
blobc48e3c45b72eb2046408f7561c96d53e79478961
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <mpi.h>
5 int
6 main (int argc, char *argv[])
8 int rank, size, length;
9 char name[BUFSIZ];
11 MPI_Init (&argc, &argv);
12 MPI_Comm_rank (MPI_COMM_WORLD, &rank);
13 MPI_Comm_size (MPI_COMM_WORLD, &size);
14 MPI_Get_processor_name (name, &length);
16 printf ("%s: hello world from process %d of %d\n", name, rank, size);
18 MPI_Finalize ();
20 return EXIT_SUCCESS;