[Facets-devel] PETSC ERROR

Barry Smith bsmith at mcs.anl.gov
Thu Jun 4 16:26:11 CDT 2009


   Satish,

     I guess you can add another argument to PetscInitialize()  
PetscTruth require; but this breaks every code ever written.
Have fun with etags fixing all our examples :-)


    Barry

Any other fix is a hack.

On Jun 4, 2009, at 4:17 PM, Satish Balay wrote:

> This doesn't work - as some of the options are required during
> PetscIntialize().
>
> Satish
>
> On Thu, 4 Jun 2009, Barry Smith wrote:
>
>>
>>  If they want it optional then they should pass  
>> PETSC_NULL_CHARACTER in
>> PetscInitialize() and then call PetscOptionsInsertFile() afterwards  
>> with the
>> appropriate flag.
>> So, no change to current approach.
>>
>>  Barry
>>
>> In the future we may just wish to ditch the file argument from
>> PETScInitialize()
>>
>>
>> On Jun 4, 2009, at 3:37 PM, Satish Balay wrote:
>>
>>> Barry/Matt,
>>>
>>> Should we make optfile in PetscIntialize(optfile) optional?
>>>
>>> Current code is:
>>>
>>> PetscIntialize("file") -> PetscOptionsInsert(optfile) ->
>>> PetscOptionsInsertFile(optfile,PETSC_TRUE)
>>>
>>> i.e it gives error if the "optfile" is not found.
>>>
>>> Should the code be changed to use:
>>> PetscOptionsInsertFile(optfile,PETSC_FALSE)?
>>>
>>>
>>> Alternatives would be to expose the flag - a bit higher [i.e use
>>> PetscOptionsInsert(file,flg)] or expose it further up to
>>> PetscIntialize(optfile,flg). But changing PetscIntialize() might not
>>> be desireable.
>>>
>>>
>>> I'm inclined to use:
>>> PetscIntialize("file") -> PetscOptionsInsert(optfile,PETSC_FALSE) ->
>>> PetscOptionsInsertFile(optfile,flg)
>>>
>>> Satish
>>>
>>> On Thu, 4 Jun 2009, John R. Cary wrote:
>>>
>>>> In the UEDGE tests we get
>>>>
>>>> oxygen.cary$ grep PETSC */*.out | grep petscopt
>>>> setup/alloc-cxxpy.out:[0]PETSC ERROR: Unable to open Options File
>>>> petscopt!
>>>> tokgeo_HffCnog_ss/tokHffCnog-cxxpy.out:[0]PETSC ERROR: Unable to  
>>>> open
>>>> Options File petscopt!
>>>> tokgeo_HmsCnog_ss/tokHmsCnog-cxxpy.out:[0]PETSC ERROR: Unable to  
>>>> open
>>>> Options File petscopt!
>>>> tokgeo_H/tokHsm-cxxpy.out:[0]PETSC ERROR: Unable to open Options  
>>>> File
>>>> petscopt!
>>>>
>>>>
>>>> Is this really an error?  The code seems to run fine, but those  
>>>> error
>>>> messages would be disconcerting to a user.
>>>>
>>>> John
>>>> _______________________________________________
>>>> Facets-devel mailing list
>>>> Facets-devel at ice.txcorp.com
>>>> https://ice.txcorp.com/mailman/listinfo/facets-devel
>>>>
>>>
>>
>




More information about the petsc-dev mailing list