cpmech / russell

Rust Scientific Libary. ODE and DAE (Runge-Kutta) solvers. Special functions (Bessel, Elliptic, Beta, Gamma, Erf). Linear algebra. Sparse solvers (MUMPS, UMFPACK). Probability distributions. Tensor calculus.
MIT License
114 stars 8 forks source link

Problem building/running Russell on macOS (Intel processor) #122

Closed JEMH closed 3 months ago

JEMH commented 3 months ago

Hello,

I am trying to use the Russell Scientific Library on my MacBook Pro (with Intel processor) but am having problems.

I have done the following:

Unfortunately the c libraries for umfpack were not found (see below).

I am new to Rust and so I could have missed something very elementary.

Do you have any suggestions as to how I should proceed?

I would be very grateful for any help. Thanks in advance, James Housden

expt_russell % cargo run
Updating crates.io index Locking 49 packages to latest compatible versions Adding ansi_term v0.12.1 Adding atty v0.2.14 Adding autocfg v1.3.0 Adding bitflags v1.3.2 (latest: v2.6.0) Adding cc v1.1.5 Adding cfg-if v1.0.0 Adding clap v2.34.0 (latest: v4.5.9) Adding getrandom v0.2.15 Adding heck v0.3.3 (latest: v0.5.0) Adding hermit-abi v0.1.19 (latest: v0.4.0) Adding itoa v1.0.11 Adding lazy_static v1.5.0 Adding libc v0.2.155 Adding libm v0.2.8 Adding num-complex v0.4.6 Adding num-traits v0.2.19 Adding ppv-lite86 v0.2.17 Adding proc-macro-error v1.0.4 Adding proc-macro-error-attr v1.0.4 Adding proc-macro2 v1.0.86 Adding quote v1.0.36 Adding rand v0.8.5 Adding rand_chacha v0.3.1 Adding rand_core v0.6.4 Adding rand_distr v0.4.3 Adding russell_lab v1.6.0 Adding russell_ode v1.6.0 Adding russell_sparse v1.6.0 Adding russell_stat v1.6.0 Adding russell_tensor v1.6.0 Adding ryu v1.0.18 Adding serde v1.0.204 Adding serde_derive v1.0.204 Adding serde_json v1.0.120 Adding strsim v0.8.0 (latest: v0.11.1) Adding structopt v0.3.26 Adding structopt-derive v0.4.18 Adding syn v1.0.109 (latest: v2.0.71) Adding syn v2.0.71 Adding textwrap v0.11.0 (latest: v0.16.1) Adding unicode-ident v1.0.12 Adding unicode-segmentation v1.11.0 Adding unicode-width v0.1.13 Adding vec_map v0.8.2 Adding version_check v0.9.4 Adding wasi v0.11.0+wasi-snapshot-preview1 (latest: v0.13.1+wasi-0.2.0) Adding winapi v0.3.9 Adding winapi-i686-pc-windows-gnu v0.4.0 Adding winapi-x86_64-pc-windows-gnu v0.4.0 Compiling proc-macro2 v1.0.86 Compiling unicode-ident v1.0.12 Compiling libc v0.2.155 Compiling version_check v0.9.4 Compiling autocfg v1.3.0 Compiling libm v0.2.8 Compiling cc v1.1.5 Compiling serde v1.0.204 Compiling syn v1.0.109 Compiling cfg-if v1.0.0 Compiling unicode-width v0.1.13 Compiling unicode-segmentation v1.11.0 Compiling strsim v0.8.0 Compiling textwrap v0.11.0 Compiling vec_map v0.8.2 Compiling serde_json v1.0.120 Compiling proc-macro-error-attr v1.0.4 Compiling proc-macro-error v1.0.4 Compiling bitflags v1.3.2 Compiling num-traits v0.2.19 Compiling heck v0.3.3 Compiling ppv-lite86 v0.2.17 Compiling ansi_term v0.12.1 Compiling ryu v1.0.18 Compiling lazy_static v1.5.0 Compiling itoa v1.0.11 Compiling russell_lab v1.6.0 Compiling russell_sparse v1.6.0 Compiling quote v1.0.36 Compiling syn v2.0.71 Compiling getrandom v0.2.15 Compiling atty v0.2.14 Compiling clap v2.34.0 Compiling rand_core v0.6.4 Compiling rand_chacha v0.3.1 Compiling rand v0.8.5 Compiling serde_derive v1.0.204 Compiling rand_distr v0.4.3 Compiling structopt-derive v0.4.18 Compiling structopt v0.3.26 The following warnings were emitted during compilation:

