1 /* Copyright (c) 2011-2014. The SimGrid Team.
2 * All rights reserved. */
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. */
7 /* This program simply does a very small exchange to test whether using SIMIX dsend to model the eager mode works */
12 XBT_LOG_NEW_DEFAULT_CATEGORY(dsend,"the dsend test");
14 int main(int argc, char *argv[]) {
19 MPI_Init(&argc, &argv);
20 MPI_Comm_rank(MPI_COMM_WORLD, &rank);
24 MPI_Send(&data,1,MPI_INT,(rank+1)%2,666,MPI_COMM_WORLD);
27 MPI_Recv(&data,1,MPI_INT,MPI_ANY_SOURCE,666,MPI_COMM_WORLD,NULL);
29 printf("rank %d: Damn, data does not match (got %d)\n",rank, data);
33 XBT_INFO("rank %d: data exchanged", rank);