Skip to content

Commit

Permalink
Using MPI_Ssend instead of MPI_Send
Browse files Browse the repository at this point in the history
MPI_Send was giving buffer issues on pleiades. Ssend seems much faster.
  • Loading branch information
tiagopereira committed Jun 18, 2014
1 parent a8f9d01 commit eb7a5cd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rh15d_mpi/rh15d_ray_pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ void overlord(void) {
MPI_COMM_WORLD, &status);
/* Tell all the drones to exit by sending an empty message with the DIETAG. */
for (rank = 1; rank <= mpi.size; ++rank) {
MPI_Send(0, 0, MPI_INT, rank, DIETAG, MPI_COMM_WORLD);
MPI_Ssend(0, 0, MPI_INT, rank, DIETAG, MPI_COMM_WORLD);
}
} else {
/* Seed the drones; send one unit of work to each drone. */
Expand All @@ -236,7 +236,7 @@ void overlord(void) {
*/

/* Send it to each rank */
MPI_Send(&current_task, /* message buffer */
MPI_Ssend(&current_task, /* message buffer */
1, /* one data item */
MPI_LONG, /* data item is an integer */
rank, /* destination process rank */
Expand All @@ -256,7 +256,7 @@ void overlord(void) {
MPI_COMM_WORLD, /* default communicator */
&status); /* info about the received message */
/* Send the drone a new work unit */
MPI_Send(&current_task, /* message buffer */
MPI_Ssend(&current_task, /* message buffer */
1, /* one data item */
MPI_LONG, /* data item is an integer */
status.MPI_SOURCE, /* to who we just received from */
Expand All @@ -277,7 +277,7 @@ void overlord(void) {

/* Tell all the drones to exit by sending an empty message with the DIETAG. */
for (rank = 1; rank <= mpi.size; ++rank) {
MPI_Send(0, 0, MPI_INT, rank, DIETAG, MPI_COMM_WORLD);
MPI_Ssend(0, 0, MPI_INT, rank, DIETAG, MPI_COMM_WORLD);
}
}
}
Expand Down

0 comments on commit eb7a5cd

Please sign in to comment.