[petsc-users] Parallel vector layout for TAO optimization with separable state/design structure
Guenther, Stefanie
guenther5 at llnl.gov
Tue Jan 30 09:53:07 CST 2024
Hi Petsc team,
I have a question regarding parallel layout of a Petsc vector to be used in TAO optimizers for cases where the optimization variables split into ‘design’ and ‘state’ variables (e.g. such as in PDE-constrained optimization as in tao_lcl). In our case, the state variable naturally parallelizes evenly amongst multiple processors and this distribution is fixed. The ‘design’ vector however does not, it is very short compared to the state vector and it is required on all state-processors when evaluating the objective function and gradient. My question would be how the TAO optimization vector x = [design,state] should be created in such a way that the ‘state’ part is distributed as needed in our solver, while the design part is not.
My only idea so far was to copy the design variables to all processors and augment / interleave the optimization vector as x = [state_proc1,design, state_proc2, design, … ] . When creating this vector in parallel on PETSC_COMM_WORLD, each processor would then own the same number of variables ( [state_proc<i>, design] ), as long as the numbers match up, and I would only need to be careful when gathering the gradient wrt the design parts from all processors.
This seems cumbersome however, and I would be worried whether the optimization problem is harder to solve this way. Is there any other way to achieve this splitting, that I am missing here? Note that the distribution of the state itself is given and can not be changed, and that the state vs design vectors have very different (and independent) dimensions.
Thanks for your help and thoughts!
Best,
Stefanie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240130/ee3d9e36/attachment.html>
More information about the petsc-users
mailing list