[petsc-dev] de-global variablelizing PETSc

Barry Smith bsmith at mcs.anl.gov
Sun Nov 10 18:22:16 CST 2013


On Nov 10, 2013, at 6:15 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> Barry Smith <bsmith at mcs.anl.gov> writes:
> 
>>   PetscInitializeBegin()
>>   PetscSetX()
>>   PetscSetY()
>>   ….
>>   PetscInitializeEnd() 
>> 
>>   where PetscInitialize() does the default of all of these things?
> 
> I'm not sure you need a special PetscInitializeEnd(), just
> PetscInitializeMinimal() and then pass arguments to the
> optional/customizable initialization steps.  

   What about any possibly customizable steps that the user choose not to set? When would they happen? I was thinking in the InitializeEnd(). I really don’t like the InitializeAsNeeded much later business since some initializations may be collective.

   We don’t have to save all the intermediate initialization info till the end. Each Set could trigger some initialization and the end only handles the left over.


   Barry


> It's easier to understand
> an error that is returned from the function that caused it then to store
> the arguments until one big function at the end, unless there are
> terribly confusing ordering problems.




More information about the petsc-dev mailing list