[petsc-users] Fortran Interface

Palmer, Bruce J Bruce.Palmer at pnnl.gov
Tue Dec 12 13:54:57 CST 2023


I think having a link to your fortran interface page on the C/Fortran API tab is probably sufficient, particularly if the interfaces are similar. If functions have significant differences between C and Fortran, it would be helpful if the notes about it are on the page describing the function.

I’m the project lead for Global Arrays and we wrote our API documentation in LaTeX. Each function has C and Fortran-specific documentation as well as some generic documentation that can apply to either interface. We run the tex files through a preprocessor that filters out just the C or Fortran-specific text to build the documentation for the C or Fortran API. It sorta works, but it is a fair amount of effort to keep everything synched up and we have a lot fewer functions in our API than you do. The one advantage is that everything about a particular function is located in one spot, so it makes it relatively easy to fix everything up if you make changes.

Bruce

From: Barry Smith <bsmith at petsc.dev>
Date: Tuesday, December 12, 2023 at 9:07 AM
To: Palmer, Bruce J <Bruce.Palmer at pnnl.gov>
Cc: Matthew Knepley <knepley at gmail.com>, petsc-users at mcs.anl.gov <petsc-users at mcs.anl.gov>
Subject: Re: [petsc-users] Fortran Interface

  It is unlikely we will ever be able to maintain full manual pages for Fortran for all routines. But yes, the current pages are C-centric.

  Do you have any suggestions on what we could add to the current manual pages or how to format them etc that would make them better for Fortran users who are not used to C?  A Fortran synopsis as well as the C one, or a single synopsis that is easier for both Fortran and C users to follow?

  Barry

I am not sure it is trivial to automatically generate the Fortran synposis with appropriate use and include information but one could argue that we should.




On Dec 12, 2023, at 11:40 AM, Palmer, Bruce J via petsc-users <petsc-users at mcs.anl.gov> wrote:

Thanks! It might be useful if there were a link to this page near the top of the C/Fortran API page.

Bruce

From: Matthew Knepley <knepley at gmail.com<mailto:knepley at gmail.com>>
Date: Tuesday, December 12, 2023 at 8:33 AM
To: Palmer, Bruce J <Bruce.Palmer at pnnl.gov<mailto:Bruce.Palmer at pnnl.gov>>
Cc: petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov> <petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov>>
Subject: Re: [petsc-users] Fortran Interface
Check twice before you click! This email originated from outside PNNL.

On Tue, Dec 12, 2023 at 11:27 AM Palmer, Bruce J via petsc-users <petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov>> wrote:
Does documentation for the PETSc fortran interface still exist? I looked at the web pages for 3.20 (petsc.org/release<http://petsc.org/release>) but if you go under the tab C/Fortran API, only descriptions for the C interface are there.

I think after the most recent changes, the interface was supposed to be very close to C, so we just document the differences on specific pages, and put the general stuff here:

  https://petsc.org/release/manual/fortran/

   Thanks,

     Matt

Bruce Palmer


--
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/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20231212/494f8dda/attachment.html>


More information about the petsc-users mailing list