If you truly want to insert the command line options again (and not from the 
environment or files) then you could use PetscOptionsInsertArgs_Private() which 
doesn't care about comm. But we would need to make that public.

   Insertions from the environment may be iffy with the hack you are doing if 
the original MPI start up process isn't including in that sub communicator. 

   Barry


On Apr 4, 2013, at 5:53 PM, Derek Gaston <friedmud at gmail.com> wrote:

> On Tue, Apr 2, 2013 at 12:09 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>     You can use PetscGetArgs() followed by by PetscOptionsInsert(). Let us 
> know if you have any troubles with this.
> 
> Hmmm... any chance of getting a version of that function that takes an 
> MPI_Comm?  It is using PETSC_COMM_WORLD implicitly inside it.... and I need 
> to call it asynchronously on sub-communicators.
> 
> For now I have it working by swapping out PETSC_COMM_WORLD with my 
> sub-communicator before calling that function.... but that's less than ideal 
> ;-)
> 
> Derek

Reply via email to