-
Notifications
You must be signed in to change notification settings - Fork 122
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
DRSDTCON: behavior changes and poor performance in 2024_10 #5764
Comments
Between 2024.04 and 2024.10 we did large changes in how DRSDTCON is implemented. The new implementation improves the accuracy of the model. We are in the process of updating the manual accordingly. A paper, explaining the new method, "New sub-grid model for convective mixing in field-scale CO2 storage simulation" is accepted for publication in TiPM, but it may take some weeks before it gets available. The method should in theory not lead to performance penalty, so I would very much like to investigate this more. Is the case you shared a good candidate for testing performance? |
The new model sounds very interesting and I look forward to the paper. The simple model I attached was just an edited version of an existing OPM example, to illustrate the changes in behavior. It is too simple to illustrate the performance impact, but I'll see if I can construct or edit an example that shows it. I'll post it soon. |
Sorry, took a bit longer, but here is a simple case that shows the difference. The ZIP file contains 4 DATA files: 2 sets that are different only in the use of DRSDTCON or not. The names within a set are different simply to make it easier to track the PRT files between OPM versions. In 2024.04 there is no great impact of switching on DRSDTCON: the runtime increases by some 20%. But in 2024.10 the runtime increased by about 250% on my machine, mostly because the assembly time increased by a factor 20. (In another example it even increased by a factor 60. It seems to get worse with larger decks.) The assembly time then dominates total runtime, the solver does not really feel it. I hope this helps. he cases don't take long to run, but here are the summaries of the 2024.10 cases without DRSDTCON: Number of MPI processes: 4 And the 2024.10 case with DRSDTCON: Number of MPI processes: 4 |
I can confirm the general performance difference you report above exists with the latest master branches as well, in particular assembly time taking 11x as long in my case. Profiling points to BlackOilConvectiveMixingModule::addConvectiveMixingFlux() as being the bottleneck, and a few function calls deeper, the mutualSolubilitySpycherPruess2005_() function in Brine_CO2.hpp. I have not seen any obvious bugs or inefficiencies in that code, so it may simply be that the Spycher-Pruess 2005 model is very expensive, having lots of However, this model is not new to the 2024.10 release! @totto82 have some defaults changed to use this model whereas before it was not? |
I can also confirm that just activating DISGAS is not enough to make it a lot slower, it is the DRSDTCON option that makes the big difference. |
Another interesting observation is that higher temperature seems to degrade performance. The example contains a table with temperature versus depth. When I made this 100 degrees throughout, like this |
The main reason for the slowdown is that the new code is not optimized and therefore computes the phase partitioning many times per iteration. I already have code that address part of this issue, but I haven't prioritized to get it into the master branch yet. I did some testing today and it reduce the simulation time on the model your shared significantly. It will still be larger than before the release, but that is expected since the new model is more advanced. I will make a PR next week with the speedup. I can also add an option for running the 2024_04 version of the model for backward compatibility. |
Thanks for the investigation. For now a bit of patience is a price worth paying for a more advanced model, so we'll just let the computers work a bit longer, and wait for the next version to speed it up again. |
The convective dissolution keyword for CO2STORE seems to behave differently in OPM-Flow 2024.10, compared to 2024.04. In the simple example deck attached, less CO2 dissolves than in 2024.04. But in other decks the reverse is the case.
Switching on DRSDTCON also leads to quite a severe performance penalty in 2024.10, which did not happen in 2024.04, even when I ran it with the same solver settings as the new default in 2024.10. (Which, by the way, lead to a spectacular improvement in runtime in many models!)
I tried a few other tricks to restore the same behavior as in 2024.04, which used to work in previous issues, but to no avail:
These tricks resulted in the same change in behavior as a normal run.
Might this be related to issue OPM/opm-common#4099 , which addressed salinity? Or something else?
CO2STORE_DRSDTCON_2024_10.DATA.txt
The text was updated successfully, but these errors were encountered: