source:
CIVL/examples/mpi/simple/unreceived.c@
02876df
| Last change on this file since 02876df was a9a9973, checked in by , 11 years ago | |
|---|---|
|
|
| File size: 408 bytes | |
| Line | |
|---|---|
| 1 | /* erroneous program: a send is never received. Will be detected |
| 2 | * with -deadlock=potential */ |
| 3 | #include<mpi.h> |
| 4 | |
| 5 | int nprocs; |
| 6 | int myrank; |
| 7 | |
| 8 | void main() { |
| 9 | int argc; |
| 10 | char **argv; |
| 11 | double x; |
| 12 | MPI_Status status; |
| 13 | |
| 14 | MPI_Init(&argc, &argv); |
| 15 | MPI_Comm_rank(MPI_COMM_WORLD, &myrank); |
| 16 | if (myrank == 0) { |
| 17 | MPI_Send(&x, 1, MPI_DOUBLE, 0, 1, MPI_COMM_WORLD); |
| 18 | } |
| 19 | MPI_Finalize(); |
| 20 | } |
Note:
See TracBrowser
for help on using the repository browser.
