source: CIVL/examples/mpi/simple/unreceived.c

main
Last change on this file was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago

Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 398 bytes
Line 
1/* erroneous program: a send is never received. Will be detected
2 * with -deadlock=potential */
3#include<mpi.h>
4
5int nprocs;
6int myrank;
7#define NULL ((void*)0)
8void main() {
9 double x = 0;
10 MPI_Status status;
11
12 MPI_Init(NULL, NULL);
13 MPI_Comm_rank(MPI_COMM_WORLD, &myrank);
14 if (myrank == 0) {
15 MPI_Send(&x, 1, MPI_DOUBLE, 0, 1, MPI_COMM_WORLD);
16 }
17 MPI_Finalize();
18}
Note: See TracBrowser for help on using the repository browser.