warning: russell_sparse@1.6.0: c_code/interface_complex_umfpack.c:4:10: fatal error: 'umfpack.h' file not found warning: russell_sparse@1.6.0: #include "umfpack.h" warning: russell_sparse@1.6.0: ^~~ warning: russell_sparse@1.6.0: 1 error generated.

error: failed to run custom build command for russell_sparse v1.6.0

Caused by: process didn't exit successfully: /Users/admin/RustroverProjects/expt_russell/target/debug/build/russell_sparse-beebd4751418e261/build-script-build (exit status: 1) --- stdout OUT_DIR = Some(/Users/admin/RustroverProjects/expt_russell/target/debug/build/russell_sparse-6ea65dc13eb23187/out) TARGET = Some(x86_64-apple-darwin) OPT_LEVEL = Some(0) HOST = Some(x86_64-apple-darwin) cargo:rerun-if-env-changed=CC_x86_64-apple-darwin CC_x86_64-apple-darwin = None cargo:rerun-if-env-changed=CC_x86_64_apple_darwin CC_x86_64_apple_darwin = None cargo:rerun-if-env-changed=HOST_CC HOST_CC = None cargo:rerun-if-env-changed=CC CC = None cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT RUSTC_WRAPPER = None cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS CRATE_CC_NO_DEFAULTS = None DEBUG = Some(true) cargo:rerun-if-env-changed=MACOSX_DEPLOYMENT_TARGET MACOSX_DEPLOYMENT_TARGET = None cargo:rerun-if-env-changed=CFLAGS_x86_64-apple-darwin CFLAGS_x86_64-apple-darwin = None cargo:rerun-if-env-changed=CFLAGS_x86_64_apple_darwin CFLAGS_x86_64_apple_darwin = None cargo:rerun-if-env-changed=HOST_CFLAGS HOST_CFLAGS = None cargo:rerun-if-env-changed=CFLAGS CFLAGS = None cargo:warning=c_code/interface_complex_umfpack.c:4:10: fatal error: 'umfpack.h' file not found cargo:warning=#include "umfpack.h" cargo:warning= ^~~ cargo:warning=1 error generated.

--- stderr

error occurred: Command env -u IPHONEOS_DEPLOYMENT_TARGET "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer" "-m64" "--target=x86_64-apple-darwin" "-mmacosx-version-min=14.5" "-I" "/usr/include/suitesparse" "-I" "/opt/homebrew/include/suitesparse" "-Wall" "-Wextra" "-o" "/Users/admin/RustroverProjects/expt_russell/target/debug/build/russell_sparse-6ea65dc13eb23187/out/be5a010cd526d178-interface_complex_umfpack.o" "-c" "c_code/interface_complex_umfpack.c" with args cc did not execute successfully (status code exit status: 1).

warning: build failed, waiting for other jobs to finish...

cpmech commented 3 months ago

Hi, can you search for "umfpack.h" in your system?

JEMH commented 3 months ago

Hi Dorival,

On my system homebrew has installed umfpack at the following location:

-rw-r--r-- 1 admin staff 221983 26 Mär 22:14 /usr/local/Cellar/suite-sparse/7.7.0/include/suitesparse/umfpack.h

In /usr/local/include I see the following link.

lrwxr-xr-x 1 admin admin 48 4 Mai 18:17 /usr/local/include/suitesparse -> ../Cellar/suite-sparse/7.7.0/include/suitesparse

Regards, James

Am 22.07.2024 um 02:00 schrieb Dorival Pedroso @.***>:

Hi, can you search for "umfpack.h" in your system?

— Reply to this email directly, view it on GitHub https://github.com/cpmech/russell/issues/122#issuecomment-2241822912, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQRDKUPR2YHB4PBMU2526DZNRDR7AVCNFSM6AAAAABLAANTH6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBRHAZDEOJRGI. You are receiving this because you authored the thread.

cpmech commented 3 months ago

Can you please create the following link?

/opt/homebrew/include/suitesparse -> /usr/local/include/suitesparse

If it works, then I can publish another version with the fix.

JEMH commented 3 months ago

Hi Dorival,

I created the suggested soft link

ln -s /usr/local/include/suitesparse /opt/homebrew/include/suitesparse

