source: CIVL/examples/mpi/collective/bcast_bad.c@ 2261cec

1.23 2.0 acw/focus-triggers main test-branch
Last change on this file since 2261cec was a7f50d5, checked in by Manchun Zheng <zmanchun@…>, 11 years ago

added some more tests

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

  • Property mode set to 100644
File size: 379 bytes
Line 
1#include<mpi.h>
2
3int main()
4{
5 int argc;
6 char** argv;
7 int rank;
8 int procs;
9 int value;
10
11 MPI_Init(&argc,&argv);
12 MPI_Comm_size(MPI_COMM_WORLD, &procs);
13 MPI_Comm_rank(MPI_COMM_WORLD, &rank);
14
15 if (rank == 0)
16 value = 123;
17
18 if (rank != 5)
19 MPI_Bcast(&value, 1, MPI_INT, 0, MPI_COMM_WORLD);
20
21 MPI_Finalize();
22 return 0;
23}
Note: See TracBrowser for help on using the repository browser.