John Burkardt has published 1400 Fortran 90 codes on his site, arranged in alphabetical order. I have listed the codes by topic to make them easier to find. The topics are
cluster analysis
combinatorics
eigenvalues
graph algorithms
interpolation and approximation
linear algebra
linear equations
nonlinear equations and nonlinear least squares
non-uniform random number generation
numerical methods – general
optimization – one-dimensional
optimization
ordinary differential equations
probability distributions
root-finding
special functions
quadrature
quasirandom number generation
uniform random number generation
Not yet classified are his codes for finite elements, grid generation, calendar calculations, graphics, Fortran tools, and demonstration of Fortran, CUDA, MPI, and OpenMP features.
His codes use free source form, allocatable arrays, kinds, and some other features of Fortran 90. They do not use modules or argument intents.
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
His codes were uploaded to GitHub 9 years ago. I think FPM packages could also be created and uploaded. In 2019 I emailed him at jburkardt at fsu dot edu but it bounced.
and then uploaded them to a master branch of my repository. I want to copy the contents of the master branch to main so that users can see the codes by default, but with my minimal knowledge of git and GitHub, I don’t know how.
@Beliavsky thanks, I think I’ve discovered his website in the past. I am going to write the author an email and ask if he would be willing to relicense his codes under an MIT or BSD license. That would make it very useful for us to include in stdlib or other packages.
From the collected sources there are about 6k files and 4.5m lines (not all Fortran source, though). The largest thing I did in fpm so far were 230 files and 88k lines in 6 fpm projects and it holds up quite okay so far. I found fpm usually only gets slow to start if there is a deeply nested directory structure to retrieve sources from (and of course if there is a lot to compile, but that’s not on fpm). Startup time for fpm is for 230 files around 1.5s already.
I would expect that we will run into several performance issues with so many files, for example we would have to think about incrementally building the archive with ar or using response files because we exceed the limit of command line arguments.
I know John Burkhardt’s side for one of the most famous routines used in computational chemistry: the Lebedev angular integration grid. There are basically two implementations out there, the one from John Burkardt (LGPL-3.0) and the one from Christoph van Wüllen (PD), which are both translations from the original C Implementation of Dimitri Laikov (which to my knowledge has been lost).
Every other implementation (C, Matlab, Python, C++, Java …) of Lebedev integration grids I found so far could be traced back to either John Burkardt’s or Christoph van Wüllen’s implementation. I even seen Python implementations wrapping a C version that was translated from C++, which in turn was based on one of the two Fortran versions. Maybe the CP2K version has a good chance to be independent, but it would still be in Fortran.
At least on Dimitri Laikov’s website the reference implementation linked to the paper (No. 6 in the list) is the Fortran version posted on the CCL. Not sure how many people have actually seen the C code, also I’m not sure if there is much to gain in reviving it.
It would be more important to refactor the code to drop the usage of computed gotos and assumed-size arrays. I got rid of the computed goto in my version but the assumed-size arrays are just to practical here.
With Burkardt’s permission, I have uploaded his 1700 (!) codes from his Florida State site to
Most but not all of Burkardt’s codes from his University of South Carolina site are on the Florida site, so I uploaded the codes from this site to
As mentioned upthread, it would be nice to create FPM packages from his codes. A number of codes use the iargc and getarg extensions, which should be replaced with command_argument_count and get_command_argument.
He generally does not use modules – doing so and adding argument intents would be nice. A cosmetic change I’d like to make programmatically is to replace end in his codes with end function foo or end subroutine foo and to add blank lines between procedures.
Just curious as to the license this code is being released under. I think Burkhardt’s original repository code was GPL. I personally don’t have a big problem with GPL but some places I’ve worked (legal folks) did. It would be nice if its being released under a less restrictive (as defined by the legal eagles) license.
The problem with GPL is that it’s viral (i.e., copyleft), so by using anything under that license, your code must also adhere to that license (e.g., since GNU Readline’s licence is GPL, everyone prefers BSD’s libedit, ).
LGPL is supposed to relax that, provided that you don’t modify the LGPL’d code when using it with your proprietary one, but since third-parties MUST still be able to modify the LGPL’d portion of your software, static linking might not be an option.
I use a modified BSD only because I have a text file with the requisite verbage that I can include into source. However, I’ve noticed more people are using the MIT license these days. @jwmwalrus points out the issues with GPL better than I can. Again, most places I’ve work that allowed open source licensing considered GPL a “cuckoos egg” that can take control of your code if you aren’t careful.
I think MIT is the most popular on GitHub, I use it myself by default. BSD is also good, when I open sourced LFortran at LANL, they didn’t have an MIT option, but could do BSD, so I chose that. They are both very similar. Some companies like Google also like the Apache license, but most companies seem to just use the MIT license if they open source their code. So I recommend to just use MIT unless you have a reason not to. Most of our fortran-lang open source codes at The Fortran Programming Language · GitHub are MIT licensed also.