<div dir="ltr"><div dir="ltr"><div dir="ltr">If I compile PETSc with complex support, all of the TAO methods are not registered.<div>Fare enough? not really, I can imagine at least three valid reasons to use those</div><div><br></div><div>1) I want to check that my code works for complex builds, even if I have pure real function evaluations. I may need complex support in other parts or the code (not when using TAO), or I just want to be a diligent PETSc developer</div><div>2) I want to test REAL gradients or Hessians using built-in capability, instead of writing my own</div><div>3) I want to use the complex differentiation trick to compute REAL gradients</div><div><br></div><div>Last time I checked, at least option 2) was available; However, from commit 5921d7004dad83427f45468906667b100d2e2b6e, no Tao methods are registered when PETSC_USE_COMPLEX is defined, and code like the one below fail at runtime:</div><div><br></div><div>TaoCreate()</div><div>TaoSetFromOption()</div><div>TaoSetObjectiveRoutine()</div><div>TaoTestGradient()</div><div><div><div><div><br></div><div>[0]PETSC ERROR: Unknown type. Check for miss-spelling or missing package: <a href="http://www.mcs.anl.gov/petsc/documentation/installation.html#external">http://www.mcs.anl.gov/petsc/documentation/installation.html#external</a></div><div>[0]PETSC ERROR: Unable to find requested Tao type lmvm</div></div><div><br></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Stefano</div></div></div></div></div></div>