The Russell then built successfully.

As before, I overwrote the main.rs http://main.rs/ file with the contents of the file arenstorf_dopri8.rs http://arenstorf_dopri8.rs/. To get this to compile I needed to add an ampersand before system in line 26: let mut solver = OdeSolver::new(params, &system)?; -^- The file then compiled but did not link because it could not find various libraries:

= note: env -u IPHONEOS_DEPLOYMENT_TARGET -u TVOS_DEPLOYMENT_TARGET -u XROS_DEPLOYMENT_TARGET LC_ALL="C" PATH="/Users/admin/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/bin:/Users/admin/.asdf/shims:/Users/admin/.asdf/bin:/Users/admin/opt/anaconda3/bin:/Users/admin/opt/anaconda3/condabin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/X11/bin:/Library/Apple/usr/bin:/Library/TeX/texbin:/Users/admin/.cargo/bin:/Users/admin/.local/bin:/Users/admin/.local/bin" VSLANG="1033" ZERO_AR_DATE="1" "cc" "-arch" "x86_64" "-m64" "/var/folders/cp/nbvh93xd7dn99f1wwlr8d7s40000gp/T/rustcedpwUr/symbols.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.10l47o7sjpcdbfcj.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.12b93uojh64l95gv.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.12x6cdpeferojim3.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.15pqlmzt3muo7vac.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.19hxpka9b1u5eof7.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.19uswrnesbu8l3c4.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.1a6l0n2zfqbpl56e.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.1emv0pq1l5poswtm.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.1jq9w8ukspaet91c.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.1lq2idwghymjgqke.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.1ss7p3jo3ml4jflx.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.1u7jvwlk53eks4wo.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.21vaqwulopqiu2ry.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.23wnvzhv1ykcfjle.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.256t44pg8rxiimu4.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.26cvnszqypt9mhcn.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.27z2sl9k002zimb2.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.29w7n0nt7kcy1ze1.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.2hhmohrmu0z3dj8o.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.2hpj6jim8c85sz0n.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.2ktjxr5x6g76hkhe.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.2lvyhacphosg1p9h.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.2omzc81p9tq6ux5w.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.2ryxqjypfnfic3yj.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.2s79idgc5zka4ipq.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.2t7g6n7fbut3mopy.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.2t8egz9s15ggdg13.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.2trdfl9wr3qa1vv9.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.2xzopic7rmkygzle.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.2ye9tnv91la6cbqr.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.30z0ahhi65kqq27v.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.32wuybvmhxza2qi8.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.3585qahm6gbn70lq.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.3660kmrytiuxiyhk.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.36dpvznd3s41xfru.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.38p632rd1ti8z29j.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.3a5ro1jb1yjr16kz.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.3bng3mgorshdb4ov.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.3crp68f0ivyl9s6r.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.3e4g948aclmil7ih.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.3eur9rgcf7d3fh1r.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.3ibhpif1v7bg4jyd.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.3l5qgij0oxn9wapg.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.3leg2nn45nstgm0c.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.3mo9etlukgv9amle.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.3my8l0r4z3edbznh.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.3sqfxzys8gk5knd0.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.3td4xco73n9sbkw5.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.3vti0p3y9tuimfcl.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.3x2litbvmgyprgya.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.41km3a66pf03o95p.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.43evfkehjre2196.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.44gyyx48dbtti28x.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.45lgxdkijm2bayvx.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.46e8mzl3bx68womn.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.47rn8twjc2g3k2i0.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.485aghhvbsvkjxd7.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.489ygfl4vxwnknxl.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.48n8ql6jie6t0c6t.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.4e4co8l7oebctv4y.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.4epca9mrwg23i8ai.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.4lphumiojj8641fm.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.4nh1qszieh6l9wse.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.4ooqkzjdllf8b9eq.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.4oz38fc4l1cwd42f.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.4s4cxg9p6cax7jwu.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.4vw3fg9phmcomw65.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.4wmh2133f6bhifrs.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.56sfymfromc5gsuk.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.57mqfm6glg8y0m8c.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.588goj430430nykj.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.5aj9e70c8cl9o72h.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.5blud28n3rwxo5l1.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.5g489u4to2dlgvq3.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.5pz2dmvq8m6fjou.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.7liyj3ebhzspcdq.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.copvjxqxxfth09g.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.dfov3fguhdvqdzq.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.dl8051mrjg6tz83.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.dqfzqcbntn4km5r.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.k3ezs3qucd4490i.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.k80z5l155wi7n2v.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.mbkc7hn0c39ua7g.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.qp0osct1jgbbltp.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.tj6ffdkmta4wajn.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.u1bon3vygyxtil0.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.wtmefsyi97tcqpc.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.ydwwfqg5il6yh1l.rcgu.o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e.zwhrxi65toks3a3.rcgu.o" "-L" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps" "-L" "/Users/admin/RustroverProjects/expt_russell/target/debug/build/russell_lab-9a5b3ada44001a47/out" "-L" "/opt/homebrew/opt/lapack/lib" "-L" "/opt/homebrew/opt/openblas/lib" "-L" "/Users/admin/RustroverProjects/expt_russell/target/debug/build/russell_sparse-8b12f929af19b7e7/out" "-L" "/usr/lib/x86_64-linux-gnu" "-L" "/usr/lib" "-L" "/usr/lib64" "-L" "/opt/homebrew/lib" "-L" "/Users/admin/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/librussell_ode-beee3bb5818cd5cf.rlib" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/librussell_sparse-60d2b4b25e11b7a6.rlib" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/libserde_json-3e887765413be0ee.rlib" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/libitoa-bd1aecea7c5aa5b5.rlib" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/libryu-94fe3a58e7e1fc57.rlib" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/librussell_lab-d207fe22484f6c7a.rlib" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/libnum_complex-5e83ed324a019613.rlib" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/libserde-63a125d8e7c0c79b.rlib" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/libnum_traits-86cd058c73c82261.rlib" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/libplotpy-bc4630d80b52b822.rlib" "/Users/admin/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-85e77511d3e3991b.rlib" "/Users/admin/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-eafdc89bf8c2684d.rlib" "/Users/admin/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libobject-473ec6507ab8ac34.rlib" "/Users/admin/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libmemchr-da05ae84e079b23a.rlib" "/Users/admin/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libaddr2line-49f48c8353cb63cf.rlib" "/Users/admin/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libgimli-796235596cf6de05.rlib" "/Users/admin/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-b608fa3804da184e.rlib" "/Users/admin/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd_detect-3f8aa96fd409fcfa.rlib" "/Users/admin/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-99e8bc8b90734e5d.rlib" "/Users/admin/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-5bde543e51b94788.rlib" "/Users/admin/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libminiz_oxide-8bb1d541b75e927b.rlib" "/Users/admin/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libadler-52c973eaba43f28d.rlib" "/Users/admin/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libunwind-1d23464efad515b4.rlib" "/Users/admin/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-429ede14115b4830.rlib" "/Users/admin/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liblibc-821915d3a4d69b7b.rlib" "/Users/admin/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc-2350d8e656d53eda.rlib" "/Users/admin/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-58940dcec9080f3b.rlib" "/Users/admin/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcore-709ee95972af0293.rlib" "/Users/admin/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-5db7a0f312dea0af.rlib" "-lklu" "-lumfpack" "-lopenblas" "-llapack" "-lSystem" "-lc" "-lm" "-L" "/Users/admin/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "-o" "/Users/admin/RustroverProjects/expt_russell/target/debug/deps/expt_russell-56e7cafc71c8835e" "-Wl,-dead_strip" "-nodefaultlibs" = note: ld: warning: search path '/opt/homebrew/opt/lapack/lib' not found ld: warning: search path '/opt/homebrew/opt/openblas/lib' not found ld: warning: search path '/usr/lib/x86_64-linux-gnu' not found ld: warning: search path '/usr/lib64' not found ld: warning: search path '/opt/homebrew/lib' not found ld: library 'openblas' not found

