Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 22 additions & 0 deletions intel-mkl-tool/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,28 @@ impl Config {
};
libs
}

/// Dynamically loaded libraries, e.g. `libmkl_vml_avx2.so`
///
/// - MKL seeks additional shared library **on runtime**.
/// This function lists these files for packaging.
pub fn additional_libs(&self) -> Vec<String> {
match self.link {
LinkType::Static => Vec::new(),
LinkType::Shared => {
let mut libs = Vec::new();
for prefix in &["mkl", "mkl_vml"] {
for suffix in &["def", "avx", "avx2", "avx512", "avx512_mic", "mc", "mc3"] {
libs.push(format!("{}_{}", prefix, suffix));
}
}
libs.push("mkl_rt".into());
libs.push("mkl_vml_mc2".into());
libs.push("mkl_vml_cmpt".into());
libs
}
}
}
}

#[cfg(test)]
Expand Down
6 changes: 5 additions & 1 deletion intel-mkl-tool/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ struct Targets(HashMap<String, Option<PathBuf>>);
impl Targets {
fn new(config: Config) -> Self {
let mut targets: HashMap<String, Option<PathBuf>> = HashMap::new();
for name in config.libs() {
for name in config
.libs()
.into_iter()
.chain(config.additional_libs().into_iter())
{
let target = match config.link {
LinkType::Static => format!("{}{}.{}", mkl::PREFIX, name, mkl::EXTENSION_STATIC),
LinkType::Shared => format!("{}{}.{}", mkl::PREFIX, name, mkl::EXTENSION_SHARED),
Expand Down
92 changes: 92 additions & 0 deletions intel-mkl-tool/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,95 @@
//! Library files in Intel MKL 2020.1 for Linux
//! --------------------------------------------
//!
//! ### MKL Core
//!
//! | | shared | static |
//! |:-----------------------|:-------------------------------|:------------------------------|
//! |mkl_core | libmkl_core.so| libmkl_core.a|
//! |mkl_def | libmkl_def.so| - |
//! |mkl_rt | libmkl_rt.so| - |
//! |mkl_avx | libmkl_avx.so| - |
//! |mkl_avx2 | libmkl_avx2.so| - |
//! |mkl_avx512 | libmkl_avx512.so| - |
//! |mkl_avx512_mic | libmkl_avx512_mic.so| - |
//! |mkl_mc | libmkl_mc.so| - |
//! |mkl_mc3 | libmkl_mc3.so| - |
//!
//! ### Vector Math library
//!
//! | | shared | static |
//! |:-----------------------|:-------------------------------|:------------------------------|
//! |mkl_vml_def | libmkl_vml_def.so| - |
//! |mkl_vml_avx | libmkl_vml_avx.so| - |
//! |mkl_vml_avx2 | libmkl_vml_avx2.so| - |
//! |mkl_vml_avx512 | libmkl_vml_avx512.so| - |
//! |mkl_vml_avx512_mic | libmkl_vml_avx512_mic.so| - |
//! |mkl_vml_mc | libmkl_vml_mc.so| - |
//! |mkl_vml_mc2 | libmkl_vml_mc2.so| - |
//! |mkl_vml_mc3 | libmkl_vml_mc3.so| - |
//! |mkl_vml_cmpt | libmkl_vml_cmpt.so| - |
//!
//! ### Intel OpenMP
//!
//! | | shared | static |
//! |:-----------------------|:-------------------------------|:------------------------------|
//! |iomp5 | libiomp5.so| libiomp5.a|
//! |iomp5_db | libiomp5_db.so| - |
//! |iompstubs5 | libiompstubs5.so| libiompstubs5.a|
//!
//! ### Threading switch
//!
//! | | shared | static |
//! |:-----------------------|:-------------------------------|:------------------------------|
//! |mkl_sequential | libmkl_sequential.so| libmkl_sequential.a|
//! |mkl_gnu_thread | libmkl_gnu_thread.so| libmkl_gnu_thread.a|
//! |mkl_intel_thread | libmkl_intel_thread.so| libmkl_intel_thread.a|
//! |mkl_pgi_thread | libmkl_pgi_thread.so| libmkl_pgi_thread.a|
//! |mkl_tbb_thread | libmkl_tbb_thread.so| libmkl_tbb_thread.a|
//!
//! ### LP64/ILP64 switch for Intel and GCC Fortran compilers
//!
//! | | shared | static |
//! |:-----------------------|:-------------------------------|:------------------------------|
//! |mkl_intel_ilp64 | libmkl_intel_ilp64.so| libmkl_intel_ilp64.a|
//! |mkl_intel_lp64 | libmkl_intel_lp64.so| libmkl_intel_lp64.a|
//! |mkl_gf_ilp64 | libmkl_gf_ilp64.so| libmkl_gf_ilp64.a|
//! |mkl_gf_lp64 | libmkl_gf_lp64.so| libmkl_gf_lp64.a|
//!
//! ### Fortran 95 interface
//!
//! | | shared | static |
//! |:-----------------------|:-------------------------------|:------------------------------|
//! |mkl_blas95_ilp64 | - | libmkl_blas95_ilp64.a|
//! |mkl_blas95_lp64 | - | libmkl_blas95_lp64.a|
//! |mkl_lapack95_ilp64 | - | libmkl_lapack95_ilp64.a|
//! |mkl_lapack95_lp64 | - | libmkl_lapack95_lp64.a|
//!
//! ### ScaLAPACK
//!
//! | | shared | static |
//! |:-----------------------|:-------------------------------|:------------------------------|
//! |mkl_scalapack_ilp64 | libmkl_scalapack_ilp64.so| libmkl_scalapack_ilp64.a|
//! |mkl_scalapack_lp64 | libmkl_scalapack_lp64.so| libmkl_scalapack_lp64.a|
//!
//! ### BLACS
//!
//! | | shared | static |
//! |:-----------------------|:-------------------------------|:------------------------------|
//! |mkl_blacs_intelmpi_ilp64| libmkl_blacs_intelmpi_ilp64.so| libmkl_blacs_intelmpi_ilp64.a|
//! |mkl_blacs_intelmpi_lp64 | libmkl_blacs_intelmpi_lp64.so| libmkl_blacs_intelmpi_lp64.a|
//! |mkl_blacs_openmpi_ilp64 | libmkl_blacs_openmpi_ilp64.so| libmkl_blacs_openmpi_ilp64.a|
//! |mkl_blacs_openmpi_lp64 | libmkl_blacs_openmpi_lp64.so| libmkl_blacs_openmpi_lp64.a|
//! |mkl_blacs_sgimpt_ilp64 | libmkl_blacs_sgimpt_ilp64.so| libmkl_blacs_sgimpt_ilp64.a|
//! |mkl_blacs_sgimpt_lp64 | libmkl_blacs_sgimpt_lp64.so| libmkl_blacs_sgimpt_lp64.a|
//!
//! ### FFT
//!
//! | | shared | static |
//! |:-----------------------|:-------------------------------|:------------------------------|
//! |mkl_cdft_core | libmkl_cdft_core.so| libmkl_cdft_core.a|
//!

use log::*;
use std::path::*;

Expand Down