On Tue, 1 Aug 2017, Franck Houssen wrote: > How to clear (locally - on each MPI proc) all options related to a given > prefixed solver ?
Note: 'locally' is not the correct way to look at this. Options for an object are collective on the MPI_Comm of that object. > > Say I have 2 solvers. I prefixed them "s1_" and "s2_" with > KSPSetOptionsPrefix to give them different options. What is the MPI scopre for these 2 solves? MPI_COMM_SELF or MPI_COMM_WORLD or something else? > At the very beginning, I need to pass options for s1 and s2 as I don't know > how things will turn out. > Say, things turn out in such a way that s2 solve is not done (not necessary) > : at that time, how to clear these options (that will not be used) related to > s2 ? > > In the doc, I see PetscOptionsLeft and PetscOptionsClearValue. I would need > something like PetscOptionsClearLeftValues locally on each proc (some proc > may need s2 so they must not clear options). Is this possible ? Perhaps the following alternatively would work? if (conditional) KSPSetFromOptions(s2) Satish