Skip to content

Automatic options prefix creation not safe in presence of objects on multiple communicators #8

@wence-

Description

@wence-

The options manager produces, if the user does not provide one, a "unique" options prefix by incrementing a class-level counter.

If two ranks diverge and one of them makes more options managers than the other, this prefix will get out of sync.

This goes against the petsc model that PetscObjectSetOptionsPrefix is collective.

I think the reason it has never bitten is that in practice the options prefix only needs to agree locally with the names we shove in the options database.

To fix this, the OptionsManager could take the internal communicator, which would have a attribute attached that stores the count. Now you get collectively consistent counts, however, multiple communicators might have counts in the same state. I think this shouldn't matter because the optionsmanager only ever manages the options for a single object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions