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