2: /* 3: Formatted test for PetscSetCommWorld() 4: */ 6: static char help[] = "Tests PetscSetCommWorld().\n\n"; 8: #include petsc.h 12: int main(int argc,char **argv) 13: { 15: PetscMPIInt size; 17: MPI_Init(&argc,&argv); 19: /* 20: Create a seperate PETSc universe for each processor 21: */ 22: PetscSetCommWorld(MPI_COMM_SELF); 23: PetscInitialize(&argc,&argv,PETSC_NULL,help); 24: 25: MPI_Comm_size(PETSC_COMM_WORLD,&size); 26: if (size != 1) SETERRQ(1,"main:Error from PetscSetCommWorld()"); 28: PetscFinalize(); 29: MPI_Finalize(); 30: return 0; 31: }