From 500e17ce62a1c0c9e8d81a32bc75e2a085c048f3 Mon Sep 17 00:00:00 2001 From: Toshiki Teramura Date: Mon, 29 Jun 2020 05:07:44 +0900 Subject: [PATCH 01/13] Drop blas-src, lapack-src. New fine-grained features --- Cargo.toml | 47 ++++++++++++++++++++--------------------------- src/lib.rs | 15 +++++++++++++-- 2 files changed, 33 insertions(+), 29 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c3be9e00..3b21dfd9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,40 +13,33 @@ readme = "README.md" categories = ["algorithms", "science"] [features] -default = [] -intel-mkl = ["lapack-src/intel-mkl", "blas-src/intel-mkl"] -netlib = ["lapack-src/netlib", "blas-src/netlib"] -openblas = ["lapack-src/openblas", "blas-src/openblas"] -serde-1 = ["ndarray/serde-1", "num-complex/serde"] +default = [] -static = ["openblas-static"] -openblas-static = ["openblas", "openblas-src"] +netlib = ["netlib-static"] +openblas = ["openblas-static"] +intel-mkl = ["mkl-static-lp64-seq"] + +netlib-static = ["netlib-src/static"] +netlib-system = ["netlib-src/system"] +openblas-static = ["openblas-src/static"] +openblas-system = ["openblas-src/system"] + +mkl-static-lp64-iomp = ["intel-mkl-src/mkl-static-lp64-iomp"] +mkl-static-lp64-seq = ["intel-mkl-src/mkl-static-lp64-seq"] +mkl-dynamic-lp64-iomp = ["intel-mkl-src/mkl-dynamic-lp64-iomp"] +mkl-dynamic-lp64-seq = ["intel-mkl-src/mkl-dynamic-lp64-seq"] [dependencies] +cauchy = "0.2.2" lapacke = "0.2.0" +ndarray = { version = "0.13", features = ["blas", "approx", "serde-1"], default-features = false } +num-complex = { version = "0.2", features = ["serde"] } num-traits = "0.2.11" -cauchy = "0.2.2" -num-complex = "0.2.4" rand = "0.5" -[dependencies.ndarray] -version = "0.13.0" -features = ["blas", "approx"] -default-features = false - -[dependencies.blas-src] -version = "0.6.1" -default-features = false - -[dependencies.lapack-src] -version = "0.6.0" -default-features = false - -[dependencies.openblas-src] -version = "0.9.0" -default-features = false -features = ["static"] -optional = true +openblas-src = { version = "0.9.0", optional = true } +netlib-src = { version = "0.8.0", optional = true } +intel-mkl-src = { version = "0.6.0", default-features = false, features = ["download"], optional = true } [dev-dependencies] paste = "0.1.9" diff --git a/src/lib.rs b/src/lib.rs index 724921f8..116d0c88 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -41,8 +41,19 @@ #[macro_use] extern crate ndarray; -extern crate blas_src; -extern crate lapack_src; +#[cfg(any( + feature = "mkl-static-lp64-iomp", + feature = "mkl-static-lp64-seq", + feature = "mkl-dynamic-lp64-iomp", + feature = "mkl-dynamic-lp64-seq", +))] +extern crate intel_mkl_src as _src; + +#[cfg(any(feature = "openblas-system", feature = "openblas-static"))] +extern crate openblas_src as _src; + +#[cfg(any(feature = "netlib-system", feature = "netlib-static"))] +extern crate netlib_src as _src; pub mod assert; pub mod cholesky; From dacb84f830176d81dd5ff53f5a7d4dcff37d71b4 Mon Sep 17 00:00:00 2001 From: Toshiki Teramura Date: Mon, 29 Jun 2020 05:08:19 +0900 Subject: [PATCH 02/13] Split CI --- .github/workflows/intel-mkl.yml | 61 +++++++++++++++++++++++++++++++++ .github/workflows/netlib.yml | 55 +++++++++++++++++++++++++++++ .github/workflows/openblas.yml | 55 +++++++++++++++++++++++++++++ .github/workflows/rust.yml | 50 --------------------------- 4 files changed, 171 insertions(+), 50 deletions(-) create mode 100644 .github/workflows/intel-mkl.yml create mode 100644 .github/workflows/netlib.yml create mode 100644 .github/workflows/openblas.yml diff --git a/.github/workflows/intel-mkl.yml b/.github/workflows/intel-mkl.yml new file mode 100644 index 00000000..80e99f65 --- /dev/null +++ b/.github/workflows/intel-mkl.yml @@ -0,0 +1,61 @@ +name: intel-mkl-backend + +on: + push: + branches: + - master + pull_request: {} + +jobs: + windows: + strategy: + fail-fast: false + matrix: + feature: + - mkl-static-lp64-seq + - mkl-dynamic-lp64-seq + runs-on: windows-2019 + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/cargo@v1 + with: + command: test + args: > + --no-default-features + --features=${{ matrix.feature }} + + macos: + strategy: + fail-fast: false + matrix: + feature: + - mkl-dynamic-lp64-iomp + - mkl-dynamic-lp64-seq + runs-on: macos-10.15 + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/cargo@v1 + with: + command: test + args: > + --no-default-features + --features=${{ matrix.feature }} + + linux: + strategy: + fail-fast: false + matrix: + feature: + - mkl-static-lp64-iomp + - mkl-static-lp64-seq + - mkl-dynamic-lp64-iomp + - mkl-dynamic-lp64-seq + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/cargo@v1 + with: + command: test + args: > + --no-default-features + --features=${{ matrix.feature }} diff --git a/.github/workflows/netlib.yml b/.github/workflows/netlib.yml new file mode 100644 index 00000000..09cd0b6a --- /dev/null +++ b/.github/workflows/netlib.yml @@ -0,0 +1,55 @@ +name: netlib-backend + +on: + push: + branches: + - master + pull_request: {} + +jobs: + linux: + strategy: + fail-fast: false + matrix: + feature: + - system + - static + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v1 + - name: apt install gfortran + run: | + sudo apt update + sudo apt install -y gfortran + - name: apt install netlib + run: | + sudo apt update + sudo apt install -y libblas-dev liblapack-dev liblapacke-dev + if: ${{ matrix.feature == 'system' }} + - uses: actions-rs/cargo@v1 + with: + command: test + args: > + --no-default-features + --features=netlib-${{ matrix.feature }} + + macos: + strategy: + fail-fast: false + matrix: + feature: + - system + - static + runs-on: macos-10.15 + env: + CC: gcc-9 + FC: gfortran-9 + LIBRARY_PATH: /usr/local/opt/gcc/lib/gcc/9 + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/cargo@v1 + with: + command: test + args: > + --no-default-features + --features=netlib-${{ matrix.feature }} diff --git a/.github/workflows/openblas.yml b/.github/workflows/openblas.yml new file mode 100644 index 00000000..65441aef --- /dev/null +++ b/.github/workflows/openblas.yml @@ -0,0 +1,55 @@ +name: openblas-backend + +on: + push: + branches: + - master + pull_request: {} + +jobs: + linux: + strategy: + fail-fast: false + matrix: + feature: + - system + - static + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v1 + - name: apt install gfortran + run: | + sudo apt update + sudo apt install -y gfortran + - name: apt install openblas + run: | + sudo apt update + sudo apt install -y libopenblas-dev liblapacke-dev + if: ${{ matrix.feature == 'system' }} + - uses: actions-rs/cargo@v1 + with: + command: test + args: > + --no-default-features + --features=openblas-${{ matrix.feature }} + + macos: + strategy: + fail-fast: false + matrix: + feature: + - system + - static + runs-on: macos-10.15 + env: + CC: gcc-9 + FC: gfortran-9 + LIBRARY_PATH: /usr/local/opt/gcc/lib/gcc/9 + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/cargo@v1 + with: + command: test + args: > + --no-default-features + --features=openblas-${{ matrix.feature }} diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 5deaac55..eb1f7158 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -7,56 +7,6 @@ on: pull_request: {} jobs: - windows: - runs-on: windows-2019 - steps: - - uses: actions/checkout@v1 - - uses: actions-rs/cargo@v1 - with: - command: test - args: --features=intel-mkl --no-default-features - - macos: - runs-on: macos-10.15 - env: - CC: gcc-9 - FC: gfortran-9 - LIBRARY_PATH: /usr/local/opt/gcc/lib/gcc/9 - strategy: - fail-fast: false - matrix: - feature: - - netlib - - openblas - - intel-mkl - steps: - - uses: actions/checkout@v1 - - uses: actions-rs/cargo@v1 - with: - command: test - args: --features=${{ matrix.feature }} --no-default-features - - linux: - runs-on: ubuntu-18.04 - strategy: - fail-fast: false - matrix: - feature: - - netlib - - openblas - - intel-mkl - steps: - - uses: actions/checkout@v1 - - name: apt-install gfortran - run: | - sudo apt update - sudo apt install -y gfortran - if: ${{ matrix.feature != 'intel-mkl' }} - - uses: actions-rs/cargo@v1 - with: - command: test - args: --features=${{ matrix.feature }} --no-default-features - check-format: runs-on: ubuntu-18.04 steps: From a1244e2f770997ee62372a51c036a43b634fe386 Mon Sep 17 00:00:00 2001 From: Toshiki Teramura Date: Sun, 26 Jul 2020 19:58:30 +0900 Subject: [PATCH 03/13] Change *-backend to test lax features --- .github/workflows/intel-mkl.yml | 6 +++--- .github/workflows/netlib.yml | 4 ++-- .github/workflows/openblas.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/intel-mkl.yml b/.github/workflows/intel-mkl.yml index 33f82f77..4438a671 100644 --- a/.github/workflows/intel-mkl.yml +++ b/.github/workflows/intel-mkl.yml @@ -21,7 +21,7 @@ jobs: with: command: test args: > - --manifest-path=ndarray-linalg/Cargo.toml + --manifest-path=lax/Cargo.toml --no-default-features --features=${{ matrix.feature }} @@ -39,7 +39,7 @@ jobs: with: command: test args: > - --manifest-path=ndarray-linalg/Cargo.toml + --manifest-path=lax/Cargo.toml --no-default-features --features=${{ matrix.feature }} @@ -59,6 +59,6 @@ jobs: with: command: test args: > - --manifest-path=ndarray-linalg/Cargo.toml + --manifest-path=lax/Cargo.toml --no-default-features --features=${{ matrix.feature }} diff --git a/.github/workflows/netlib.yml b/.github/workflows/netlib.yml index b45997c2..53ef147b 100644 --- a/.github/workflows/netlib.yml +++ b/.github/workflows/netlib.yml @@ -30,7 +30,7 @@ jobs: with: command: test args: > - --manifest-path=ndarray-linalg/Cargo.toml + --manifest-path=lax/Cargo.toml --no-default-features --features=netlib-${{ matrix.feature }} @@ -52,6 +52,6 @@ jobs: with: command: test args: > - --manifest-path=ndarray-linalg/Cargo.toml + --manifest-path=lax/Cargo.toml --no-default-features --features=netlib-${{ matrix.feature }} diff --git a/.github/workflows/openblas.yml b/.github/workflows/openblas.yml index b493cf31..9f61f694 100644 --- a/.github/workflows/openblas.yml +++ b/.github/workflows/openblas.yml @@ -30,7 +30,7 @@ jobs: with: command: test args: > - --manifest-path=ndarray-linalg/Cargo.toml + --manifest-path=lax/Cargo.toml --no-default-features --features=openblas-${{ matrix.feature }} @@ -52,6 +52,6 @@ jobs: with: command: test args: > - --manifest-path=ndarray-linalg/Cargo.toml + --manifest-path=lax/Cargo.toml --no-default-features --features=openblas-${{ matrix.feature }} From e206af582bdd12a971b9864d954fbd5f1a4a37d4 Mon Sep 17 00:00:00 2001 From: Toshiki Teramura Date: Sun, 26 Jul 2020 19:59:08 +0900 Subject: [PATCH 04/13] Drop macOS/{openblas,netlib} tests (See #222 and #223) --- .github/workflows/netlib.yml | 22 ---------------------- .github/workflows/openblas.yml | 22 ---------------------- 2 files changed, 44 deletions(-) diff --git a/.github/workflows/netlib.yml b/.github/workflows/netlib.yml index 53ef147b..f0391b71 100644 --- a/.github/workflows/netlib.yml +++ b/.github/workflows/netlib.yml @@ -33,25 +33,3 @@ jobs: --manifest-path=lax/Cargo.toml --no-default-features --features=netlib-${{ matrix.feature }} - - macos: - strategy: - fail-fast: false - matrix: - feature: - - system - - static - runs-on: macos-10.15 - env: - CC: gcc-9 - FC: gfortran-9 - LIBRARY_PATH: /usr/local/opt/gcc/lib/gcc/9 - steps: - - uses: actions/checkout@v1 - - uses: actions-rs/cargo@v1 - with: - command: test - args: > - --manifest-path=lax/Cargo.toml - --no-default-features - --features=netlib-${{ matrix.feature }} diff --git a/.github/workflows/openblas.yml b/.github/workflows/openblas.yml index 9f61f694..997f8ceb 100644 --- a/.github/workflows/openblas.yml +++ b/.github/workflows/openblas.yml @@ -33,25 +33,3 @@ jobs: --manifest-path=lax/Cargo.toml --no-default-features --features=openblas-${{ matrix.feature }} - - macos: - strategy: - fail-fast: false - matrix: - feature: - - system - - static - runs-on: macos-10.15 - env: - CC: gcc-9 - FC: gfortran-9 - LIBRARY_PATH: /usr/local/opt/gcc/lib/gcc/9 - steps: - - uses: actions/checkout@v1 - - uses: actions-rs/cargo@v1 - with: - command: test - args: > - --manifest-path=lax/Cargo.toml - --no-default-features - --features=openblas-${{ matrix.feature }} From 9a192efb75fa7de2ae51706574ade0c6f1c8af66 Mon Sep 17 00:00:00 2001 From: Toshiki Teramura Date: Mon, 27 Jul 2020 01:38:18 +0900 Subject: [PATCH 05/13] Add ndarray-linalg tests --- .github/workflows/ndarray-linalg.yml | 37 ++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/ndarray-linalg.yml diff --git a/.github/workflows/ndarray-linalg.yml b/.github/workflows/ndarray-linalg.yml new file mode 100644 index 00000000..6d9345ec --- /dev/null +++ b/.github/workflows/ndarray-linalg.yml @@ -0,0 +1,37 @@ +name: ndarray-linalg + +on: + push: + branches: + - master + pull_request: {} + +jobs: + linux: + strategy: + fail-fast: false + matrix: + feature: + - intel-mkl + - openblas + - netlib + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v1 + - name: apt install openblas + run: | + sudo apt update + sudo apt install -y gfortran libopenblas-dev liblapacke-dev + if: ${{ matrix.feature == 'openblas' }} + - name: apt install netlib + run: | + sudo apt update + sudo apt install -y gfortran libblas-dev liblapack-dev liblapacke-dev + if: ${{ matrix.feature == 'netlib' }} + - uses: actions-rs/cargo@v1 + with: + command: test + args: > + --manifest-path=ndarray-linalg/Cargo.toml + --no-default-features + --features=${{ matrix.feature }} From c569909c0c4b481116f914f7a1b8ce3c2287f55c Mon Sep 17 00:00:00 2001 From: Toshiki Teramura Date: Mon, 27 Jul 2020 01:48:37 +0900 Subject: [PATCH 06/13] Drop default features --- .github/workflows/intel-mkl.yml | 2 +- .github/workflows/netlib.yml | 2 +- .github/workflows/openblas.yml | 2 +- lax/Cargo.toml | 18 +++++++++++++++--- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/intel-mkl.yml b/.github/workflows/intel-mkl.yml index 4438a671..c39269bc 100644 --- a/.github/workflows/intel-mkl.yml +++ b/.github/workflows/intel-mkl.yml @@ -1,4 +1,4 @@ -name: intel-mkl-backend +name: lax/intel-mkl on: push: diff --git a/.github/workflows/netlib.yml b/.github/workflows/netlib.yml index f0391b71..8d964e4b 100644 --- a/.github/workflows/netlib.yml +++ b/.github/workflows/netlib.yml @@ -1,4 +1,4 @@ -name: netlib-backend +name: lax/netlib on: push: diff --git a/.github/workflows/openblas.yml b/.github/workflows/openblas.yml index 997f8ceb..46defcad 100644 --- a/.github/workflows/openblas.yml +++ b/.github/workflows/openblas.yml @@ -1,4 +1,4 @@ -name: openblas-backend +name: lax/openblas on: push: diff --git a/lax/Cargo.toml b/lax/Cargo.toml index b049a484..3b97d313 100644 --- a/lax/Cargo.toml +++ b/lax/Cargo.toml @@ -27,6 +27,18 @@ cauchy = "0.2.0" num-traits = "0.2" lapack = "0.16.0" -openblas-src = { version = "0.9.0", optional = true } -netlib-src = { version = "0.8.0", optional = true } -intel-mkl-src = { version = "0.6.0", default-features = false, features = ["download"], optional = true } +[dependencies.intel-mkl-src] +version = "0.6.0" +default-features = false +features = ["download"] +optional = true + +[dependencies.netlib-src] +version = "0.8.0" +optional = true +default-features = false + +[dependencies.openblas-src] +version = "0.9.0" +optional = true +default-features = false From af3973b5878227c6d1da8f109915976ab1a5b488 Mon Sep 17 00:00:00 2001 From: Toshiki Teramura Date: Mon, 27 Jul 2020 02:06:03 +0900 Subject: [PATCH 07/13] Restore cblas feature --- lax/Cargo.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lax/Cargo.toml b/lax/Cargo.toml index 3b97d313..094fafac 100644 --- a/lax/Cargo.toml +++ b/lax/Cargo.toml @@ -36,9 +36,11 @@ optional = true [dependencies.netlib-src] version = "0.8.0" optional = true +features = ["cblas"] default-features = false [dependencies.openblas-src] version = "0.9.0" optional = true default-features = false +features = ["cblas"] From c961039ab82f3b237822ebe653f773fa7cd0bb97 Mon Sep 17 00:00:00 2001 From: Toshiki Teramura Date: Mon, 27 Jul 2020 02:09:49 +0900 Subject: [PATCH 08/13] Drop dynamic linking support for macOS/Linux --- .github/workflows/intel-mkl.yml | 22 +--------------------- .github/workflows/ndarray-linalg.yml | 10 ---------- 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/.github/workflows/intel-mkl.yml b/.github/workflows/intel-mkl.yml index c39269bc..b88e72f1 100644 --- a/.github/workflows/intel-mkl.yml +++ b/.github/workflows/intel-mkl.yml @@ -1,4 +1,4 @@ -name: lax/intel-mkl +name: "lax / intel-mkl" on: push: @@ -25,24 +25,6 @@ jobs: --no-default-features --features=${{ matrix.feature }} - macos: - strategy: - fail-fast: false - matrix: - feature: - - mkl-dynamic-lp64-iomp - - mkl-dynamic-lp64-seq - runs-on: macos-10.15 - steps: - - uses: actions/checkout@v1 - - uses: actions-rs/cargo@v1 - with: - command: test - args: > - --manifest-path=lax/Cargo.toml - --no-default-features - --features=${{ matrix.feature }} - linux: strategy: fail-fast: false @@ -50,8 +32,6 @@ jobs: feature: - mkl-static-lp64-iomp - mkl-static-lp64-seq - - mkl-dynamic-lp64-iomp - - mkl-dynamic-lp64-seq runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v1 diff --git a/.github/workflows/ndarray-linalg.yml b/.github/workflows/ndarray-linalg.yml index 6d9345ec..041c9516 100644 --- a/.github/workflows/ndarray-linalg.yml +++ b/.github/workflows/ndarray-linalg.yml @@ -18,16 +18,6 @@ jobs: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v1 - - name: apt install openblas - run: | - sudo apt update - sudo apt install -y gfortran libopenblas-dev liblapacke-dev - if: ${{ matrix.feature == 'openblas' }} - - name: apt install netlib - run: | - sudo apt update - sudo apt install -y gfortran libblas-dev liblapack-dev liblapacke-dev - if: ${{ matrix.feature == 'netlib' }} - uses: actions-rs/cargo@v1 with: command: test From 0ff6d1f605908e1533d704841ff6cb6c2b61a10b Mon Sep 17 00:00:00 2001 From: Toshiki Teramura Date: Mon, 27 Jul 2020 02:16:28 +0900 Subject: [PATCH 09/13] Add all features in ndarray-linalg --- ndarray-linalg/Cargo.toml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ndarray-linalg/Cargo.toml b/ndarray-linalg/Cargo.toml index 717a6d09..e4c1f33c 100644 --- a/ndarray-linalg/Cargo.toml +++ b/ndarray-linalg/Cargo.toml @@ -14,9 +14,20 @@ categories = ["algorithms", "science"] [features] default = [] -intel-mkl = ["lax/intel-mkl"] + netlib = ["lax/netlib"] openblas = ["lax/openblas"] +intel-mkl = ["lax/intel-mkl"] + +netlib-static = ["lax/netlib-static"] +netlib-system = ["lax/netlib-system"] +openblas-static = ["lax/openblas-static"] +openblas-system = ["lax/openblas-system"] + +mkl-static-lp64-iomp = ["lax/mkl-static-lp64-iomp"] +mkl-static-lp64-seq = ["lax/mkl-static-lp64-seq"] +mkl-dynamic-lp64-iomp = ["lax/mkl-dynamic-lp64-iomp"] +mkl-dynamic-lp64-seq = ["lax/mkl-dynamic-lp64-seq"] [dependencies] cauchy = "0.2.2" From e23e96fa3318cd2dffd61b6c1d51ce064cbc2878 Mon Sep 17 00:00:00 2001 From: Toshiki Teramura Date: Mon, 27 Jul 2020 02:21:11 +0900 Subject: [PATCH 10/13] Fix --- .github/workflows/intel-mkl.yml | 36 +++++++++++++++++++++++++++- .github/workflows/ndarray-linalg.yml | 27 --------------------- .github/workflows/netlib.yml | 4 ++-- .github/workflows/openblas.yml | 4 ++-- 4 files changed, 39 insertions(+), 32 deletions(-) delete mode 100644 .github/workflows/ndarray-linalg.yml diff --git a/.github/workflows/intel-mkl.yml b/.github/workflows/intel-mkl.yml index b88e72f1..0eceefac 100644 --- a/.github/workflows/intel-mkl.yml +++ b/.github/workflows/intel-mkl.yml @@ -1,4 +1,4 @@ -name: "lax / intel-mkl" +name: intel-mkl on: push: @@ -25,6 +25,26 @@ jobs: --no-default-features --features=${{ matrix.feature }} + macos: + strategy: + fail-fast: false + matrix: + feature: + - mkl-dynamic-lp64-iomp + - mkl-dynamic-lp64-seq + runs-on: macos-10.15 + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/cargo@v1 + name: cargo test --all-targets + with: + command: test + args: > + --manifest-path=lax/Cargo.toml + --no-default-features + --features=${{ matrix.feature }} + --all-targets + linux: strategy: fail-fast: false @@ -32,13 +52,27 @@ jobs: feature: - mkl-static-lp64-iomp - mkl-static-lp64-seq + - mkl-dynamic-lp64-iomp + - mkl-dynamic-lp64-seq runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v1 - uses: actions-rs/cargo@v1 + name: cargo test --all-targets + with: + command: test + args: > + --manifest-path=lax/Cargo.toml + --no-default-features + --features=${{ matrix.feature }} + --all-targets + - uses: actions-rs/cargo@v1 + name: cargo test --doc with: command: test args: > --manifest-path=lax/Cargo.toml --no-default-features --features=${{ matrix.feature }} + --doc + if: ${{ matrix.feature =~ 'mkl-static' }} diff --git a/.github/workflows/ndarray-linalg.yml b/.github/workflows/ndarray-linalg.yml deleted file mode 100644 index 041c9516..00000000 --- a/.github/workflows/ndarray-linalg.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: ndarray-linalg - -on: - push: - branches: - - master - pull_request: {} - -jobs: - linux: - strategy: - fail-fast: false - matrix: - feature: - - intel-mkl - - openblas - - netlib - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v1 - - uses: actions-rs/cargo@v1 - with: - command: test - args: > - --manifest-path=ndarray-linalg/Cargo.toml - --no-default-features - --features=${{ matrix.feature }} diff --git a/.github/workflows/netlib.yml b/.github/workflows/netlib.yml index 8d964e4b..fa2ef945 100644 --- a/.github/workflows/netlib.yml +++ b/.github/workflows/netlib.yml @@ -1,4 +1,4 @@ -name: lax/netlib +name: netlib on: push: @@ -30,6 +30,6 @@ jobs: with: command: test args: > - --manifest-path=lax/Cargo.toml + --manifest-path=ndarray-linalg/Cargo.toml --no-default-features --features=netlib-${{ matrix.feature }} diff --git a/.github/workflows/openblas.yml b/.github/workflows/openblas.yml index 46defcad..b2280f51 100644 --- a/.github/workflows/openblas.yml +++ b/.github/workflows/openblas.yml @@ -1,4 +1,4 @@ -name: lax/openblas +name: openblas on: push: @@ -30,6 +30,6 @@ jobs: with: command: test args: > - --manifest-path=lax/Cargo.toml + --manifest-path=ndarray-linalg/Cargo.toml --no-default-features --features=openblas-${{ matrix.feature }} From bea0853924e53d5e24f1dcb9349dc248a672b078 Mon Sep 17 00:00:00 2001 From: Toshiki Teramura Date: Mon, 27 Jul 2020 02:24:32 +0900 Subject: [PATCH 11/13] Fix --- .github/workflows/intel-mkl.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/intel-mkl.yml b/.github/workflows/intel-mkl.yml index 0eceefac..f3d768c2 100644 --- a/.github/workflows/intel-mkl.yml +++ b/.github/workflows/intel-mkl.yml @@ -75,4 +75,4 @@ jobs: --no-default-features --features=${{ matrix.feature }} --doc - if: ${{ matrix.feature =~ 'mkl-static' }} + if: ${{ startsWith(matrix.feature, 'mkl-static') }} From 318b94dc952861ede3056fa935b4c14653c1a759 Mon Sep 17 00:00:00 2001 From: Toshiki Teramura Date: Mon, 27 Jul 2020 02:31:05 +0900 Subject: [PATCH 12/13] Fix --- .github/workflows/intel-mkl.yml | 8 ++++---- .github/workflows/netlib.yml | 6 ------ .github/workflows/openblas.yml | 2 +- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/intel-mkl.yml b/.github/workflows/intel-mkl.yml index f3d768c2..32d7cc33 100644 --- a/.github/workflows/intel-mkl.yml +++ b/.github/workflows/intel-mkl.yml @@ -21,7 +21,7 @@ jobs: with: command: test args: > - --manifest-path=lax/Cargo.toml + --manifest-path=ndarray-linalg/Cargo.toml --no-default-features --features=${{ matrix.feature }} @@ -40,7 +40,7 @@ jobs: with: command: test args: > - --manifest-path=lax/Cargo.toml + --manifest-path=ndarray-linalg/Cargo.toml --no-default-features --features=${{ matrix.feature }} --all-targets @@ -62,7 +62,7 @@ jobs: with: command: test args: > - --manifest-path=lax/Cargo.toml + --manifest-path=ndarray-linalg/Cargo.toml --no-default-features --features=${{ matrix.feature }} --all-targets @@ -71,7 +71,7 @@ jobs: with: command: test args: > - --manifest-path=lax/Cargo.toml + --manifest-path=ndarray-linalg/Cargo.toml --no-default-features --features=${{ matrix.feature }} --doc diff --git a/.github/workflows/netlib.yml b/.github/workflows/netlib.yml index fa2ef945..f278f0ca 100644 --- a/.github/workflows/netlib.yml +++ b/.github/workflows/netlib.yml @@ -12,7 +12,6 @@ jobs: fail-fast: false matrix: feature: - - system - static runs-on: ubuntu-18.04 steps: @@ -21,11 +20,6 @@ jobs: run: | sudo apt update sudo apt install -y gfortran - - name: apt install netlib - run: | - sudo apt update - sudo apt install -y libblas-dev liblapack-dev liblapacke-dev - if: ${{ matrix.feature == 'system' }} - uses: actions-rs/cargo@v1 with: command: test diff --git a/.github/workflows/openblas.yml b/.github/workflows/openblas.yml index b2280f51..40d28b80 100644 --- a/.github/workflows/openblas.yml +++ b/.github/workflows/openblas.yml @@ -24,7 +24,7 @@ jobs: - name: apt install openblas run: | sudo apt update - sudo apt install -y libopenblas-dev liblapacke-dev + sudo apt install -y libopenblas-dev if: ${{ matrix.feature == 'system' }} - uses: actions-rs/cargo@v1 with: From f977c5c295ad7aea8606094932e345ce59cf3c2f Mon Sep 17 00:00:00 2001 From: Toshiki Teramura Date: Mon, 27 Jul 2020 02:53:25 +0900 Subject: [PATCH 13/13] intel-mkl-{static,system} features --- .github/workflows/intel-mkl.yml | 41 +++------------------------------ lax/Cargo.toml | 10 ++++---- lax/src/lib.rs | 7 +----- ndarray-linalg/Cargo.toml | 7 +++--- 4 files changed, 11 insertions(+), 54 deletions(-) diff --git a/.github/workflows/intel-mkl.yml b/.github/workflows/intel-mkl.yml index 32d7cc33..9b150ff8 100644 --- a/.github/workflows/intel-mkl.yml +++ b/.github/workflows/intel-mkl.yml @@ -12,8 +12,7 @@ jobs: fail-fast: false matrix: feature: - - mkl-static-lp64-seq - - mkl-dynamic-lp64-seq + - intel-mkl-static runs-on: windows-2019 steps: - uses: actions/checkout@v1 @@ -25,54 +24,20 @@ jobs: --no-default-features --features=${{ matrix.feature }} - macos: - strategy: - fail-fast: false - matrix: - feature: - - mkl-dynamic-lp64-iomp - - mkl-dynamic-lp64-seq - runs-on: macos-10.15 - steps: - - uses: actions/checkout@v1 - - uses: actions-rs/cargo@v1 - name: cargo test --all-targets - with: - command: test - args: > - --manifest-path=ndarray-linalg/Cargo.toml - --no-default-features - --features=${{ matrix.feature }} - --all-targets - linux: strategy: fail-fast: false matrix: feature: - - mkl-static-lp64-iomp - - mkl-static-lp64-seq - - mkl-dynamic-lp64-iomp - - mkl-dynamic-lp64-seq + - intel-mkl-static runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v1 - uses: actions-rs/cargo@v1 - name: cargo test --all-targets - with: - command: test - args: > - --manifest-path=ndarray-linalg/Cargo.toml - --no-default-features - --features=${{ matrix.feature }} - --all-targets - - uses: actions-rs/cargo@v1 - name: cargo test --doc + name: cargo test with: command: test args: > --manifest-path=ndarray-linalg/Cargo.toml --no-default-features --features=${{ matrix.feature }} - --doc - if: ${{ startsWith(matrix.feature, 'mkl-static') }} diff --git a/lax/Cargo.toml b/lax/Cargo.toml index 094fafac..574cadf8 100644 --- a/lax/Cargo.toml +++ b/lax/Cargo.toml @@ -9,17 +9,16 @@ default = [] netlib = ["netlib-static"] openblas = ["openblas-static"] -intel-mkl = ["mkl-static-lp64-seq"] +intel-mkl = ["intel-mkl-static"] netlib-static = ["netlib-src/static"] netlib-system = ["netlib-src/system"] + openblas-static = ["openblas-src/static"] openblas-system = ["openblas-src/system"] -mkl-static-lp64-iomp = ["intel-mkl-src/mkl-static-lp64-iomp"] -mkl-static-lp64-seq = ["intel-mkl-src/mkl-static-lp64-seq"] -mkl-dynamic-lp64-iomp = ["intel-mkl-src/mkl-dynamic-lp64-iomp"] -mkl-dynamic-lp64-seq = ["intel-mkl-src/mkl-dynamic-lp64-seq"] +intel-mkl-static = ["intel-mkl-src/mkl-static-lp64-seq", "intel-mkl-src/download"] +intel-mkl-system = ["intel-mkl-src/mkl-dynamic-lp64-seq"] [dependencies] thiserror = "1.0" @@ -30,7 +29,6 @@ lapack = "0.16.0" [dependencies.intel-mkl-src] version = "0.6.0" default-features = false -features = ["download"] optional = true [dependencies.netlib-src] diff --git a/lax/src/lib.rs b/lax/src/lib.rs index 79ad142d..51efffd1 100644 --- a/lax/src/lib.rs +++ b/lax/src/lib.rs @@ -59,12 +59,7 @@ //! [svddc]: svddck/trait.SVDDC_.html#tymethod.svddc //! [least_squares]: least_squares/trait.LeastSquaresSvdDivideConquer_.html#tymethod.least_squares -#[cfg(any( - feature = "mkl-static-lp64-iomp", - feature = "mkl-static-lp64-seq", - feature = "mkl-dynamic-lp64-iomp", - feature = "mkl-dynamic-lp64-seq", -))] +#[cfg(any(feature = "intel-mkl-system", feature = "intel-mkl-static"))] extern crate intel_mkl_src as _src; #[cfg(any(feature = "openblas-system", feature = "openblas-static"))] diff --git a/ndarray-linalg/Cargo.toml b/ndarray-linalg/Cargo.toml index e4c1f33c..81438327 100644 --- a/ndarray-linalg/Cargo.toml +++ b/ndarray-linalg/Cargo.toml @@ -21,13 +21,12 @@ intel-mkl = ["lax/intel-mkl"] netlib-static = ["lax/netlib-static"] netlib-system = ["lax/netlib-system"] + openblas-static = ["lax/openblas-static"] openblas-system = ["lax/openblas-system"] -mkl-static-lp64-iomp = ["lax/mkl-static-lp64-iomp"] -mkl-static-lp64-seq = ["lax/mkl-static-lp64-seq"] -mkl-dynamic-lp64-iomp = ["lax/mkl-dynamic-lp64-iomp"] -mkl-dynamic-lp64-seq = ["lax/mkl-dynamic-lp64-seq"] +intel-mkl-static = ["lax/intel-mkl-static"] +intel-mkl-system = ["lax/intel-mkl-system"] [dependencies] cauchy = "0.2.2"