Skip to content

Commit

Permalink
Remove the FFTW bindings from Base (#21956)
Browse files Browse the repository at this point in the history
  • Loading branch information
ararslan authored and quinnj committed Jun 19, 2017
1 parent 886cace commit f971b54
Show file tree
Hide file tree
Showing 33 changed files with 62 additions and 2,503 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ before_install:
BUILDOPTS="-j3 USECLANG=1 LLVM_CONFIG=$(brew --prefix llvm39-julia)/bin/llvm-config LLVM_SIZE=$(brew --prefix llvm39-julia)/bin/llvm-size";
BUILDOPTS="$BUILDOPTS VERBOSE=1 USE_BLAS64=0 SUITESPARSE_INC=-I$(brew --prefix suite-sparse-julia)/include FORCE_ASSERTIONS=1";
BUILDOPTS="$BUILDOPTS LIBBLAS=-lopenblas LIBBLASNAME=libopenblas LIBLAPACK=-lopenblas LIBLAPACKNAME=libopenblas";
for lib in LLVM SUITESPARSE ARPACK BLAS FFTW LAPACK GMP MPFR PCRE LIBUNWIND; do
for lib in LLVM SUITESPARSE ARPACK BLAS LAPACK GMP MPFR PCRE LIBUNWIND; do
BUILDOPTS="$BUILDOPTS USE_SYSTEM_$lib=1";
done;
export LDFLAGS="-L$(brew --prefix openblas-julia)/lib -L$(brew --prefix suite-sparse-julia)/lib";
Expand Down
5 changes: 2 additions & 3 deletions DISTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ separated most of the notes by OS.
Note that while the code for Julia is
[MIT-licensed, with a few exceptions](https://github.com/JuliaLang/julia/blob/master/LICENSE.md),
the distribution created by the techniques described herein will be
GPL licensed, as various dependent libraries such as `FFTW` and
`SuiteSparse` are GPL licensed. We do hope to have a
non-GPL distribution of Julia in the future.
GPL licensed, as various dependent libraries such as `SuiteSparse` are
GPL licensed. We do hope to have a non-GPL distribution of Julia in the future.

Versioning and Git
------------------
Expand Down
1 change: 0 additions & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ their own licenses:
- [OPENLIBM](https://github.com/JuliaLang/openlibm/blob/master/LICENSE.md) [MIT, BSD-2, ISC]
- [OPENSPECFUN](https://github.com/JuliaLang/openspecfun) [MIT, public domain]
- [FADDEEVA](http://ab-initio.mit.edu/Faddeeva) [MIT]
- [FFTW](http://fftw.org/doc/License-and-Copyright.html) [GPL2+]
- [GMP](http://gmplib.org/manual/Copying.html#Copying) [LGPL3+ or GPL2+]
- [LIBGIT2](https://github.com/libgit2/libgit2/blob/development/COPYING) [GPL2+ with unlimited linking exception]
- [CURL](https://curl.haxx.se/docs/copyright.html) [MIT/X derivative]
Expand Down
17 changes: 0 additions & 17 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ USE_SYSTEM_OPENSPECFUN:=0
USE_SYSTEM_DSFMT:=0
USE_SYSTEM_BLAS:=0
USE_SYSTEM_LAPACK:=0
USE_SYSTEM_FFTW:=0
USE_SYSTEM_GMP:=0
USE_SYSTEM_MPFR:=0
USE_SYSTEM_ARPACK:=0
Expand All @@ -54,8 +53,6 @@ USE_LLVM_SHLIB := 1
## Settings for various Intel tools
# Set to 1 to use MKL
USE_INTEL_MKL ?= 0
# Set to 1 to use MKL FFT
USE_INTEL_MKL_FFT ?= 0
# Set to 1 to use Intel LIBM
USE_INTEL_LIBM ?= 0
# Set to 1 to enable profiling with Intel VTune Amplifier
Expand Down Expand Up @@ -864,14 +861,6 @@ LIBLAPACKNAME := liblapack
endif
endif

ifeq ($(OS), WINNT)
LIBFFTWNAME := libfftw3
LIBFFTWFNAME := libfftw3f
else
LIBFFTWNAME := libfftw3_threads
LIBFFTWFNAME := libfftw3f_threads
endif

ifeq ($(USE_SYSTEM_LIBM), 1)
LIBM := -lm
LIBMNAME := libm
Expand Down Expand Up @@ -1059,12 +1048,6 @@ LIBBLAS := $(MKL_LDFLAGS)
LIBLAPACK := $(MKL_LDFLAGS)
endif

ifeq ($(USE_INTEL_MKL_FFT), 1)
USE_SYSTEM_FFTW := 1
LIBFFTWNAME := libmkl_rt
LIBFFTWFNAME := libmkl_rt
endif

ifeq ($(HAVE_SSP),1)
JCPPFLAGS += -DHAVE_SSP=1
ifeq ($(USEGCC),1)
Expand Down
5 changes: 0 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,6 @@ JL_PRIVATE_LIBS := ccalltest
ifeq ($(USE_GPL_LIBS), 1)
JL_PRIVATE_LIBS += suitesparse_wrapper
endif
ifeq ($(USE_SYSTEM_FFTW),0)
ifeq ($(USE_GPL_LIBS), 1)
JL_PRIVATE_LIBS += fftw3 fftw3f fftw3_threads fftw3f_threads
endif
endif
ifeq ($(USE_SYSTEM_PCRE),0)
JL_PRIVATE_LIBS += pcre
endif
Expand Down
3 changes: 1 addition & 2 deletions README.arm.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ adding the following lines in `Make.user`:
override USE_SYSTEM_BLAS=1
override USE_SYSTEM_LAPACK=1
override USE_SYSTEM_LIBM=1
override USE_SYSTEM_FFTW=1
override USE_SYSTEM_GMP=1
override USE_SYSTEM_MPFR=1
override USE_SYSTEM_ARPACK=1
Expand All @@ -36,7 +35,7 @@ override USE_SYSTEM_ARPACK=1
The following command will install all the necessary libraries on Ubuntu:

````
sudo apt-get install libblas3gf liblapack3gf libarpack2 libfftw3-dev libgmp3-dev \
sudo apt-get install libblas3gf liblapack3gf libarpack2 libgmp3-dev \
libmpfr-dev libblas-dev liblapack-dev cmake gcc-4.8 \
g++-4.8 gfortran libgfortran3 m4 libedit-dev
````
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@ Julia uses the following external libraries, which are automatically downloaded
- **[AMOS]** — subroutines for computing Bessel and Airy functions.
- **[SuiteSparse]** (>= 4.1) — library of linear algebra routines for sparse matrices.
- **[ARPACK]** — collection of subroutines designed to solve large, sparse eigenvalue problems.
- **[FFTW]** (>= 3.3) — library for computing fast Fourier transforms very quickly and efficiently.
- **[PCRE]** (>= 10.00) — Perl-compatible regular expressions library.
- **[GMP]** (>= 5.0) — GNU multiple precision arithmetic library, needed for `BigInt` support.
- **[MPFR]** (>= 3.0) — GNU multiple precision floating point library, needed for arbitrary precision floating point (`BigFloat`) support.
Expand Down Expand Up @@ -327,7 +326,6 @@ Julia uses the following external libraries, which are automatically downloaded
[SuiteSparse]: http://faculty.cse.tamu.edu/davis/suitesparse.html
[AMOS]: http://netlib.org/amos
[ARPACK]: http://forge.scilab.org/index.php/p/arpack-ng
[FFTW]: http://www.fftw.org
[PCRE]: http://www.pcre.org
[LLVM]: http://www.llvm.org
[FemtoLisp]: https://github.com/JeffBezanson/femtolisp
Expand Down Expand Up @@ -368,7 +366,6 @@ Add the following to the `Make.user` file:
USEICC = 1
USEIFC = 1
USE_INTEL_MKL = 1
USE_INTEL_MKL_FFT = 1
USE_INTEL_LIBM = 1

It is highly recommended to start with a fresh clone of the Julia repository.
Expand Down
2 changes: 0 additions & 2 deletions base/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ ifeq ($(USE_GPL_LIBS), 1)
else
@echo "const USE_GPL_LIBS = false" >> $@
endif
@echo "const libfftw_name = \"$(LIBFFTWNAME)\"" >> $@
@echo "const libfftwf_name = \"$(LIBFFTWFNAME)\"" >> $@
@echo "const libllvm_version_string = \"$$($(LLVM_CONFIG_HOST) --version)\"" >> $@
@echo "const VERSION_STRING = \"$(JULIA_VERSION)\"" >> $@
@echo "const TAGGED_RELEASE_BANNER = \"$(TAGGED_RELEASE_BANNER)\"" >> $@
Expand Down
51 changes: 51 additions & 0 deletions base/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1434,6 +1434,57 @@ module Operators
end
export Operators

# PR #21956
# This mimics the structure as it was defined in Base to avoid directly breaking code
# that assumes this structure
module DFT
for f in [:bfft, :bfft!, :brfft, :dct, :dct!, :fft, :fft!, :fftshift, :idct, :idct!,
:ifft, :ifft!, :ifftshift, :irfft, :plan_bfft, :plan_bfft!, :plan_brfft,
:plan_dct, :plan_dct!, :plan_fft, :plan_fft!, :plan_idct, :plan_idct!,
:plan_ifft, :plan_ifft!, :plan_irfft, :plan_rfft, :rfft]
pkg = endswith(String(f), "shift") ? "AbstractFFTs" : "FFTW"
@eval begin
function $f(args...; kwargs...)
error($f, " has been moved to the package $pkg.jl.\n",
"Run `Pkg.add(\"$pkg\")` to install $pkg then run `using $pkg` ",
"to load it.")
end
export $f
end
end
module FFTW
for f in [:r2r, :r2r!, :plan_r2r, :plan_r2r!]
@eval begin
function $f(args...; kwargs...)
error($f, " has been moved to the package FFTW.jl.\n",
"Run `Pkg.add(\"FFTW\")` to install FFTW then run `using FFTW` ",
"to load it.")
end
export $f
end
end
end
export FFTW
end
using .DFT
for f in names(DFT)
@eval export $f
end
module DSP
for f in [:conv, :conv2, :deconv, :filt, :filt!, :xcorr]
@eval begin
function $f(args...; kwargs...)
error($f, " has been moved to the package DSP.jl.\n",
"Run `Pkg.add(\"DSP\")` to install DSP then run `using DSP` ",
"to load it.")
end
export $f
end
end
end
using .DSP
export conv, conv2, deconv, filt, filt!, xcorr

# END 0.7 deprecations

# BEGIN 1.0 deprecations
Expand Down
Loading

0 comments on commit f971b54

Please sign in to comment.