CliMA / ClimateMachine.jl

Climate Machine: an Earth System Model that automatically learns from data
https://clima.github.io/ClimateMachine.jl/latest/
Other
451 stars 78 forks source link

FFTW Licensing issues #1478

Open jkozdon opened 4 years ago

jkozdon commented 4 years ago

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)

jkozdon commented 4 years ago

Also https://github.com/CliMA/Oceananigans.jl also has FFTW as a dependency (not sure about any other CLIMA packages)

jakebolewski commented 4 years ago

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).

jkozdon commented 4 years ago

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.

kpamnany commented 4 years ago

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.

Keno commented 4 years ago

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

slayoo commented 2 years ago

For the record, there is probably an analogous issue for #2244 (new test case using PySDM under GPLv3)