-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add fftpack
package
#40
Conversation
FFTPack aims to provide an easily usable package of functions using FFTPack library (Fortran 77). This repo contains two libraries: 1. FFTpack library Contains FFT functions, useful functions like: `fft`, `ifft`, `fftshift`, and etc. 2. Forlab library Forlab is a Fortran module that provides a lot of functions for scientific computing mostly inspired by Matlab and Python's package NumPy. Useful functions like: `disp`, `ones`, `eye`, and etc. Thank you!!😘👍
I want to pull a request with |
See fortran-lang/fpm#443 for a general handling of Since I would suggest that as the How are the sources at https://github.com/keurfonluu/FFTPack related to the original sources at netlib (which should be the same as https://github.com/certik/fftpack)? |
Yes, I also agree with that the Has Fortran-lang/fpm#443 been implemented? Or still in planning? So a package with a universal and easy-to-use interface allows us to use
I think we can develop a simple and easy-to-use |
I really look forward to the easy-to-use packages available for |
Of course, I think you can also pass my PR this time 🤪 to make |
Btw, there is also the ffte package: which is 3D and in parallel and works really well based on my older benchmarks. We should package it also. Regarding fftpack, here is how you can do a 3D FFT from the 1D FFT: If you have time, do you want to do a video call to brainstorm how to best move forward? I can help with testing and guidance, I just don't have time to do all the work, but it looks like you might have some time. |
Given the discussion in #8 I'm not sure if it is a good idea to add a package to the registry with the intent to replace it later. |
No, we should not add a package to the registry and replace it. Rather I want to do a video call with @zoziha and others and figure out what the best way forward is, as a community, and then we'll work on that. |
I am personally shy, and my English is not very good, it is difficult to make a video call with you, I am sorry. I think we use existing resources (mainly the efforts of the predecessors) to build a more complete |
@zoziha no problem. Let's just discuss here then. Let's have a fortran-lang package for fftpack, and let's worry about ffte separately. For fftpack, I would suggest:
I have rewritten fftpack to more modern Fortran here: which simplifies some of the routines. I tried to keep the same performance. The question is, should we modernize fftpack in this way? I am thinking there is value in preserving the original code and just keeping it as is, as much as possible. Just writing some more modern interfaces on top, as I mentioned above. And perhaps have my modern Fortran modernization as another package. |
@certik Regarding adding "Fortran 90 interface", is there a specific reason to call out "Fortran 90?" I hope to live long enough see the day that it becomes common practice to either simply write "Fortran" or to write "Fortran X", where X is the most recent standard whenever the name is written. It seems that X=90 made such a big splash that it has become a default part of the language name in so many contexts. That has the unfortunate side effect that so many great things that have happened in the last three decades don't get much notice or use. @zoziha an even more modern approach would separate the interface from the implementation by putting the interface bodies in modules and the procedure definitions in submodules. What I see as the greatest advantage of this approach is that the user need not read the entire implementation just to see how to use the code. Interface information -- possibly supplemented by a few FORD-style comments would suffice for most users. |
@rouson good point about Fortran 90. I can just say modern Fortran interface. FFTPACK is written in F77 style with loose subroutines with more of a "lapack" style API, and having it in more modern Fortran multi dimensional arrays with a simpler API would help. That's all. |
I don't know if it is advisable to download I think our choice is to use NCAR's Fortran77 format I also tend to use the latest |
Thanks. I need to see which one to use. One thing that I would like to keep is performance. We should benchmark it. Let me try to review tomorrow and get back to you with some ideas. |
See also https://github.com/brocolis/fftpack which is already an fpm package. I'm not sure which version of fftpack it is, but it doesn't seem to need |
I wonder if we should start from this version and move it under fortran-lang? |
I am sure that https://github.com/brocolis/fftpack is Because If we start with |
@zoziha got it, thanks for the pointers. Here is what I would suggest: let's start with fftpack1.0, then commit over it the fftpack5.1 and then fix the |
I don't know much about licenses. Inspired by #43 (comment), |
Oddly enough, that license text looks like a combination of BSD-3 licenses terms and the MIT license disclaimer. The important sentence however is: Redistribution and use of the Software in source and binary forms, with or without modification, is permitted... So we are free to modify and distribute as desired, as long as the copyright and license text are preserved. 👍 Edit: if I understand correctly the rules of the SPDX license expressions we could use the combination Edit 2: here is some demonstration of the equivalence (I swapped the first and third conditions in the FFTPACK license) |
Have you got some benchmark codes that could be adapted? Apart from some micro-benchmarks where N repetitions of a FFT are performed and timed, it would be nice to have some more representative benchmarks of applications from signal processing and physical simulations (pseudo-spectral methods). Some examples I have encountered before that can be written fairly easily in Fortran are:
|
Questions:
|
Ideally we should converge on just having one |
I think it’s right to build |
So, what do we do here now that there is https://github.com/fortran-lang/fftpack? Should they both be added to the registry under different names? Or only the fortran-lang one? I'm not clear what's the difference, I'm an FFT n00b. :) |
We can close this PR, and we only submit the |
Yes, let's just submit the fortran-lang fftpack only for now and maintain it as a community. Let's make sure it works for everybody, people will probably report use cases, and let's fix them. That way there will become one canonical fftpack that people can use and we can all maintain it as a community. |
FFTPack aims to provide an easily usable package of functions using FFTPack library (Fortran 77).
This repo contains two libraries:
Contains FFT functions, useful functions like:
fft
,ifft
,fftshift
, and etc.Forlab is a Fortran module that provides a lot of functions for scientific computing mostly inspired by Matlab and Python's package NumPy.
Useful functions like:
disp
,ones
,eye
, and etc.Thank you, keurfonluu!!😘👍