Skip to content

Commit a422662

Browse files
authored
Merge pull request #48 from rust-math/default-path-for-windows
MKL2020.1 for Windows
2 parents 512f637 + d2f9d52 commit a422662

File tree

6 files changed

+61
-32
lines changed

6 files changed

+61
-32
lines changed

.github/workflows/intel-mkl-sys.yml

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,20 @@ jobs:
1212
fail-fast: false
1313
matrix:
1414
feature:
15+
- mkl-static-lp64-seq
16+
- mkl-static-ilp64-seq
1517
- mkl-dynamic-lp64-seq
1618
- mkl-dynamic-ilp64-seq
1719
runs-on: windows-2019
1820
steps:
19-
- uses: actions/checkout@v1
20-
- uses: actions-rs/cargo@v1
21-
with:
22-
command: test
23-
args: >
24-
--manifest-path=intel-mkl-sys/Cargo.toml
25-
--no-default-features
26-
--features=${{ matrix.feature }},download
21+
- uses: actions/checkout@v1
22+
- uses: actions-rs/cargo@v1
23+
with:
24+
command: test
25+
args: >
26+
--manifest-path=intel-mkl-sys/Cargo.toml
27+
--no-default-features
28+
--features=${{ matrix.feature }},download
2729
2830
macos:
2931
strategy:
@@ -36,14 +38,14 @@ jobs:
3638
- mkl-dynamic-ilp64-seq
3739
runs-on: macos-10.15
3840
steps:
39-
- uses: actions/checkout@v1
40-
- uses: actions-rs/cargo@v1
41-
with:
42-
command: test
43-
args: >
44-
--manifest-path=intel-mkl-sys/Cargo.toml
45-
--no-default-features
46-
--features=${{ matrix.feature }},download
41+
- uses: actions/checkout@v1
42+
- uses: actions-rs/cargo@v1
43+
with:
44+
command: test
45+
args: >
46+
--manifest-path=intel-mkl-sys/Cargo.toml
47+
--no-default-features
48+
--features=${{ matrix.feature }},download
4749
4850
linux:
4951
strategy:
@@ -60,11 +62,11 @@ jobs:
6062
- mkl-dynamic-ilp64-seq
6163
runs-on: ubuntu-18.04
6264
steps:
63-
- uses: actions/checkout@v1
64-
- uses: actions-rs/cargo@v1
65-
with:
66-
command: test
67-
args: >
68-
--manifest-path=intel-mkl-sys/Cargo.toml
69-
--no-default-features
70-
--features=${{ matrix.feature }},download
65+
- uses: actions/checkout@v1
66+
- uses: actions-rs/cargo@v1
67+
with:
68+
command: test
69+
args: >
70+
--manifest-path=intel-mkl-sys/Cargo.toml
71+
--no-default-features
72+
--features=${{ matrix.feature }},download

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ Cargo.lock
1111
**/*.rs.bk
1212

1313
rusty-tags.*
14+
15+
# Generated archives
16+
*.tar.zst

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ Redistribution of Intel MKL as a crate. Tested on Linux, macOS, and Windows (sin
1616
| feature name | Linux | macOS | Windows |
1717
|:-----------------------|:------------------:|:------------------:|:------------------:|
1818
| mkl-static-lp64-iomp | :heavy_check_mark: | - | - |
19-
| mkl-static-lp64-seq | :heavy_check_mark: | - | - |
19+
| mkl-static-lp64-seq | :heavy_check_mark: | - | :heavy_check_mark: |
2020
| mkl-static-ilp64-iomp | :heavy_check_mark: | - | - |
21-
| mkl-static-ilp64-seq | :heavy_check_mark: | - | - |
21+
| mkl-static-ilp64-seq | :heavy_check_mark: | - | :heavy_check_mark: |
2222
| mkl-dynamic-lp64-iomp | :heavy_check_mark: | :heavy_check_mark: | - |
2323
| mkl-dynamic-lp64-seq | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
2424
| mkl-dynamic-ilp64-iomp | :heavy_check_mark: | :heavy_check_mark: | - |
@@ -47,7 +47,9 @@ This crate seeks system MKL libraries, e.g. installed by [apt], [yum], or offici
4747
```
4848
- (experimental) Seek `${XDG_DATA_HOME}/intel-mkl-tool`
4949
- Seek a directory set by `${MKLROOT}` environment variable
50-
- Seek `/opt/intel/mkl`
50+
- Seek default installation path
51+
- `/opt/intel/mkl` for Linux
52+
- `C:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows` for Windows
5153
5254
If not found any MKL library, this crate will download archive from AWS S3 `rust-intel-mkl` bucket.
5355

intel-mkl-tool/src/config.rs

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,17 +235,31 @@ mod tests {
235235
};
236236
}
237237

238-
mod dynamic {
238+
#[cfg(target_os = "windows")]
239+
mod macos {
240+
use super::*;
241+
impl_test_download!("mkl-dynamic-lp64-seq");
242+
impl_test_download!("mkl-dynamic-ilp64-seq");
243+
impl_test_download!("mkl-static-lp64-seq");
244+
impl_test_download!("mkl-static-ilp64-seq");
245+
}
246+
247+
#[cfg(target_os = "macos")]
248+
mod macos {
239249
use super::*;
240250
impl_test_download!("mkl-dynamic-lp64-seq");
241251
impl_test_download!("mkl-dynamic-lp64-iomp");
242252
impl_test_download!("mkl-dynamic-ilp64-seq");
243253
impl_test_download!("mkl-dynamic-ilp64-iomp");
244254
}
245255

246-
#[cfg(all(target_os = "linux", target_arch = "x86_64"))]
247-
mod static_ {
256+
#[cfg(target_os = "linux")]
257+
mod linux {
248258
use super::*;
259+
impl_test_download!("mkl-dynamic-lp64-seq");
260+
impl_test_download!("mkl-dynamic-lp64-iomp");
261+
impl_test_download!("mkl-dynamic-ilp64-seq");
262+
impl_test_download!("mkl-dynamic-ilp64-iomp");
249263
impl_test_download!("mkl-static-lp64-seq");
250264
impl_test_download!("mkl-static-lp64-iomp");
251265
impl_test_download!("mkl-static-ilp64-seq");

intel-mkl-tool/src/entry.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,14 @@ impl Entry {
114114
targets.seek(opt_mkl.join("lib/intel64"));
115115
}
116116

117+
// Default setting for Windows installer
118+
let windows_mkl =
119+
PathBuf::from("C:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows");
120+
if windows_mkl.exists() {
121+
targets.seek(windows_mkl.join("mkl/lib/intel64"));
122+
targets.seek(windows_mkl.join("compiler/lib/intel64"));
123+
}
124+
117125
if targets.found_any() {
118126
return Ok(Self { config, targets });
119127
} else {

intel-mkl-tool/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ mod mkl {
128128
pub const EXTENSION_STATIC: &'static str = "lib";
129129
pub const EXTENSION_SHARED: &'static str = "lib";
130130
pub const PREFIX: &'static str = "";
131-
pub const VERSION_YEAR: u32 = 2019;
132-
pub const VERSION_UPDATE: u32 = 5;
131+
pub const VERSION_YEAR: u32 = 2020;
132+
pub const VERSION_UPDATE: u32 = 1;
133133
}
134134

135135
fn s3_addr() -> String {

0 commit comments

Comments
 (0)