On Tue, Feb 7, 2017 at 8:06 AM, Florian Lindner <[email protected]> wrote:
> Hello, > > so far we have happily set PETSC_COMM_WORLD anywhere in our code and we > were not having trouble with that. > > However http://www.mcs.anl.gov/petsc/petsc-current/docs/ > manualpages/Sys/PETSC_COMM_WORLD.html states that: > > "Notes: By default PETSC_COMM_WORLD and MPI_COMM_WORLD are identical > unless you wish to run PETSc on ONLY a subset of > MPI_COMM_WORLD. In that case create your new (smaller) communicator, call > it, say comm, and set PETSC_COMM_WORLD = comm > BEFORE calling PetscInitialize(), but after MPI_Init() has been called." > > So, you should never modify PETSC_COMM_WORLD after PetscInitialize has > been called. Is that warning still in effect? > Yes. > What other ways are to set the MPI comm used by PETSc. There is an comm > argument on most (all?) functions like > VecCreate, PetscViewer*Open, PetscRandomCreate, MatCreate). Is it > sufficient to use that argument to supply an alternate > communicator? > Yes. Thanks, Matt > Thanks, > Florian > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener
