fftpack icon indicating copy to clipboard operation
fftpack copied to clipboard

To update the `fftpack` package

Open zoziha opened this issue 4 years ago • 1 comments
trafficstars

You recommended me (see https://github.com/fortran-lang/fpm-registry/pull/40#issuecomment-837038091) to check whether the code in this repository(certik/fftpack) is consistent with netlib/dfftpack1.0 (fftpack4.0). I confirm that they are consistent. And I want to learn from brocolis/fftpack to make dfftpack1.0(fftpack4.0) also support fpm. I will do this immediately.

Later, We update dfftpack1.0(fftpack4.0) to fftpack5.1:
netlib/dfftpack1.0(fftpack4.0) with a easy-to-use interface (-> ncar/fftpack5.1 with a easy-to-use interface -> john/fftpack5.1 with a easy-to-use interface) -> fftpack5.1 with a easy-to-use interface.

I got inspiration from stdlib, I think we can use fypp as a preprocessor to deal with the multi-precision problem of fftpack package. Do we need to use fypp to refactor netlib/dffpack1.0(fftpack4.0) and nacr/fftpack5.1?

Tasks

  • [x] Let's collect the original sources from netlib. Commit. This might be similar to https://github.com/certik/fftpack, but we should check we got everything.
  • [x] we should add tests, the only test I see there is in https://github.com/certik/fftpack/blob/030cbf4fd35c35ef19387b4835bde3ac73019b64/test.f
  • [x] We should add Fortran 90 interface to the package (add fpm support, keep make support)
  • [ ] Add 2D and 3D transforms
  • [ ] Check any other functionality from the repositories you mentioned and see if there is anything else that we should include Such as fftshift, czt, hilbert, filter.
  • [ ] Add benchmarks
  • [x] Some documentation how to use
  • [ ] Multiple precision
  • [ ] Use Fortran SAVE feature to save wsave(:)

Links

  1. netlib/dfftpack1.0(fftpack4.0) (License : public domain) Fortran77
  2. nacr/fftpack5.1 (License: look like MIT and BSD-3, see comment) Fortran77
  3. John Burkardt/fftpack5.1 (License: LGPL/GPL) Fortran90 from nacr/fftpack5.1
  4. QcmPlab/SciFortran (License: shall be GPL) From John Burkardt fortran90, fftpack5.1 with interface.
  5. keurfonluu/FFTPack (License: shall be GPL) From John Burkardt fortran90, fftpack5.1 with interface.
  6. jlokimlin/modern_fftpack (License: FFTPACK license look like MIT and BSD-3 ?) Fortran90, look like from nacr/fftpack5.1 ?

zoziha avatar May 21 '21 08:05 zoziha

I am happy that fpm supports native flag settings (see my discourse help). I have just 2 months of ample time recently, and I am very happy to set up an interface for fftpack to make a long-term development attempt.

My current done job (added fpm support for two version of fftpack):

I simply migrated netlib/dfftpack1.0 (fftpack4.0) to the branch fortran-fans/fftpack4.0 (License: public domain), and initially added fpm support; ~~At the same time, I simply migrated john/fftpack5.1(F90) to the branch fortran-fans/fftpack5.1 (License: GPL), and initially added fpm support. Obviously, it currently depends on -fallow-argument-mismatch.~~

My request (make two PRs):

I want to submit the above two versions of the fftpack package to your repo at the same time. My suggestion is to create a separate branch for fftpack4.0 and merge fftpack5.1 into your master branch (or a new branch named fftpack5.1). What do you think? If you agree, you need to create a fftpack4.0 branch for me in your this repo, then I will make two PRs, thank you~

Potential problem (LICENSE):

Now I have not specified any license for these two packages, I am not familiar with it myself, and all licenses are kept as they are.

Modified @2021-07-16

Maybe I think I should avoid the GPL license.

zoziha avatar Jul 14 '21 07:07 zoziha