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

updating to most recent musica version #298

Merged
merged 3 commits into from
Jan 6, 2025
Merged

updating to most recent musica version #298

merged 3 commits into from
Jan 6, 2025

Conversation

K20shores
Copy link
Collaborator

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Dec 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.04%. Comparing base (ca54b94) to head (d4cc51a).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #298   +/-   ##
=======================================
  Coverage   82.04%   82.04%           
=======================================
  Files          13       13           
  Lines         891      891           
=======================================
  Hits          731      731           
  Misses        160      160           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

boulderdaze
boulderdaze previously approved these changes Dec 20, 2024
@@ -229,7 +228,7 @@ def loadJson(self, path_to_json):
camp_path = os.path.join(os.path.dirname(path_to_json), self.config_file)

# Initalize the musica solver
self.solver = musica.create_solver(camp_path, musica.micmsolver.rosenbrock, 1)
self.solver = musica.create_solver(camp_path, musica.micmsolver.rosenbrock_standard_order, 1)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just curious, why has the solver type changed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The vector ordered solver has a default vector lenght of 4. It is the callers responsibility to appropriately size the input array to match what musica expects to write the results to. In this case, musica blindly copies the output values

https://github.com/NCAR/musica/blob/1debffba28d0601cbd646e475cd6751d06e5a8b3/src/micm/micm.cpp#L464-L465

So, if we have only 1 grid cell and 2 species, micm would internally hold a state array of length 8 (species 1 cell 1, specie 1 cell 2, specie 1 cell 3, species 1, cell 4, species 2 cell 1, species 2 cell 2, species 3 cell 3, species 4 cell 4). Thus, music box would need to correctly calculate the size of this array.

It's easiest to use the standard ordered solver because we don't have to care about those empty cells

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, thank you for the detailed explanation!

@K20shores K20shores merged commit 8db4180 into main Jan 6, 2025
4 checks passed
@K20shores K20shores deleted the version_updates branch January 6, 2025 14:45
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

Successfully merging this pull request may close these issues.

4 participants