<div dir="ltr">A simple setup question with TAO: if I were to convert the rosenbrock1f.F90 example to use a module instead of common structures, how would I setup the include statements? I've tried various combinations (using petscXXXdef.h, petscXXX.h, petscXXX.h90, along with use petscXXX), but seem to get errors with all. <div><br></div><div>file:rosenbrock1f.h:</div><div>module commondat</div><div><div>      PetscReal    ::    alpha</div><div>      PetscInt     ::    n</div><div>end module commondat</div></div><div><br></div><div>file:rosenbrock1f.90:<br></div><div>program rosenbrock1f</div><div>!!include statements??? which and where???!!!</div><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>use commondat</div><div>...</div></blockquote></div><div><div><br></div><div>subroutine FormFunctionGradient(tao, X, f, G, dummy, ierr)</div><div>     use commondat</div></div><div>     implicit none</div><div>     ...</div><div><br></div><div>(<a href="https://www.mcs.anl.gov/petsc/petsc-dev/src/tao/unconstrained/examples/tutorials/rosenbrock1f.F90.html">https://www.mcs.anl.gov/petsc/petsc-dev/src/tao/unconstrained/examples/tutorials/rosenbrock1f.F90.html</a>)</div></div>