On Sep 5, 2013, at 12:39 PM, Matthew Knepley <[email protected]> wrote:

> On Thu, Sep 5, 2013 at 11:35 AM, Mark F. Adams <[email protected]> wrote:
> 
> On Sep 5, 2013, at 6:16 AM, Matthew Knepley <[email protected]> wrote:
> 
>> On Thu, Sep 5, 2013 at 1:19 AM, Mark F. Adams <[email protected]> wrote:
>> In 
>> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscInitialize.html
>>  I see:
>> 
>> file - [optional] PETSc database file, also checks ~username/.petscrc and 
>> .petscrc use NULL to not check for code specific file. Use -skip_petscrc in 
>> the code specific file to skip the .petscrc files
>> 
>> I don't understand what "Use -skip_petscrc in the code specific file" means. 
>>  In looking at the code it seems like this line should read something like:
>> 
>> … If you do not want to use a resource file, use NULL and add -skip_petscrc 
>> to the command line.
>> 
>> Here is what it is trying to say. There are three files we can check:
>> 
>>  1) ~username/.petscrc
>>  2) cwd/.petscrc
>>  3) "code specific file", whose name is passed into PetscIntitialize()
>> 
>> If you pass in NULL to PetscInitialize(), it will not check option 3). If 
>> you pass in a real name to PetscIntiialize(), and
>> in the "code specific file" you put -skpi_petscrc, then it will not check 
>> options 1) and 2).
> 
> OK, I'm being dense but I think to be explicit you need to add "If you pass 
> in NULL and use -skip_petscrc on the command line then no files will be 
> checked."
> 
> 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).  Sorry but I could not figure this out from the 
> docs or even your better explanation w/o looking at the code.  It is natural 
> to want to just add a command line option w/o recompiling, and this would be 
> possible (not that I'm volunteering to do it) and would fit the PETSc 
> philosophy of using command lines args and not user code to control.  Perhaps 
> this is a dummy proof doc:
> 
> There are three files we can check:
> 
>  1) ~username/.petscrc
>  2) cwd/.petscrc and cwd/petscrc
>  3) This code specific file.
> 
> If you pass in NULL, it will not check option 3) and if you additionally use 
> -skip_petsc on the command line then no files will checked. If you pass in a 
> real file name, and you put -skpi_petscrc in this file, then it will not 
> check options 1) and 2).
> 
> Why don't we change it so that not even the "code specific file" is checked 
> with passing -skip_petscrc? I think this makes more sense
> and it would solve Mark's problem, and likely other future problems.

This would be easy to do.  Satish's suggestion of a new parameter 
-skip_useroptfile would work too but and more stuff … I would vote for Matt's 
solution.

> 
>    Matt
> 
> -- 
> What most experimenters take for granted before they begin their experiments 
> is infinitely more interesting than any results to which their experiments 
> lead.
> -- Norbert Wiener

Reply via email to