Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <mpi.h>
- #include <stdio.h>
- #include <unistd.h>
- int main(int argc, char** argv)
- {
- int rank, size;
- MPI_Init(&argc, &argv);
- MPI_Comm_rank(MPI_COMM_WORLD, &rank);
- MPI_Comm_size(MPI_COMM_WORLD, &size);
- if (rank == 0) {
- MPI_Request req;
- MPI_Issend(NULL, 0, MPI_INT, 1, 0, MPI_COMM_WORLD, &req);
- sleep(1);
- MPI_Cancel(&req);
- MPI_Wait(&req, MPI_STATUS_IGNORE);
- }
- MPI_Finalize();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement