[petsc-dev] petsc4py, TAO, and complex scalars

Lisandro Dalcin dalcinl at gmail.com
Tue Jul 8 08:57:35 CDT 2014


On 8 July 2014 15:16, Matthew Knepley <knepley at gmail.com> wrote:
> On Tue, Jul 8, 2014 at 2:09 PM, Lisandro Dalcin <dalcinl at gmail.com> wrote:
>>
>> Some time ago I merged tao4py in petsc4py following PETSc. Now I
>> realize that TA0 is not available for --with-scalar-type=complex, all
>> of the TAO API is not built. Adding support for this case in petsc4py
>> will be rather involved, so I want to propose an alternative.
>>
>> I have a rather small patch that enables the compile of interface TAO
>> APIs.  With this patch, I can build petsc4py, but obviously any
>> attempt of use a specific TAO solver type fails at runtime because the
>> solve implementations are not registered. But at least, petsc4py can
>> be built with complex scalars and all other PETSc components can be
>> used normally.
>>
>> What do you think? If you accept this proposal, I'll put all this in a
>> branch for review. Additionally, I would like to merge this fix into
>> maint.
>
>
> That sounds fine to me. We will fix this for the next release, so it would
> just hang around until then.
>

https://bitbucket.org/petsc/petsc/branch/dalcinl/tao-complex_scalars

This hook is a hack, but seems the easiest way to support complex scalars:
https://bitbucket.org/petsc/petsc/commits/a62a097f5bb5c39fb23ca6e1f9f37f7c197bfa6d?at=master#Lsrc/tao/matrix/lmvmmat.cT5

Please review,

-- 
Lisandro Dalcin
---------------
CIMEC (UNL/CONICET)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
3000 Santa Fe, Argentina
Tel: +54-342-4511594 (ext 1016)
Tel/Fax: +54-342-4511169



More information about the petsc-dev mailing list