예제 #1
0
파일: slave.c 프로젝트: kawakita/parallel
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);
  }
}
예제 #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;
   }
}