Exemplo n.º 1
0
int F_Send(void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, int rank)
{
  if (/*rank ==0 ||*/ rank == 5 || random_fail()) {      
    DEBUG_PRINT(("%d FAIIIIILLLLLL!!!!!!", rank));
    MPI_Finalize();
    exit (0);
    return 0;
  } else {
    return MPI_Send (buf, count, datatype, dest, tag, comm);
  }
}
Exemplo n.º 2
0
int F_Send(void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, double p) {
   if (random_fail(p)) {
   	  printf("%d Failed!\n", id);      
      MPI_Finalize();
      exit (0);
      return 0;
   } else {
      MPI_Send (buf, count, datatype, dest, tag, comm);
      
      return 1;
   }
}