Gfortran, fpm, etc entries for tldr-pages

Do you know tldr? Not the internet slang, but the tldr-project, which is a collection of community-maintained help pages for CLI tools, that aims to be a simpler, more approachable complement to traditional man pages.

I just discovered that there are no entries for Fortran tools like GFortran, ifort, fpm…

I would like to add such pages. Maybe we could collect tools (especially compilers and fpm) which should get tldr-pages, and then collect the five most relevant examples for each of them.

Contribution guide

As a side note, tldr-pages can (and perhaps should) include translations.

Edit: Here a list of tools and compilers that came into my mind:

  • GFortran
  • ifort
  • LFortran
  • fpm
  • fypp
  • FORD
    additions from responses:
  • ifx
  • caf
  • mpirun/mpiexec
  • nvfortran (and flang)
8 Likes

I had no clue about tldr! It seems very quaint, and I immediately installed it.

Notes:

  • ifort may want to mention ifx will be the compiler replacing ifort in the future (and therefore we probably want a page for ifx). We may also want to include the coarray options for ifx in one of the examples, e.g.
Compile program.f90 using Fortran coarrays with [distributed]-memory vs [shared]-memory approaches, 
using [8] processes [default: uses all detected processors] to [o]utput an executable with a given name.
ifx -coarray=distributed -coarray-num-images=8 -o my_coarray_prog ./program.f90
  • I noticed mpirun/mpiexec doesn’t have a page yet either.
  • nvfortran is also an important Fortran compiler IMO. Not up-to-date w.r.t. the standard, but creates CUDA Fortran, which I find very useful.

I just started by copying the GCC page and replacing every gcc with gfortran and every .c witch .f90. Additionally, I changed the include path name to -I{{path/to/mod_and_include}}. I also adapted the first two lines (short description and link).
What do you think? Should I open a PR?

I just realized tldr supports subcommands. This means we can have an extra page for every fpm subcommand.

Edit: update link

1 Like

The first page, GFortran, just got merged into main.

I will create pages for fpm in the future, but I don’t feel comfortable with the other tools, as I don’t use them regularly (or at all).

2 Likes

And it already works. Cool, and thanks!

(tldr) scott@iceberg:GaugeInfill$ tldr gfortran

  gfortran

  Preprocess and compile Fortran source files, then assemble and link them together.
  More information: https://gcc.gnu.org/wiki/GFortran.

  - Compile multiple source files into an executable:
    gfortran path/to/source1.f90 path/to/source2.f90 ... -o path/to/output_executable

  - Show common warnings, debug symbols in output, and optimize without affecting debugging:
    gfortran path/to/source.f90 -Wall -g -Og -o path/to/output_executable

  - Include libraries from a different path:
    gfortran path/to/source.f90 -o path/to/output_executable -Ipath/to/mod_and_include -Lpath/to/library -llibrary_name

  - Compile source code into Assembler instructions:
    gfortran -S path/to/source.f90

  - Compile source code into an object file without linking:
    gfortran -c path/to/source.f90
2 Likes