Function SetFiles

Function Documentation

PetscErrorCode SetFiles(MPI_Comm COMM, int nfiles, PetscInt *firstfile, PetscInt *lastfile)

Split the list of files roughly evenly amongst all the workers.

Parameters
  • COMM: The MPI communicator, probably PETSC_COMM_WORLD.
  • nfiles: The number of lines in index.txt, read from previous CountFiles() call.
  • *firstfile: The index of the first file for this worker.
  • *lastfile: The index of the first file for this worker.