Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
984ee7ee00f1cec93d86b8f2fa5c2e84e08770de
[simgrid.git] / examples / smpi / split.c
1 /* Copyright (c) 2009, 2010. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #include <stdio.h>
8 #include <mpi.h>
9
10 int main(int argc, char *argv[])
11 {
12   int worldrank;
13 //  int localrank;
14 //  MPI_Comm localcomm;
15   MPI_Init(&argc, &argv);
16   MPI_Comm_rank(MPI_COMM_WORLD, &worldrank);
17   printf("MPI_Comm_split is not implemented\n");
18   //MPI_Comm_split(MPI_COMM_WORLD, worldrank % 2, worldrank, &localcomm);
19   //MPI_Comm_rank(localcomm, &localrank);
20   //printf("node with world rank %d has local rank %d\n", worldrank, localrank);
21   MPI_Finalize();
22   return 0;
23 }