[petsc-users] run option

Barry Smith bsmith at mcs.anl.gov
Mon Jun 28 18:13:20 CDT 2010


  
   Run with -ts_view   it is likely running with the default explicit method Euler which requires no solver and hence no preconditioner. You need to use an implicit method if you want to use it with a preconditioner.

    Barry

On Jun 28, 2010, at 3:27 PM, Xuan YU wrote:

> 
> On Jun 28, 2010, at 4:17 PM, Barry Smith wrote:
> 
>> 
>> On Jun 28, 2010, at 3:13 PM, Xuan YU wrote:
>> 
>>> 
>>> On Jun 28, 2010, at 3:47 PM, Barry Smith wrote:
>>> 
>>>> 
>>>> Do you have a TSSetFromOptions() or a SNESSetFromOptions() or a KSPSetFromOptions() or a PCSetFromOptions(). If not then the option never gets processed and used.
>>>> 
>>> I only have  ierr = TSSetFromOptions(ts);CHKERRQ(ierr).
>> 
>>   That is fine, that calls PCSetFromOptions() and should process your option. Perhaps you set a prefix for the TS that you need in setting the preconditioner type.
>> 
> This is the petsc code:
>         ierr = TSCreate(PETSC_COMM_WORLD,&ts);CHKERRQ(ierr);
>         ierr = TSSetProblemType(ts,TS_NONLINEAR);CHKERRQ(ierr);
>         ierr = TSMonitorSet(ts,Monitor,&appctx,PETSC_NULL);CHKERRQ(ierr);
>         ierr = TSSetSolution(ts,CV_Y);CHKERRQ(ierr);
>         ierr = TSSetRHSFunction(ts,f,&appctx);CHKERRQ(ierr);
>         ierr = TSSetInitialTimeStep(ts,0,1.0);CHKERRQ(ierr);
>         ierr = TSSetDuration(ts,cData.EndTime,cData.EndTime);CHKERRQ(ierr);
>         ierr = TSSetFromOptions(ts);CHKERRQ(ierr);
>         ierr = TSSetUp(ts);CHKERRQ(ierr);
>         ierr = TSStep(ts,&its,&ftime);CHKERRQ(ierr);
>         ierr = VecDestroy(CV_Y);CHKERRQ(ierr);
>         ierr = TSDestroy(ts);CHKERRQ(ierr);
>         ierr = PetscFinalize();CHKERRQ(ierr);
> 
> 
> 
>>   Barry
>> 
>>> 
>>> 
>>> 
>>>> Barry
>>>> 
>>>> On Jun 28, 2010, at 2:24 PM, Xuan YU wrote:
>>>> 
>>>>> Hi,
>>>>> 
>>>>> I run my code by ./xxx -pc_type icc
>>>>> 
>>>>> But it says:
>>>>> 
>>>>> WARNING! There are options you set that were not used!
>>>>> WARNING! could be spelling mistake, etc!
>>>>> Option left: name:-pc_type value: icc
>>>>> 
>>>>> Could you please tell me what happened?
>>>>> 
>>>>> Xuan YU
>>>>> xxy113 at psu.edu
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>> 
>>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>> 
>> 
> 
> Xuan YU (俞烜)
> xxy113 at psu.edu
> 
> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20100628/03148f02/attachment.htm>


More information about the petsc-users mailing list