Skip to content

Commit

Permalink
Merge pull request #21 from giordano/mg/jll
Browse files Browse the repository at this point in the history
Install the library using the corresponding JLL package
  • Loading branch information
ludvigak committed Sep 8, 2020
2 parents 5c8ea82 + ab80bff commit dd63e02
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 159 deletions.
55 changes: 33 additions & 22 deletions .travis.yml
Expand Up @@ -4,28 +4,39 @@ language: julia
notifications:
email: false

matrix:
include:
# Linux
- os: linux
julia: 1.4
# MacOS
- os: osx
julia: 1.4
osx_image: xcode11
# Documentation
- stage: "Documentation"
julia: 1.0
os: linux
script:
- julia --project=docs/ -e 'using Pkg; Pkg.instantiate();
Pkg.develop(PackageSpec(path=pwd()));
Pkg.build("FINUFFT")'
- julia --project=docs/ docs/make.jl
after_success: skip
os:
- linux
- freebsd
- osx
- windows
julia:
- 1.3
- 1
- nightly

# Build script is hardwired to gcc9 on MacOS
before_script: # homebrew for mac
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew unlink gcc && brew link gcc@9; fi
branches:
only:
- master
- gh-pages # For building documentation
- /^testing-.*$/ # testing branches
- /^v[0-9]+\.[0-9]+\.[0-9]+$/ # version tags

cache:
directories:
- $HOME/.julia/artifacts

jobs:
allow_failures:
- julia: nightly
include:
- stage: "Documentation"
julia: 1.4
os: linux
script:
- julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd()));
Pkg.instantiate();
Pkg.build("FINUFFT")'
- julia --project=docs/ docs/make.jl
after_success: skip

coveralls: true
10 changes: 3 additions & 7 deletions Project.toml
@@ -1,17 +1,13 @@
name = "FINUFFT"
uuid = "d8beea63-0952-562e-9c6a-8e8ef7364055"
author = "Ludvig af Klinteberg <ludvigak@kth.se>"
version = "1.0.0"
version = "1.1.0"

[deps]
BinDeps = "9e28174c-4ba2-5203-b857-d8d62c4213ee"
Conda = "8f4d0f93-b110-5947-807f-2305c1781a2d"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
finufft_jll = "c41cd5a2-72a3-5203-9076-a500b088fc82"

[compat]
BinDeps = "1.0"
Conda = "1.4"
julia = "1.0"
julia = "1.3"

[extras]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand Down
11 changes: 3 additions & 8 deletions README.md
Expand Up @@ -8,18 +8,13 @@ This is a Julia interface to [FINUFFT](https://github.com/flatironinstitute/finu

## Installation

Julia 1.0 and up: From the Pkg REPL mode (hit `]` in REPL to enter), run
The latest version of FINUFFT.jl requires Julia v1.3 or later. From the Pkg REPL mode (hit `]` in REPL to enter), run

```julia
add FINUFFT
test FINUFFT
```

This should download, build and test FINUFFT v1.1.2, as long as you have `gcc` and `curl` installed. The FFTW library is downloaded locally by the build script, using [Conda.jl](https://github.com/JuliaPy/Conda.jl)

Developed and tested on Linux. Also works on Max OS X, but build script is hardwired to use GCC 9 (`g++-9` and `gcc-9`).

#### New:
Might now work on Windows as well. Has been tested successfully on two Windows 10 setups with TDM-GCC 9.2.0 and Julia 1.4.1. (Important: make sure that openmp for gcc is installed.).
Older versions of the package are available also for Julia v1.0-v1.2, but the user need to have a recent version of GCC installed.

## Usage

Expand Down
106 changes: 0 additions & 106 deletions deps/build.jl

This file was deleted.

2 changes: 1 addition & 1 deletion docs/Project.toml
Expand Up @@ -2,4 +2,4 @@
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

[compat]
Documenter = "~0.20"
Documenter = "~0.25"
16 changes: 1 addition & 15 deletions src/FINUFFT.jl
Expand Up @@ -15,21 +15,7 @@ export nufft_opts
export nufft_c_opts # backward-compability

## External dependencies
using Libdl

const depsfile = joinpath(dirname(@__DIR__), "deps", "deps.jl")
if isfile(depsfile)
include(depsfile)
else
error("FINUFFT is not properly installed. Please build it first.")
end

function __init__()
Libdl.dlopen(fftw, Libdl.RTLD_GLOBAL)
if !Sys.iswindows()
Libdl.dlopen(fftw_threads, Libdl.RTLD_GLOBAL)
end
end
using finufft_jll

const BIGINT = Int64 # defined in src/finufft.h

Expand Down

0 comments on commit dd63e02

Please sign in to comment.