int rank;
int data=11;
+
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
if (rank==1) {
data=22;
MPI_Send(&data,1,MPI_INT,(rank+1)%2,666,MPI_COMM_WORLD);
+// smpi_sleep(1000);
} else {
MPI_Recv(&data,1,MPI_INT,-1,666,MPI_COMM_WORLD,NULL);
if (data !=22) {
printf("rank %d: Damn, data does not match (got %d)\n",rank, data);
}
}
-
+
printf("rank %d: data exchanged\n", rank);
MPI_Finalize();
return 0;
smpi_execute_flops(duration *
xbt_cfg_get_double(_surf_cfg_set,
"smpi/running_power"));
+ } else {
+ XBT_DEBUG("Real computation took %f while threshold is set to %f; ignore it",
+ duration, xbt_cfg_get_double(_surf_cfg_set, "smpi/cpu_threshold"));
}
}