xxxx Regards, James

Am 22.07.2024 um 10:07 schrieb Dorival Pedroso @.***>:

Can you please create the following link?

/opt/homebrew/include/suitesparse -> /usr/local/include/suitesparse If it works, then I can publish another version with the fix.

— Reply to this email directly, view it on GitHub https://github.com/cpmech/russell/issues/122#issuecomment-2242342486, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQRDKRVEPRCYFYTA7WPZMTZNS4T7AVCNFSM6AAAAABLAANTH6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBSGM2DENBYGY. You are receiving this because you authored the thread.

cpmech commented 3 months ago

Hi, can you search for:

We need to crate a link for the libraries as well

JEMH commented 3 months ago

Hi, On my MacBook:

openblas include files at: /usr/local/opt/openblas/include openblas libraries at: /usr/local/opt/openblas/lib

lapack include files at: /usr/local/opt/lapack/include lapack libraries at: /usr/local/opt/lapack/lib

Regards, James

cpmech commented 3 months ago

So, can you please create the following links:

/opt/homebrew/opt/openblas/lib -> /usr/local/opt/openblas/lib
/opt/homebrew/opt/lapack/lib -> /usr/local/opt/lapack/lib

(for some reason, Homebrew install those things in different places, depending on the version...)

JEMH commented 3 months ago

