Satish, I answered your questions beneath. Barry, to answer your question: I may (or not) get messages like "WARNING! There are options you set that were not used!...Option left: name". These messages "pollute" the output. As I try to run/compare lots of cases, I have lots of output logs. To post process them (= get some plots), these eventual unexpected messages make things tricky / not so easy (more annoying than blocking anyway)...
I was just trying to get outputs as "clean" (relevant) as possible to post process logs in a more convenient/efficient way. If I could get rid off the "WARNING! There are options you set that were not used!...Option left: name" message, it could do the trick. Franck ----- Mail original ----- > De: "Satish Balay" <ba...@mcs.anl.gov> > À: "Franck Houssen" <franck.hous...@inria.fr> > Cc: "petsc-dev" <petsc-dev@mcs.anl.gov> > Envoyé: Mardi 1 Août 2017 18:14:22 > Objet: Re: [petsc-dev] How to clear (locally - on each MPI proc) all options > related to a given prefixed solver ? > > 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. > OK, I didn't get that. I believed each proc had its own "copies" of options. > > > > 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? MPI_COMM_SELF... Humm, so, options are "local" to each proc in this case ? Or collective ? > > > 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) No sure ! Still need to think if this approach could work. > > Satish > >