[petsc-dev] TAOPDIPM

Pierre Jolivet pierre.jolivet at enseeiht.fr
Wed Aug 5 02:10:07 CDT 2020


Sorry for these questions, I’m trying to help the said user transitioning from IPOPT over to Tao, and since I’m no expert I run into a bunch of errors myself.
For example, if I run PDIPM without equality constraint, I now get:
[0]PETSC ERROR: VecSet() line 522 in src/vec/vec/interface/rvector.c Null Object: Parameter # 1
Indeed, I can see that lambdae is conditionally created line 815, but always used in VecSet() line 522.
I think the method is general enough to handle cases without such constraints, and should not thus fail here, right?
You should be able to reproduce this by commenting all DE/De/EqualityConstraints/JacobianEquality code from ex1.c.

Thanks,
Pierre

> On 5 Aug 2020, at 5:27 AM, Abhyankar, Shrirang G <shrirang.abhyankar at pnnl.gov> wrote:
> 
> Pierre,
>   Thanks for catching this issue. As Alp pointed out, the issue was because the tolerance was not set correctly.
>  
> @Alp: Let me know if I can help you with the patch.
>  
> Thanks,
> Shri 
>  
>  
> From: petsc-dev <petsc-dev-bounces at mcs.anl.gov> on behalf of Pierre Jolivet <pierre.jolivet at enseeiht.fr>
> Date: Tuesday, August 4, 2020 at 1:46 PM
> To: "Dener, Alp" <adener at anl.gov>
> Cc: PETSc Development <petsc-dev at mcs.anl.gov>
> Subject: Re: [petsc-dev] TAOPDIPM
>  
> Thanks to you both, I’ll forward this to my user.
> Pierre
>  
>> On 4 Aug 2020, at 7:30 PM, Dener, Alp <adener at anl.gov <mailto:adener at anl.gov>> wrote:
>>  
>> Hi Pierre,
>>  
>> This is indeed an issue with TAO default tolerances.
>>  
>> Specifically it has to do with constraint tolerances. The default value is an exact zero.
>>  
>> The problem should still work with line 89 commented out. Our default gradient tolerance is 1e-8. In your case, commenting out line 90 is causing the solver to try to converge constraints to exact zero and it cannot.
>>  
>> I will get a patch out for this within the week but in the meantime please ensure that the constraint tolerances are set for any constrained problem.
>>  
>> Thank you!
>>>> Alp
>>  
>>> On Aug 4, 2020, at 12:24 PM, Munson, Todd via petsc-dev <petsc-dev at mcs.anl.gov <mailto:petsc-dev at mcs.anl.gov>> wrote:
>>>  
>>>  
>>> Hi Pierre,
>>>  
>>> I would say the answer to that question is "no, its not expected".  
>>>  
>>> We will look into fixing it.  It seems like the default tolerances are being set to zero and the result is an inability to satisfy the constraints or gradient of the Lagrangian to that small of a tolerance.
>>>  
>>> Thanks for point this out to us!  We will get it resolved.
>>>  
>>> Thanks, Todd.
>>>  
>>> On 8/4/20, 12:12 PM, "petsc-dev on behalf of Pierre Jolivet" <petsc-dev-bounces at mcs.anl.gov <mailto:petsc-dev-bounces at mcs.anl.gov> on behalf of pierre.jolivet at enseeiht.fr <mailto:pierre.jolivet at enseeiht.fr>> wrote:
>>>  
>>>    Hello,
>>>    If I comment line 89 and 90 of src/tao/constrained/tutorials/ex1.c from master, the example deadlocks with a single process.
>>>    Is this expected?
>>>  
>>>    Thanks,
>>>    Pierre
>>>  
>>>    $  ./ex1 -tao_monitor
>>>    ---- Constrained Problem -----
>>>    Solution should be f(1,1)=-2
>>>      0 TAO,  Function value: 8.,  Residual: 8.48528
>>>      1 TAO,  Function value: 1.28532,  Residual: 10.7411
>>>      2 TAO,  Function value: -2.56703,  Residual: 1.87847
>>>      3 TAO,  Function value: -2.03161,  Residual: 0.12881
>>>      4 TAO,  Function value: -1.99961,  Residual: 0.0450855
>>>      5 TAO,  Function value: -1.99993,  Residual: 0.000916939
>>>      6 TAO,  Function value: -1.99999,  Residual: 6.69184e-05
>>>      7 TAO,  Function value: -2.,  Residual: 7.15427e-06
>>>      8 TAO,  Function value: -2.,  Residual: 7.15779e-07
>>>      9 TAO,  Function value: -2.,  Residual: 7.15777e-08
>>>     10 TAO,  Function value: -2.,  Residual: 7.15777e-09
>>>     11 TAO,  Function value: -2.,  Residual: 7.15779e-10
>>>     12 TAO,  Function value: -2.,  Residual: 7.15775e-11
>>>     13 TAO,  Function value: -2.,  Residual: 7.1599e-12
>>>     14 TAO,  Function value: -2.,  Residual: 7.1599e-13
>>>     15 TAO,  Function value: -2.,  Residual: 7.22085e-14
>>>     16 TAO,  Function value: -2.,  Residual: 6.44626e-15
>>>     17 TAO,  Function value: -2.,  Residual: 1.00751e-15
>>>     18 TAO,  Function value: -2.,  Residual: 1.70295e-17
>>>     19 TAO,  Function value: -2.,  Residual: 1.70295e-18
>>>     20 TAO,  Function value: -2.,  Residual: 1.70295e-19
>>>     21 TAO,  Function value: -2.,  Residual: 1.70295e-20
>>>     22 TAO,  Function value: -2.,  Residual: 1.70295e-21
>>>     23 TAO,  Function value: -2.,  Residual: 1.70295e-22
>>>     24 TAO,  Function value: -2.,  Residual: 1.70295e-23
>>>     25 TAO,  Function value: -2.,  Residual: 1.70295e-24
>>>     26 TAO,  Function value: -2.,  Residual: 1.70295e-25
>>>     27 TAO,  Function value: -2.,  Residual: 1.70295e-26
>>>     28 TAO,  Function value: -2.,  Residual: 1.70295e-27
>>>     29 TAO,  Function value: -2.,  Residual: 1.70295e-28
>>>     30 TAO,  Function value: -2.,  Residual: 1.70295e-29
>>>     31 TAO,  Function value: -2.,  Residual: 1.70295e-30
>>>     32 TAO,  Function value: -2.,  Residual: 1.70295e-31
>>>     33 TAO,  Function value: -2.,  Residual: 1.70295e-32
>>>     34 TAO,  Function value: -2.,  Residual: 1.70295e-33
>>>     35 TAO,  Function value: -2.,  Residual: 1.70295e-34
>>>     36 TAO,  Function value: -2.,  Residual: 1.70295e-35
>>>     37 TAO,  Function value: -2.,  Residual: 1.70295e-36
>>>     38 TAO,  Function value: -2.,  Residual: 1.70295e-37
>>>     39 TAO,  Function value: -2.,  Residual: 1.70295e-38
>>>     40 TAO,  Function value: -2.,  Residual: 1.70295e-39
>>>     41 TAO,  Function value: -2.,  Residual: 1.70295e-40
>>>     42 TAO,  Function value: -2.,  Residual: 1.70295e-41
>>>     43 TAO,  Function value: -2.,  Residual: 1.70295e-42
>>>     44 TAO,  Function value: -2.,  Residual: 1.70295e-43
>>>     45 TAO,  Function value: -2.,  Residual: 1.70295e-44
>>>     46 TAO,  Function value: -2.,  Residual: 1.70295e-45
>>>     47 TAO,  Function value: -2.,  Residual: 1.70295e-46
>>>     48 TAO,  Function value: -2.,  Residual: 1.70295e-47
>>>     49 TAO,  Function value: -2.,  Residual: 1.70295e-48
>>>     50 TAO,  Function value: -2.,  Residual: 1.70295e-49
>>>     51 TAO,  Function value: -2.,  Residual: 1.70295e-50
>>>     52 TAO,  Function value: -2.,  Residual: 1.70295e-51
>>>    ^C

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20200805/4dd8fe26/attachment-0001.html>


More information about the petsc-dev mailing list