Hi, it' now looking a lot better.

I created the links as you suggested: ln -s /usr/local/opt/openblas/lib /opt/homebrew/opt/openblas/lib ln -s /usr/local/opt/lapack/lib /opt/homebrew/opt/lapack/lib.

I rebuilt Russell and ran the Arenstorf example as previously. This ran to completion and generated the Arenstorf orbit plot which looks good.

Here is the console output:

Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.05s
 Running `/Users/admin/RustroverProjects/expt_russell/target/debug/expt_russell`

y_russell = [0.9943593998842639, 0.0007772233170978659, 0.11771274437464613, -1.937923583175161] y_mathematica = [0.9939999999999928, 2.4228439406717e-14, 3.6631563591513e-12, -2.0015851063802006] DoPri8: Dormand-Prince method (explicit, order 8(5,3), embedded) Number of function evaluations = 825 Number of performed steps = 59 Number of accepted steps = 44 Number of rejected steps = 15 Last accepted/suggested stepsize = 0.005231119923792644 Max time spent on a step = 34.658µs Total time = 4.756575ms

There are some differences between the y_russell and y_mathematica states but I guess that this is due to the tolerances used in the example.

What's the best way to set new absolute and relative tolerances when solving ODE's?

Thank you for taking the time to answer my questions. Regards, James

cpmech commented 3 months ago

Excellent! I'll publish another version later with the fix so that those symbolic links will no longer be necessary.

The difference between Russell and Mathematica happens because Russell is approximate and Mathematica is much more accurate.

As for the tolerances, this is the function to set them: https://docs.rs/russell_ode/latest/russell_ode/struct.Params.html#method.set_tolerances

And here is an example of how to use the function: https://github.com/cpmech/russell/blob/1a149ba48a23f664d4bee869d263acb6f1999a14/russell_ode/examples/pde_1d_heat_spectral_collocation.rs#L87

Let's keep this issue open for now so I can remember to fix the links problem.

JEMH commented 3 months ago

Thank you for the info. By using stricter values for the relative and absolute tolerances, the differences between the Russel solution and the Mathematica solution all but disappear.

cpmech commented 3 months ago

Excellent!

I've published a new version that does not require those symbolic links in your system. You may delete the links.

The easiest way to use the updated code in your machine is to add the specific version such as

[dependencies]
russell_lab = "1.6.2"
russell_sparse = "1.6.2"
russell_ode = "1.6.2"
russell_stat = "1.6.2"
russell_tensor = "1.6.2"

Later, you may revert back to *""**.

However, if you only need russell_ode, you just need a single line:

russell_ode = "*"

I appreciate if you could try the new version (after deleting the links I've suggested).

Thank you.

JEMH commented 3 months ago

Hi Dorival,

Good news.

I removed the soft links from my machine and updated the dependencies in the Cargo.toml file as you suggested. I could then build Russel without any problems and run the example problem successfully.

Thanks for your help.

Am 24.07.2024 um 01:18 schrieb Dorival Pedroso @.***>:

Excellent!

I've published a new version that does not require those symbolic links in your system. You may delete the links.

The easiest way to use the updated code in your machine is to add the specific version such as

[dependencies] russell_lab = "1.6.2" russell_sparse = "1.6.2" russell_ode = "1.6.2" russell_stat = "1.6.2" russell_tensor = "1.6.2" Later, you may revert back to "*".

However, if you only need russell_ode, you just need a single line:

russell_ode = "*" I appreciate if you could try the new version (after deleting the links I've suggested).

Thank you.

— Reply to this email directly, view it on GitHub https://github.com/cpmech/russell/issues/122#issuecomment-2246461449, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQRDKVEYMLSPEJMBOHGT6TZN3QEXAVCNFSM6AAAAABLAANTH6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBWGQ3DCNBUHE. You are receiving this because you authored the thread.