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

Feature/mct optim fix #173

Open
wants to merge 2 commits into
base: feature/mct_optim
Choose a base branch
from

Conversation

corentincarton
Copy link
Collaborator

No description provided.

@doc78
Copy link
Collaborator

doc78 commented Oct 18, 2024

I checked the dis.tss results of the branch master and the current branch using cold.xml. Results after the commit "split and optimization of the new solve1pixel function " are bit identical. Results after "minor optimisations" are slightly different but I think they are still OK:

29.2018 -> 29.2017
25.7968 -> 25.7967
58.7482 -> 58.7476
51.9246 -> 51.9239
...

@ecCinziaMazzetti
Copy link
Contributor

Is 'minor optimisations' strictly necessary? I would very much prefer having bit identical results.

@corentincarton
Copy link
Collaborator Author

I think we can maybe do something in between that allows bit reproducibility. I think moving around some parts of the code (counts, upstream inflow, etc.) helped but maybe not the removal of closureError and the change in the while loop, which is what impacts may the bit reproducibility.

num_upstream_pixels, a_dx_div_dt[pix], b_a_dx_div_dt[pix], beta, inv_beta, b_minus_1):
solve1PixelAvg(pix, discharge_avg, discharge_before, discharge[pix], lateral_inflow[pix], upstream_lookup,\
num_upstream_pixels, inv_time_delta, beta, a_dx[pix])

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please @ecCinziaMazzetti and @StefaniaGrimaldi just check the changes here, as I think we were using the whole arrays previously in the computation, while only the "pix" element of the a_dx, constant, lateral_inflow, a_dx_div_dt and b_a_dx_div_dt arrays were needed in the solve1pixel functions, but I can be wrong.

discharge[pix] = 0
return
return False
Copy link
Collaborator

Choose a reason for hiding this comment

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

@ecCinziaMazzetti @StefaniaGrimaldi Here we skip the computation of the discharge_avg value, but discharge[pix] is changed, as we set it to zero. Is that correct? Should we still need to compute channel_volume_start and channel_volume_end for dischage_avg as the quantity of discharge[pix] has changed?

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.

3 participants