ClimateMachine.jl
ClimateMachine.jl copied to clipboard
FFTW Licensing issues
This was raised on slack by @jakebolewski , seem like a github issue is a better place for the discussion.
With #1360 (Spectrum calculator and diagnostics group) ClimateMachine now depends on FFTW, which is licensed under GPL2. But GPL2 is not compatible with Apache2 (https://www.apache.org/licenses/GPL-compatibility.html) and thus leaving the dependency as is would force the ClimateMachine license to be changed.
There is a discussion of the issue and possible fix via MKL on the FFT.jl package page (https://github.com/JuliaMath/FFTW.jl)
Also https://github.com/CliMA/Oceananigans.jl also has FFTW as a dependency (not sure about any other CLIMA packages)
I believe that ClimateMachine and related code needs to be released under a permissive license (Apache2) as a condition of funding.
There is a workaround where we can explicitly build against MKL's fftw compatibility layer, but that requires extra build steps that need to be documented and we need to test that fft functionality is compatible with the more limited MKL functionality in CI (it seems like the use cases are straightforward at least in ClimateMachine so this should be fine).
I believe that ClimateMachine and related code needs to be released under a permissive license (Apache2) as a condition of funding.
That's my understanding as well.
I tested the spectra diagnostics (which is what introduced the requirement for FFTW) with FFTW.jl built with MKL (by setting JULIA_FFTW_PROVIDER=MKL
and building FFTW.jl). It runs fine and Lenka has verified that the output looks good.
Since this setting uses MKL_jll, it downloads MKL (we have the mkl/18.1 module, but I don't know if there's a setting that makes FFTW use a system MKL).
Edit: TLDR: we can add JULIA_FFTW_PROVIDER=MKL
if we have to, but there's a download cost.
Just driving by. The easy and accepted fix here is to add the LLVM exception to your Apache 2 license, which makes it GPL compatible: https://spdx.org/licenses/LLVM-exception.html
For the record, there is probably an analogous issue for #2244 (new test case using PySDM under GPLv3)