[petsc-users] Converting complex PDE to real for KNL performance ?

Jed Brown jed at jedbrown.org
Tue Apr 14 17:53:34 CDT 2020


We'd have complex values in vectors that contain the likes of gradients
with respect to (real-valued) parameters so there would likely need to
be lots of PetscRealPart() within TAO.  It won't just compile if we turn
on complex, but these changes should be feasible and is surely a better
solution than having users write real-equivalent formulations of their
complex-valued PDE solvers.

Matthew Knepley <knepley at gmail.com> writes:

> On Tue, Apr 14, 2020 at 6:26 PM Stefano Zampini <stefano.zampini at gmail.com>
> wrote:
>
>> Not true in general when you minimize an objective function as a
>> functional of the parameter only
>> For same methods (Newton for example, gradient descent, etc) the state
>> variables do no enter the minimization, so it should be fine to have
>> complex-valued state variables
>>
>
> Yes, this was my thinking. Of course, there are problems which do not work,
> but I am guessing would could enable
> the complex build at least for experts.
>
>   Thanks,
>
>     Matt
>
>
>> On Apr 15, 2020, at 1:04 AM, Zhang, Hong via petsc-users <
>> petsc-users at mcs.anl.gov> wrote:
>>
>> Sorry for the time travel. As far as I know, optimization over
>> complex-valued parameters is not a well-defined problem. I am not sure how
>> you can develop an optimization algorithm for it. Perhaps our optimization
>> experts have better suggestions in this direction.
>>
>> The real-valued formulation seems to be more promising to me. The
>> preconditioning is hard, but still doable with fieldsplit as Mark mentioned.
>>
>> Hong (Mr.)
>>
>> On Apr 14, 2020, at 1:42 PM, Sajid Ali <sajidsyed2021 at u.northwestern.edu>
>> wrote:
>>
>> Hi Hong,
>>
>> Apologies for creating unnecessary confusion by continuing the old thread
>> instead of creating a new one.
>>
>> While I looked into converting the complex PDE formulation to a real
>> valued formulation in the past hoping for better performance, my concern
>> now is with TAO being incompatible with complex scalars. I would've
>> preferred to keep the complex PDE formulation as is (given that I spent
>> some time tuning it and it works well now) for cost function and gradient
>> evaluation while using TAO for the outer optimization loop.
>>
>> Using TAO has the obvious benefit of defining a multi objective cost
>> function, parametrized as a fit to a series of measurements and a set of
>> regularizers while not having to explicitly worry about differentiating the
>> regularizer or have to think about implementing a good optimization scheme.
>> But if it converting the complex formulation to a real formulation would
>> mean a loss of well conditioned forward solve (and increase in solving time
>> itself), I was wondering if it would be better to keep the complex PDE
>> formulation and write an optimization loop in PETSc while defining the
>> regularizer via a cost integrand.
>>
>> Thank You,
>> Sajid Ali | PhD Candidate
>> Applied Physics
>> Northwestern University
>> s-sajid-ali.github.io
>>
>>
>>
>>
>
> -- 
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
> https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>


More information about the petsc-users mailing list