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

Proposal for multi-threading the hydraulic and quality solvers #307

Closed
michaeltryby opened this issue Oct 18, 2018 · 5 comments
Closed

Proposal for multi-threading the hydraulic and quality solvers #307

michaeltryby opened this issue Oct 18, 2018 · 5 comments

Comments

@michaeltryby
Copy link

michaeltryby commented Oct 18, 2018

Please feel free to offer constructive comment.
task-description.txt

@samhatchett
Copy link
Member

this is an ambitious task! very nicely thought-out document so thanks @michaeltryby for that.

a few random thoughts:

This seems like a good opportunity to consider breaking apart the hydraulics and water quality components into different compilable units. You could envision a simulation manager task that can execute a hydraulic step using hyd.dll, get the results into a buffer, and then hand-off to the qual.dll api asynchronously. Both would depend on some common framework for representing network topology and state.

This paradigm extends well to writing of results. Why wait for the disk I/O round-trip before executing the next analysis step? Spin-off the results persistence into its own compilation unit results.dll and interleave that task similarly.

I'm sure this topic will generate lots of great comments, and I'm looking forward to the discussion!

@LRossman
Copy link
Collaborator

Interesting idea @michaeltryby . If one assumes for a best case scenario that a hydraulics solution in a time period is always obtained faster than the water quality updating over the time period then you're essentially cutting the overall run time by the total time spent on solving hydraulics (minus any threading overhead). It seems like one could profile the current EPANET implementation to compare the time spent in EN_runH (or runhyd) versus EN_nextQ (or nextqual) for several different networks of varying size and type of quality analysis (water age would be a best case choice) to see just how much potential time saving is possible.

@milad-ghiami
Copy link

I think if there are not look at two separate sections , there will still be some solutions
Why not parallelize the cycles inside the hydraulic solution and quality and using MPI or OpenMPI

@milad-ghiami
Copy link

@michaeltryby i think if we use parallel programming to solve sparse matrix in hydraulic and quality solver , it can save time.

@afcarvalho1991
Copy link

Might be of relevance for other: "Quest for a New Solver for EPANET 2"
https://ascelibrary.org/doi/full/10.1061/(ASCE)WR.1943-5452.0000596

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

5 participants