[petsc-users] help: (petsc-dev) + petsc4py acessing the tao optimizations solvers ?

Jason Sarich jason.sarich at gmail.com
Wed May 14 09:57:19 CDT 2014


Hi Andre,

TAO specializes in unconstrained and bound-constrained optimization, there
is not a lot of support for linear constrained optimization.
There is an interior point solver (ipm) that can accept general
constraints, there are new functions for setting up these constraints, they
aren't quite solid yet, and I've not very experienced in using the petsc4py
package, but I can give you some general help.

There is a simple C example using nonlinear constraints in
src/tao/examples/tutorials/toy.c, you should be able to easily  modify this
for your example, where the equality constraint function will evaluate Ax-b
and the equality jacobian will be the A matrix (you won't need to set the
inequality constraint or jacobian). Because the ipm method builds a KKT
system and solves it, it doesn't work well with iterative methods, a direct
solver like superlu may be necessary.

I don't know enough about the actual python bindings to give you an example
program in python, but it should follow pretty directly from the C example.
Please let me know if you have any specific questions.

Jason Sarich



On Wed, May 14, 2014 at 9:29 AM, André Timótheo <atmmachado at gmail.com>wrote:

>  p.s. I am not quite sure of the need of petsc-dev. I Just read about the
> inclusion of tao solvers in it and installed petsc-dev, cython and petsc4py
> on my ubuntu 12.04.
>
>  Unfortunately petsc4py (and the old tao4py) documentation does not have
> this type of python documented examples. After some correspondence in
> petsc4py mailing list they suggested that I might find some help on
> petsc-users mailing list.
>
>
> 2014-05-14 10:07 GMT-03:00 André Timótheo <atmmachado at gmail.com>:
>
>     I read about the merger of the TAO solvers on the PETSC-DEV.
>>
>>      How can I use the TAO's constrainded optimization solver on
>> the PETSC-DEV (via petsc4py)?
>>
>>      Can you show me some simple python script to deal with classical
>> linear
>> constrainded optimization problems like:
>>
>>          minimize sum(x) subject to x >= 0 and Ax = b
>>
>>      Thanks for your time.
>>
>>  Andre
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140514/39c156da/attachment-0001.html>


More information about the petsc-users mailing list