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

Bacterial_branching example #4

Open
Armavica opened this issue Jan 28, 2025 · 2 comments
Open

Bacterial_branching example #4

Armavica opened this issue Jan 28, 2025 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request publication Relevant for publication

Comments

@Armavica
Copy link
Contributor

Armavica commented Jan 28, 2025

Hi, as part of the review that I am doing for JOSS (openjournals/joss-reviews#7723), I am trying to run the examples shared in the article.

I first went to cellular_raza-examples/bacterial_branching and ran cargo run --release. Then, I ran python src/plotting.py.
The video generated is the following, which does not look like Figure 3 of the article.

movie.mp4

I then tried to use the files listed on this page of the website. I used the following Cargo.toml file (copied from bacterial_branching example with just the name changed):

[package]
name = "cr_bacteria_branching"
version = "0.1.0"
edition = "2021"
authors = ["Jonas Pleyer <[email protected]>"]

[dependencies]
serde = { workspace = true, features=["rc"] }
rand = { workspace = true, features=["small_rng"] }
rand_chacha = { workspace = true }
nalgebra = { version="0.33" }
num = { workspace = true }
cellular_raza = { path="../../cellular_raza", features=["default"] }
plotters = { workspace = true }
rayon = "1.10.0"
ndarray = { version = "0.16.0", features = ["blas", "serde", "serde-1"] }

But upon running cargo run --release, I am getting the following error:

❯ cargo run --release                                                                           (cellular_raza) 
   Compiling cr_bact_branching v0.1.0 (/home/virgile/src/cellular_raza/cellular_raza-examples/bact_branching)
error[E0432]: unresolved import `cellular_raza::prelude::cpu_os_threads`
 --> cellular_raza-examples/bact_branching/src/main.rs:3:29
  |
3 | use cellular_raza::prelude::cpu_os_threads::*;
  |                             ^^^^^^^^^^^^^^ could not find `cpu_os_threads` in `prelude`

For more information about this error, try `rustc --explain E0432`.
error: could not compile `cr_bact_branching` (bin "cr_bact_branching") due to 1 previous error

Is there something that I am doing wrong?

Edit: Ok, I figured it out: I had to enable the cpu_os_threads feature. I obtained the following final state:

Image

It looks a bit more like what is shown in the article. I saw that you state on this page that you lost the parameters that generated the illustration picture. While this might be fine for the documentation, I think that it ought to be possible to recreate the figures that you use in the article. Have you considered using for Figure 3 an illustration coming from a known set of parameters?

@jonaspleyer
Copy link
Owner

jonaspleyer commented Jan 29, 2025

Edit: Ok, I figured it out: I had to enable the cpu_os_threads feature. I obtained the following final state:

I will include the Cargo.toml file on the website as well. You are right that without this file, the example is not complete.

Have you considered using for Figure 3 an illustration coming from a known set of parameters?

I had considered that. One reason why I did not recreate the plot was that the total Runtime was very large. I will re-asses this issue and decide if to show a (possibly smaller) example with known parameters.

TODO

  • Add Cargo.toml file in website
  • Parameters and Reproducability of the Bacterial Branching Example

@jonaspleyer jonaspleyer added documentation Improvements or additions to documentation enhancement New feature or request labels Jan 29, 2025
@jonaspleyer jonaspleyer self-assigned this Jan 29, 2025
@jonaspleyer jonaspleyer added the publication Relevant for publication label Feb 19, 2025
@jonaspleyer
Copy link
Owner

For reference: I am actively working on this issue and will hopefully be able to resolve it in the coming week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request publication Relevant for publication
Projects
Development

No branches or pull requests

2 participants