fpm icon indicating copy to clipboard operation
fpm copied to clipboard

Candidate packages to get working

Open certik opened this issue 4 years ago • 8 comments

Here are a few good candidate packages to get working with fpm first, that are relatively simple (and so possible to package soon), yet very useful.

Pure Fortran (Simple)

  • [x] https://github.com/wavebitscientific/functional-fortran
  • [x] https://github.com/jacobwilliams/bspline-fortran
  • [x] https://github.com/fortran-lang/stdlib
  • [ ] https://github.com/astrofrog/fortranlib
  • [ ] https://github.com/certik/fortran-utils/
  • [x] https://github.com/wavebitscientific/datetime-fortran
  • [x] https://github.com/jacobwilliams/pyplot-fortran

Pure Fortran (More Complex)

  • [ ] https://github.com/Reference-LAPACK/lapack
  • [ ] https://github.com/opencollab/arpack-ng
  • [x] https://github.com/jacobwilliams/json-fortran
  • [x] https://github.com/jacobwilliams/Fortran-Astrodynamics-Toolkit
  • [ ] https://github.com/Goddard-Fortran-Ecosystem/pFUnit
  • [ ] https://github.com/szaghi/StringiFor (Lots of dependencies)

Fortran with non-Fortran dependencies

  • [x] https://github.com/scivision/h5fortran
  • [x] https://github.com/scivision/nc4fortran
  • [x] https://github.com/SHTOOLS/SHTOOLS
  • [ ] https://github.com/unidata/netcdf-fortran

And obviously any other more complicated package from https://github.com/fortran-lang/stdlib/wiki/List-of-popular-open-source-Fortran-projects.

Any other candidates?

certik avatar Jan 15 '20 22:01 certik

I added nc4fortran and netcdf-fortran to the list.

milancurcic avatar Jan 16 '20 03:01 milancurcic

I recall reading a comment once (might have been from @jacobwilliams) that "Netlib is where Fortran codes go to die".

Well I just resurrected the y12m package for sparse linear systems published all the way back in 1981!

In the documentation the library claims to use only standard Fortran features (at the time), and indeed - it builds with both gfortran (warnings about deprecated syntax) and Intel Fortran (no errors) straight out of the box! I thinks it's a great showcase of the strength of Fortran and also fpm. :+1:

One of the authors - Zahari Zlatev - is an established scientist in environmental modelling and sparse linear algebra. I presume the code was used in the Unified Danish Eulerian Model - an atmospheric model used to study transport of air pollutants.

Several more netlib packages are interesting candidates: http://www.netlib.org/liblist.html

Someone teaching a Fortran programming class (@awvwgk) chould give this as a homework assignment: each student who wants to pass should create the manifest and interface module for one Netlib package. The Intel Fortran compiler already knows how to automatically generate interface blocks. Then it is just a matter of aggregating them in a single interface module.

Maybe the maintainers of Netlib from University of Tennessee and Oak Ridge National Laboratory would also be willing to support such a modernization effort.

ivan-pi avatar Feb 17 '21 21:02 ivan-pi

LINPACK now also works with fpm, even if superceded by LAPACK for modern usage.

Some of the available Netlib packages (still) depend on LINPACK, so an fpm package is the best way to fulfill these dependencies.

I think I might create a table to track which Netlib codes are already fpm-compatible. What do you think?

ivan-pi avatar Feb 19 '21 07:02 ivan-pi

@ivan-pi yes!

We should setup some automatic tests to ensure things keep working when we upgrade fpm, such as after treating .f as free form, which would require to add a flag to fpm.toml.

This is exciting, I might actually start using some of these Fortran packages!

certik avatar Feb 19 '21 16:02 certik

I think I might create a table to track which Netlib codes are already fpm-compatible. What do you think?

We already have a keywords and categories entry for the package manifest, netlib might qualify as category, if not then at least as keyword. The fpm registry could certainly help with indexing those projects.

awvwgk avatar Feb 19 '21 16:02 awvwgk

I just created an issue #365 where we should discuss where to host such packages.

certik avatar Feb 19 '21 16:02 certik

Just ticked off two more packages from @jacobwilliams. Thanks Jacob for your effort.

ivan-pi avatar Dec 14 '21 08:12 ivan-pi

h5fortran and nc4fortran now work with FPM thanks to input from @milancurcic

scivision avatar May 17 '22 23:05 scivision