PetscErrorCode PetscSharedWorkingDirectory(MPI_Comm comm, PetscBool *shared)Collective
comm | - MPI_Communicator that may share working directory |
shared | - PETSC_TRUE or PETSC_FALSE |
-shared_working_directory | - indicates the directory is shared among the MPI ranks | |
-not_shared_working_directory | - indicates the directory is shared among the MPI ranks |
PETSC_SHARED_WORKING_DIRECTORY | - indicates the directory is shared among the MPI ranks | |
PETSC_NOT_SHARED_WORKING_DIRECTORY | - indicates the directory is shared among the MPI ranks |
Assumes that all processors in a communicator either
1) have a common working directory or
2) each has a separate working directoryeventually we can write a fancier one that determines which processors share a common working directory.
This will be very slow on runs with a large number of processors since it requires O(p*p) file opens.