Skip to content
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

Generic scalar implementation #7

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
**/*.rs.bk
Cargo.lock
/.cargo/
25 changes: 17 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "condest"
version = "0.2.1"
version = "0.3.0"
authors = ["Richard Janis Goldschmidt <janis.beckert@gmail.com>"]
edition = "2018"
license = "MIT OR Apache-2.0"
Expand All @@ -12,13 +12,22 @@ categories = ["science"]
keywords = ["condition", "linalg", "matrix", "ndarray", "norm"]

[dependencies]
cblas = "0.2"
lapacke = "0.2"
ndarray = "0.12"
cblas = "0.4"
lapacke = "0.5"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to not require lapacke as well as lapack (it makes building on macOS much more difficult). Would you consider switching to using lapack? (It is mostly the same)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lapacke was the original requirement, so I just stuck to it. Upstream, maybe I can make lapacke and lapack options to the lapack-traits package, but it's probably up to @SuperFluffy which wrapper is used here.

I know linkage on macOS is a pain, but I got it to work out with a homebrew installed openblas backend. You just have to set the rustflags to point to the lib directories for openblas and GCC (for libgfortran). You can make your .cargo/config include something like this

[target.x86_64-apple-darwin]
rustflags = [  "-L", "native=/usr/local/opt/gcc/lib/gcc/11/",
               "-L", "native=/usr/local/opt/openblas/lib"
            ]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I unfortunately have requirements to statically link all my BLAS dependencies, as I know nothing of my target system other than "macOS", so it would complicate many things to link to homebrew.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the problem. I've started an upstream issue for this: hmunozb/lapack-traits#1

lapack-traits = {version="0.4", features=["simba"]}
ndarray = "0.15"
num-traits = "0.2"
ordered-float = "1.0"
rand = "0.6"
rand_xoshiro = "0.1"
rand = "0.8"
rand_distr = "0.4"
rand_xoshiro = "0.6"
simba="0.6"

#[patch.crates-io]
#lapack-traits = {git="https://github.com/hmunozb/lapack-traits.git"}

[dev-dependencies]
ndarray-rand = "0.9"
openblas-src = "0.7"
ndarray-rand = "0.14"
#openblas-src = "0.9"
openblas-src = {version="0.10", default-features=false, features=["system"]}

Loading