1 /* Copyright (c) 2011. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 /* This program simply does a very small exchange to test whether using SIMIX dsend to model the eager mode works */
11 int main(int argc, char *argv[]) {
15 MPI_Init(&argc, &argv);
16 MPI_Comm_rank(MPI_COMM_WORLD, &rank);
20 MPI_Send(&data,1,MPI_INT,(rank+1)%2,666,MPI_COMM_WORLD);
22 MPI_Recv(&data,1,MPI_INT,-1,666,MPI_COMM_WORLD,NULL);
24 printf("rank %d: Damn, data does not match (got %d)\n",rank, data);
28 printf("rank %d: data exchanged\n", rank);