1: /*$Id: pcomm.c,v 1.24 2001/03/23 23:20:38 balay Exp $*/
3: #include petsc.h
7: /*@C
8: PetscSetCommWorld - Sets a communicator to be PETSc world communicator
9: (default is MPI_COMM_WORLD). Must call BEFORE PetscInitialize().
11: Collective on MPI_Comm
13: Input Parameter:
14: . comm - the communicator
16: Note:
17: This routine is intended for users who need to initialize PETSc on a
18: subset of processors within a larger job. Thus, most users need not
19: call this routine.
21: Level: advanced
23: Concepts: communicator^setting for PETSc
24: Concepts: MPI communicator^setting for PETSc
25: Concepts: PETSC_COMM_WORLD^setting
27: @*/
28: int PetscSetCommWorld(MPI_Comm comm)
29: {
31: if (PetscInitializeCalled) SETERRQ(PETSC_ERR_ARG_WRONGSTATE,"Must call before PetscInitialize()");
32: PETSC_COMM_WORLD = comm;
33: return(0);
34: }