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

SparseMatrix BoundsError in change_matrix function in src/dynamics.jl #14

Open
TheHelenofTroy opened this issue May 16, 2020 · 4 comments

Comments

@TheHelenofTroy
Copy link

On this line of src/dynamics.jl, Julia reports a BoundsError on SparseMatrix. Seems like the function is trying to access elements out of the defined matrix index range and the loop is not checking for such index bound limits.

See below for error message and stacktrace, when this error occurred while running test/run_KenyaCoV_agestructuredmodel.jl.

ERROR: LoadError: BoundsError: attempt to access 4080×2720 SparseArrays.SparseMatrixCSC{Int64,Int64} at index [6393, 1599]
Stacktrace:
[1] setindex!(::SparseArrays.SparseMatrixCSC{Int64,Int64}, ::Int64, ::Int64, ::Int64) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/SparseArrays/src/sparsematrix.jl:2347
[2] change_matrix(::SparseArrays.SparseMatrixCSC{Int64,Int64}) at /home/KenyaCoV/src/dynamics.jl:167
[3] model_ingredients_from_data(::String, ::String, ::String) at /home/KenyaCoV/src/transmissionmodel.jl:118
[4] top-level scope at none:0

@SamuelBrand1
Copy link
Owner

SamuelBrand1 commented May 16, 2020 via email

@TheHelenofTroy
Copy link
Author

Great to know. Thanks for the headsup! Really appreciate the hardwork you put in. Looking forward to the new model coming out! Is this code base going to be updated frequently as you are building the new model, or shall we expect major pushes every once in a while? Again, thanks for the awesome work!

@SamuelBrand1
Copy link
Owner

SamuelBrand1 commented May 16, 2020 via email

@TheHelenofTroy
Copy link
Author

TheHelenofTroy commented May 18, 2020

Hi Sam,

Thanks for sharing the plan going forward and giving us some glimpse into the details. The improvement of modularity and reproducibility will be greatly beneficial to the community for sure. Really appreciate the work your team has done, and looking forward to seeing the future evolution of it.

Best regards,
THoT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants