| e31d4fa4 | 16-Oct-2013 |
Jed Brown <jedbrown@mcs.anl.gov> |
PetscSynchronizedFGets: fix deadlock at EOF
> Problem: When reading a file of unknown length using > PetscSynchronizedFGets(), all but the first process in the communicator > freeze after reaching t
PetscSynchronizedFGets: fix deadlock at EOF
> Problem: When reading a file of unknown length using > PetscSynchronizedFGets(), all but the first process in the communicator > freeze after reaching the end of the file. > > Cause: When EOF is reached, PetscSynchronizedFGets() sets len = 0. > However, this only happens in the first process, so the other processes > are still expecting the originally requested number of bytes to be > broadcast to them, and thus hang at MPI_Bcast(). > > Solution: Do not set len = 0 at EOF.
This commit cherry-picks relevant portions of multiple commits from the feature branch 'barry/wirth-fusion-materials'.
Reported-by: Ilmari Karonen <ilmari.karonen@helsinki.fi>
show more ...
|
| 6c8deb01 | 31-Aug-2013 |
Jed Brown <jedbrown@mcs.anl.gov> |
Sys: fix PetscGetFullPath expansion of ~ and ~user, ensure NULL termination
Also update test to check that paths are handled as well as possible when the paths are too short. Still not bulletproof.
Sys: fix PetscGetFullPath expansion of ~ and ~user, ensure NULL termination
Also update test to check that paths are handled as well as possible when the paths are too short. Still not bulletproof.
If the path is much too short (not tested here), then PetscGetWorkingDirectory will fail with an error because getcwd fails.
show more ...
|