Skip to content

Re-implement intel-mkl-tool #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Aug 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5981d47
Start Entry2
termoshtt Aug 2, 2022
1fcc4c4
Rename Entry2 to Library, add documents
termoshtt Aug 2, 2022
8166537
Library::seek_directory
termoshtt Aug 2, 2022
9c0ed5e
Do not seek ia32 directory
termoshtt Aug 2, 2022
047296c
Panic if two MKL found in a root directory
termoshtt Aug 2, 2022
1edb6b1
Library::new
termoshtt Aug 2, 2022
5b7dcd0
Test Library::pkg_config
termoshtt Aug 2, 2022
a7bb454
Merge branch 'master' into rewrite-tool-entry
termoshtt Aug 2, 2022
0c35a34
clippy fix
termoshtt Aug 2, 2022
7dbcd06
Revise error handling in Library::seek_directory
termoshtt Aug 3, 2022
47f20b9
Library::version
termoshtt Aug 3, 2022
ad20eac
Library::print_cargo_metadata
termoshtt Aug 3, 2022
6d21c98
Use macos-11 and windows-2022 runner
termoshtt Aug 3, 2022
4a83eaf
Remove out-dated
termoshtt Aug 3, 2022
c60613d
Use pkg-config only for prefix
termoshtt Aug 3, 2022
b4b7990
Use libmkl_core.so instead of libmkl_rt.so
termoshtt Aug 4, 2022
d709c0a
Returns None if iomp5 is not found with *-iomp setting
termoshtt Aug 4, 2022
89cc629
pkg-config feature will not works for mkl-*-*-iomp cases
termoshtt Aug 4, 2022
45d83aa
Library::iomp5_dir becomes None only for `mkl-*-*-seq` cases
termoshtt Aug 4, 2022
07fbbb4
Add doc for Library, make members public
termoshtt Aug 4, 2022
8f539ef
Merge branch 'master' into rewrite-tool-entry
termoshtt Aug 4, 2022
6d53319
Use 1.56.0-1 image
termoshtt Aug 4, 2022
027b2d7
Skip symlink
termoshtt Aug 4, 2022
bdb5222
Drop seek_opt_intel test
termoshtt Aug 4, 2022
a88c0dc
Remove outdated
termoshtt Aug 4, 2022
5285ae7
Use std::env::consts::{DLL_*}
termoshtt Aug 4, 2022
d9a0e6c
Remove intel-mkl-tool CLI
termoshtt Aug 4, 2022
b7eb03f
Drop unused crates
termoshtt Aug 4, 2022
2356b1a
clippy --fix
termoshtt Aug 4, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/intel-mkl-sys.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- mkl-dynamic-ilp64-seq
runs-on: ubuntu-22.04
container:
image: ghcr.io/rust-math/intel-mkl-src/mkl-rust:1.56.0
image: ghcr.io/rust-math/intel-mkl-src/mkl-rust:1.56.0-1
steps:
- uses: actions/checkout@v1
- uses: actions-rs/cargo@v1
Expand Down
20 changes: 11 additions & 9 deletions .github/workflows/intel-mkl-tool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
fail-fast: false
matrix:
os:
- windows-2019
- macos-10.15
- windows-2022
- macos-11
- ubuntu-22.04
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -37,23 +37,25 @@ jobs:
--manifest-path=intel-mkl-tool/Cargo.toml
--no-default-features

seek:
test_pkg_config:
strategy:
fail-fast: false
matrix:
image:
- mkl-rust
- mkl-ubuntu
- mkl-centos
runs-on: ubuntu-22.04
container:
image: ghcr.io/rust-math/intel-mkl-src/${{ matrix.image }}:1.56.0
image: ghcr.io/rust-math/intel-mkl-src/${{ matrix.image }}:1.56.0-1
steps:
- uses: actions/checkout@v1
- name: cargo run -- seek
uses: actions-rs/cargo@v1
- uses: actions-rs/cargo@v1
name: Seek /opt/intel
with:
command: run
command: test
args: >
--manifest-path=intel-mkl-tool/Cargo.toml
-- seek
pkg_config
--
--ignored
--show-output
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
check-format:
runs-on: ubuntu-22.04
container:
image: ghcr.io/rust-math/intel-mkl-src/mkl-rust:1.56.0
image: ghcr.io/rust-math/intel-mkl-src/mkl-rust:1.56.0-1
steps:
- uses: actions/checkout@v1
- uses: actions-rs/cargo@v1
Expand All @@ -21,7 +21,7 @@ jobs:
clippy:
runs-on: ubuntu-22.04
container:
image: ghcr.io/rust-math/intel-mkl-src/mkl-rust:1.56.0
image: ghcr.io/rust-math/intel-mkl-src/mkl-rust:1.56.0-1
steps:
- uses: actions/checkout@v1
- uses: actions-rs/cargo@v1
Expand Down
25 changes: 4 additions & 21 deletions intel-mkl-src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

use anyhow::{bail, Result};
use intel_mkl_tool::*;
use std::{env, path::PathBuf, str::FromStr};
use std::str::FromStr;

#[cfg(feature = "mkl-static-lp64-iomp")]
const MKL_CONFIG: &str = "mkl-static-lp64-iomp";
Expand All @@ -45,26 +45,9 @@ const MKL_CONFIG: &str = "mkl-dynamic-ilp64-seq";

fn main() -> Result<()> {
let cfg = Config::from_str(MKL_CONFIG).unwrap();

// already exists on system
if let Ok(entry) = Entry::from_config(cfg) {
entry.print_cargo_metadata();
if let Ok(lib) = Library::new(cfg) {
lib.print_cargo_metadata()?;
return Ok(());
}

// download if not found
#[cfg(feature = "download")]
{
let path = PathBuf::from(env::var("OUT_DIR").unwrap());
println!(
r#"cargo:warning="Download Intel MKL archive into {}""#,
path.display()
);
cfg.download(path)?;
let entry = Entry::from_config(cfg).unwrap(); // must found
entry.print_cargo_metadata();
return Ok(());
}

bail!("No MKL found, and download flag is off.");
bail!("No MKL found");
}
19 changes: 2 additions & 17 deletions intel-mkl-tool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,12 @@ rust-version = "1.56.0" # MSRV is introduced

description = "CLI utility for redistributiing Intel(R) MKL"
repository = "https://github.com/rust-math/intel-mkl-src"
keywords = ["cli"]
keywords = []
license = "MIT"

[features]
default = ["cli"]
cli = ["structopt"]

[dependencies]
anyhow = "1.0.58"
derive_more = "0.99.17"
dirs = "4.0.0"
glob = "0.3.0"
pkg-config = "0.3.25"

# CLI
structopt = { version = "0.3.26", optional = true }
walkdir = "2.3.2"

[dev-dependencies]
paste = "1.0.7"

[[bin]]
name = "intel-mkl-tool"
path = "src/cli.rs"
required-features = ["cli"]
34 changes: 0 additions & 34 deletions intel-mkl-tool/src/cli.rs

This file was deleted.

Loading