|
[Sponsors] |
Best practice for smooth restart in parallel run of OpenFOAM |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 1, 2020, 16:53 |
Best practice for smooth restart in parallel run of OpenFOAM
|
#1 |
New Member
Maziar
Join Date: Jul 2019
Posts: 15
Rep Power: 7 |
Hello,
I am performing a simulation with the pimpleFoam solver using OpenFOAM v1912. The calculation is running on several processors. I am wondering what is the best practice for a smooth restart. In system/controlDict I am writing out data in binary format, and the variable startFrom is set to “latestTime”. My main question is whether it makes a difference if I: 1) reconstruct the data from all "processor" subfolders using reconstructPar, delete the aforementioned data subfolders and then rerun the decomposePar, renumberMesh followed by pimpleFoam. This approach is recommended in this post OR, 2) leave the data decomposed in the separate processor subfolders and imply invoke pimpleFoam. Option #2 seems like less work to me. Thank you for your thoughts. |
|
May 1, 2020, 18:57 |
|
#2 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
Could you explain further what `smooth` restart is?
Otherwise, the second option will be enough to restart whatever computation you have.
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
May 1, 2020, 20:10 |
|
#3 |
New Member
Maziar
Join Date: Jul 2019
Posts: 15
Rep Power: 7 |
Thank you HPE for your (hopefully "herpes free") response.
"Smooth" to me means minimizing the extent of initial transient blips in the solution achieved thus far. |
|
May 2, 2020, 04:59 |
|
#4 |
Member
Thomas Sprich
Join Date: Mar 2015
Posts: 76
Rep Power: 11 |
Hi,
I agree with HPE and would resume from the previously decomposed state just because it is less work. I haven't verified this, but I don't think that it should make any difference if you resume from a decomposed state or decompose a time step and then resume. The decomposed result and the reconstructed result both contain the same information, it should not make any difference to how the solution proceeds. Are you seeing strange results when you resume a solution? Can you plot the residuals? Regards, Thomas |
|
May 2, 2020, 13:28 |
|
#5 |
New Member
Maziar
Join Date: Jul 2019
Posts: 15
Rep Power: 7 |
Hello,
Thank you for your response. I haven't compared the two options. My primary intention was to get feedback on what experienced users felt was 'best practice'. Cheers. |
|
May 2, 2020, 17:20 |
|
#6 |
Senior Member
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 137
Rep Power: 7 |
Hi all,
this is not strictly an answer to the original question, but might sitlll be useful. I've experienced fatal errors after restarting interrupted decomposed cases solved by interFoam. I don't remember the exact error message right now. To correct the problem, I deleted all field files other than those located in "0" from each processor folder, e.g. alphaPhi0.water, phi. After that, interFoam restarted the solution at the latest time without complaints. After restarting the solution, the residuals are not the same as prior to the interuption, but seem to recover after a few time steps. |
|
May 2, 2020, 19:11 |
|
#7 |
New Member
Maziar
Join Date: Jul 2019
Posts: 15
Rep Power: 7 |
Hi Claudio,
How was the job interrupted? I try to use the stopAtWriteNowSignal variable to ensure the time step completes before stopping, as per the description here: https://openfoam.org/release/2-1-0/r...-write-timing/ Being a bit of a beginner to OpenFOAM, I am somewhat puzzled by the approach or workaround you employed. If you "deleted all field files other than those located in "0" from each processor folder", what solution are you left with to restart from? Did you reconstruct the data before deleting? |
|
May 3, 2020, 13:21 |
|
#8 |
Senior Member
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 137
Rep Power: 7 |
Hello Maziar,
I believe in those instances I aborted the calculations manually for some reason. I admit that's probably not the best way to do it. Maybe I should make sure that interFoam ends naturally, like setting endTime to the next ordinary write and let it write all the files properly, like you suggest. Thanks. By deleting those field files I did, interFoam will restart and continue the solution based on the same files which are initially contained in the 0 directory, i.e. U, p_rgh, alpha.water and any turbulence model fields, but with the values of the solution so far. I'm sure it's not the best way to do it, but given the fatal error I got, it was the only way I found to continue solution without having to waste hours and start over again. It's just a solution to a unique problem you're unlikely to encounter. I apologize if this was off-topic and caused confusion. Nevermind. Cheers |
|
November 17, 2022, 11:58 |
|
#9 |
New Member
Nilotpal Dhar
Join Date: Nov 2022
Location: United Kingdom
Posts: 4
Rep Power: 4 |
I was asked to do the same with the latest time step of the simulation which I think I have been able to do (fingers crossed), being a new OpenFOAM user it was hard for me to figure that out.
|
|
August 9, 2023, 12:19 |
Possible solution
|
#10 |
New Member
Carl Kohrs
Join Date: Sep 2019
Posts: 22
Rep Power: 7 |
When I tried to restart buoyantReactingFoam I got errors that the processor#/0/p etc. are missing. So the following commands works for successful restart of a buoyantReactingFoam cases:
decomposePar -latestTime -time 0 -force mpirun -np 7 buoyantReactingFoam -parallel reconstructPar Change 7 and possibly the solver to suit your case. I also add the following to clean up the processor folders. rm -rf processor* |
|
Tags |
best practice, openfoam 1912, restart |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error running openfoam in parallel | fede32 | OpenFOAM Programming & Development | 5 | October 4, 2018 17:38 |
[OpenFOAM] Questions about Paraview to show Parallel run of OpenFOAM | padian | ParaView | 20 | September 24, 2018 13:52 |
Problem in parallel run with OpenFOAM | Gitesh P | OpenFOAM Running, Solving & CFD | 2 | June 1, 2014 07:05 |
parallel Grief: BoundaryFields ok in single CPU but NOT in Parallel | JR22 | OpenFOAM Running, Solving & CFD | 2 | April 19, 2013 17:49 |
Parallel run of OpenFOAM in linux and windows side by side | m2montazari | OpenFOAM Running, Solving & CFD | 5 | June 24, 2011 04:26 |