-
Notifications
You must be signed in to change notification settings - Fork 239
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
[CL] New Phreeqc Interface #2640
Conversation
Is this replacing the existing OGS-6--PhreeqcInterface, or will there be an option to choose the interface type? |
The latter. Switching the tag |
6bb7bb3
to
3711fe4
Compare
Maybe interesting to know/mention how many cores were used for the mentioned simulations. |
Parallelization not touched in this PR. Just single core. @montoyav |
7633f87
to
36fb54b
Compare
9ab8d28
to
8667d33
Compare
Signed-off-by: renchao_lu <renchao.lu@gmail.com>
Signed-off-by: renchao_lu <renchao.lu@gmail.com>
553c22f
to
2d9d4c0
Compare
OpenGeoSys development has been moved to GitLab. |
Current chemical solver interface between OGS-6 and Phreeqc works in a conventional way (via file-based approach). That is, in each time step, Phreeqc input file is prepared for speciation calculation and phreeqc output file is then parsed for result updates. This approach is not computationally efficient.
New Phreeqc Interface by direct memory access
Thanks to Dima's instruction and Wenqing's help, we hereby provide an alternative interface by direct memory access. This approach allows us not to process Phreeqc input and output files any more. This feature greatly cuts down computation costs. In the small-scale kinetic reactant benchmark added in this pull request (containing 201 nodes), computation time by Phreeqc reduces from ~0.05 seconds to ~0.03 seconds (in average) in each time step. We gain 60% speed-up. In another intermediate-scale test (not included in this pull request, download by IntermediateScaleKineticReactantBenchmark.zip containing 24461 nodes, with the same chemical configuration as in the small-scale test), Phreeqc runtime decreases from ~40 seconds to ~2 seconds. We acquire 20x speed-up. Speed-up effect becomes more and more significant with the increase of number of nodes (also referred as number of chemical system).
In addition, using this alternative interface prevents from precision lost in truncation.
Limitation
By far this new interface only supports for kinetic reaction process (equilibrium reaction process is not open yet).