[petsc-dev] PetscExceptionTry1

Jed Brown jed at 59A2.org
Mon Feb 14 14:12:00 CST 2011


On Mon, Feb 14, 2011 at 21:05, Barry Smith <bsmith at mcs.anl.gov> wrote:

> Then we need a PetscFOpen() to be able to return a flag indicating that it
> cannot open the file.
>
>   But I don't think it is right to call it a "race condition", it is just a
> non-atomic operation and it is possible that after the test succeeds the
> open may fail. But I don't think we should be using algorithms/approaches
> that rely on checking that a file exists and opening it be an atomic
> operation we don't use the filesystem in such a dynamic way so I think
> checking then opening is fine for PETSc.
>

The question is whether any users that we care to support may have multiple
processes trying to open the same file or somehow otherwise communicating
through the file system. At the moment, I can't think of a use case where it
is important.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20110214/8fb9b072/attachment.html>


More information about the petsc-dev mailing list