ndarray-linalg icon indicating copy to clipboard operation
ndarray-linalg copied to clipboard

Install netlib into Windows for testing netlib-system feature

Open termoshtt opened this issue 5 years ago • 2 comments

termoshtt avatar Jul 26 '20 18:07 termoshtt

I'd like to try working on this and have a windows machine to test.
@termoshtt

nnashwin avatar Mar 11 '21 12:03 nnashwin

Welcome :)

Background

  • ndarray-linalg links to the netlib's reference implementation of LAPACK through blas-lapack-rs/netlib-src
  • netlib-src crate only responsible for linking. FFI definitions for LAPACK (implemented in Fortran) is placed at lapack-sys because it is common though another LAPACK implementations e.g. OpenBLAS and Intel MKL.
  • netlib-src tries to compile reference LAPACK in build.rs if system feature is not specified.
  • If system feature is set, netlib-src does not compile the reference LAPACK, and tries to link system's LAPACK. Most Linux system has LAPACK package in its package registry, e.g. in Ubuntu apt install liblapack-dev installs /lib/x86_64-linux-gnu/liblapack.so.3.

Goal

How

  • For Windows, Rust has two target, i.e. x86_64-pc-windows-msvc and x86_64-pc-windows-gnu.
    • For GNU toolchain, there is mingw-w64-x86_64-lapack. This can be suitable for this issue.
    • For MSVC toolchain, it has no official Fortran compiler, and I do not know any compiled binary distribution of the reference LAPACK. Thus, this will be harder than GNU case.
  • GitHub Actions has Windows runner. This can be used for our purpose.

Problem

  • We need to setup msys2 environment on CI to use the above package.
  • Setup MSYS2 looks helpful for it, but I've never tested it.

This is what I recognize about this issue. Feel free to ask me any question.

termoshtt avatar Mar 13 '21 09:03 termoshtt