<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Oct 6, 2017 at 7:36 AM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Randy,<br>
<br>
First you absolutely must use version 3.8 or the master development copy. We improved and simplified dramatically how Fortran (90) is utilized from PETSc.<br>
<br>
Note that there is only one simple set of include files and modules for Fortran; see the newest documentation.<br><br></blockquote><div><br></div><div><a href="http://www.mcs.anl.gov/petsc/petsc-master/docs/manualpages/Sys/UsingFortran.html">http://www.mcs.anl.gov/petsc/petsc-master/docs/manualpages/Sys/UsingFortran.html</a><br></div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Barry<br>
<br>
<br>
> On Oct 5, 2017, at 11:48 PM, Randy Michael Churchill <<a href="mailto:rchurchi@pppl.gov">rchurchi@pppl.gov</a>> wrote:<br>
><br>
> 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.<br>
><br>
> file:rosenbrock1f.h:<br>
> module commondat<br>
> PetscReal :: alpha<br>
> PetscInt :: n<br>
> end module commondat<br>
><br>
> file:rosenbrock1f.90:<br>
> program rosenbrock1f<br>
> !!include statements??? which and where???!!!<br>
> use commondat<br>
> ...<br>
><br>
> subroutine FormFunctionGradient(tao, X, f, G, dummy, ierr)<br>
> use commondat<br>
> implicit none<br>
> ...<br>
><br>
> (<a href="https://www.mcs.anl.gov/petsc/petsc-dev/src/tao/unconstrained/examples/tutorials/rosenbrock1f.F90.html" rel="noreferrer" target="_blank">https://www.mcs.anl.gov/<wbr>petsc/petsc-dev/src/tao/<wbr>unconstrained/examples/<wbr>tutorials/rosenbrock1f.F90.<wbr>html</a>)<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.caam.rice.edu/~mk51/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div>
</div></div>