[petsc-dev] PetscIntialize docs

Mark F. Adams mfadams at lbl.gov
Thu Sep 5 14:50:20 CDT 2013


On Sep 5, 2013, at 3:39 PM, Satish Balay <balay at mcs.anl.gov> wrote:

> On Thu, 5 Sep 2013, Mark F. Adams wrote:
> 
>> 
>> On Sep 5, 2013, at 3:29 PM, Satish Balay <balay at mcs.anl.gov> wrote:
>> 
>>> On Thu, 5 Sep 2013, Mark F. Adams wrote:
>>> 
>>>> 
>>>> On Sep 5, 2013, at 12:46 PM, Satish Balay <balay at mcs.anl.gov> wrote:
>>>> 
>>>>> On Thu, 5 Sep 2013, Satish Balay wrote:
>>>>> 
>>>>>> On Thu, 5 Sep 2013, Mark F. Adams wrote:
>>>>> 
>>>>>>> I wanted to not have files get checked and added -skip_petscrc to
>>>>>>> the command line but this was not sufficient.  I needed to change
>>>>>>> the code to use NULL (or I told my user to do so).
>>>>> 
>>>>> Was 'useroptfile' causing some problem - or is it that you wanted to
>>>>> avoid it for some other reason?
>>>> 
>>>> This was the problem with Mira that we went through with Jeff H. last week.  Where getting the home directory was failing occasionally and hanging the system.  So I was told to use -skip_petscrc on the command line, which failed to get the code to skip the (user) RC file.
>>> 
>>> But did the code hang or crash?
>> 
>> No, we have been running small problems, for debugging, and small problems to not trigger this bug.
> 
> 
> Just to clarify - the buggy 'getpwuid(getuid())' on bgq induced a
> deadlock in MPI messaging - which -skip_petscrc avoids. That doesn't
> imply 'avoid loading all petscopt/usropt files'.
> 

Ah yes, I was being simplistic and trying to avoid all rc files.  So all we need to do is add -skip_petsrc to the the user specified file, or the command line, and this will avoid trying to get the home directory.

Mark

> My fix [with the assumption of 'getpwuid(getuid())' can ocassionally
> return null] continues to load the rc files - provided the path can be
> resolved.
> 
> Jed subsequent change [hasn't merged to maint yet] - is to avoid
> getpwuid() - to avoid cases where it can SEGV. [i.e HOME/.petscrc will
> never get resolved on bgq]
> 
> I haven't seen SEGVs on bgq - but they did occur in preproduction bgq
> software stack.
> 
> Satish
> 
>> 
>>> 
>>> Satish
>>> 
>>>> In looking at the code I realized that you need to not give PetscInitialize() an RC file name.   So we need to change the code slightly but it took a while to figure that out (e.g., I had to look at the source).
>>>> 
>>>>> 
>>>>> thanks,
>>>>> Satish
>>>>> 
>>>> 
>>>> 
>>> 
>> 
>> 
> 




More information about the petsc-dev mailing list