1: /*$Id: ex7.c,v 1.15 2001/04/10 19:34:46 bsmith Exp $*/
3: /*
4: Formatted test for PetscSetCommWorld()
5: */
7: static char help[] = "Tests PetscSetCommWorld().nn";
9: #include petsc.h
11: int main(int argc,char **argv)
12: {
13: int size,ierr;
15: MPI_Init(&argc,&argv);
17: /*
18: Create a seperate PETSc universe for each processor
19: */
20: PetscSetCommWorld(MPI_COMM_SELF);
21: PetscInitialize(&argc,&argv,PETSC_NULL,help);
22:
23: MPI_Comm_size(PETSC_COMM_WORLD,&size);
24: if (size != 1) SETERRQ(1,"main:Error from PetscSetCommWorld()");
26: PetscFinalize();
27: MPI_Finalize();
28: return 0;
29: }