|
[Sponsors] |
reconstructPar/reconstructParMesh in parallel |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 3, 2017, 23:16 |
reconstructPar/reconstructParMesh in parallel
|
#1 |
Member
Dominic
Join Date: Jan 2017
Posts: 41
Rep Power: 9 |
Dear Foamers,
Would anyone know if it is possible to do reconstruction in parallel in OF 2.4.0? Currently, I need to reconstruct a huge case after running snappyHexMesh in 264 processors. When I do reconstructParMesh, about 40GB RAM is needed, and 15GB of them is swapped. So, the reconstruction take really long time. Any suggestion to reconstruct such huge case? Thank you! Any comments are appreciated! |
|
August 3, 2017, 23:41 |
|
#2 |
Senior Member
Join Date: Aug 2013
Posts: 407
Rep Power: 16 |
Hi,
Is there a reason you want to do the reconstruction? If it is to visualize results, you can do the same in parallel. AFAIK, reconstruct (ParMesh or Par) is a serial process, and I don't think it can be done in parallel. Cheers, Antimony |
|
August 4, 2017, 02:59 |
|
#3 |
Member
Dominic
Join Date: Jan 2017
Posts: 41
Rep Power: 9 |
Thanks for you quick reply.
Since I'm still new to OF. I used to reconstructPar after runing simulation and then use the "foamToVTK" command to convert the format to *.VTK, and download the VTK file to my desktop from the server (Since paraView cannot be used on the server, I have to download the result to my desktop). So could you share some more details on visualizing the result without reconstructPar/reconstructParMesh ? Thank you very much! Dominic |
|
August 4, 2017, 05:17 |
|
#4 |
Senior Member
Join Date: Aug 2013
Posts: 407
Rep Power: 16 |
Hi,
In your case folder, if you have a .foam file (just an empty file with the extension .foam), you can use that to open your case in Paraview. Simply choose the case type as Decomposed instead of Reconstructed and you can visualize a case that was run in parallel without having to reconstruct it. Hope this helps. Cheers, Antimony |
|
August 6, 2017, 22:18 |
|
#5 |
Member
Dominic
Join Date: Jan 2017
Posts: 41
Rep Power: 9 |
HI,
Is it just creating the empty *.foam file by myself?? Where can I choose the case type "Decomposed" ?? Thank you very much! Dominic |
|
August 6, 2017, 22:59 |
|
#6 |
Senior Member
Join Date: Aug 2013
Posts: 407
Rep Power: 16 |
Hi,
Yes. In your case folder create an empty/dummy file called (for example) case.foam In Linux, you could do this by typing "touch case.foam" in the terminal When you load the case.foam into Paraview, and scroll down under "Properties" you should find one that says "Case Type" Cheers, Antimony |
|
August 6, 2017, 23:20 |
|
#7 |
Member
Dominic
Join Date: Jan 2017
Posts: 41
Rep Power: 9 |
Thanks! Really appreciate your help!
|
|
August 7, 2017, 07:28 |
|
#8 |
New Member
Join Date: Dec 2016
Posts: 9
Rep Power: 10 |
Hi Dominic,
for this purpose I would use the attached code. Just save it in your case and remove .txt before using. For more information, please visit the following link: bash script for pseudo-parallel usage of reconstructPar Regards, Armin |
|
August 7, 2017, 22:24 |
|
#9 |
Member
Dominic
Join Date: Jan 2017
Posts: 41
Rep Power: 9 |
Hi Antimony,
I just find out that if i don't reconstructParMesh after running snappyHexMesh, there will be an error message telling me that boundary conditions of some patch fields cannot be found in processor*/0/ directory when I start to run the solver. And I noticed that all the missing patch fields are those from the surface generated by snappyHexMesh. In the past, I reconstructParMesh and decomposePar again before running the solver, everything work well. So, any ideas how to solve it? Many thanks! |
|
August 7, 2017, 22:31 |
|
#10 |
Member
Dominic
Join Date: Jan 2017
Posts: 41
Rep Power: 9 |
Hi Armin,
Thank you for your kindly help. But the script seems to be useful when I have many time directories. Now I only have a few directories, but lot of processors directories. Reconstruction takes so much memory. |
|
August 8, 2017, 00:42 |
|
#11 |
Senior Member
Join Date: Aug 2013
Posts: 407
Rep Power: 16 |
Hi,
So whenever I do snappy in parallel, the first thing I do is to rename the 0 folder to 0.org. In the 0.org, I make sure that I have the names of all the patches I know for certain will be present in the final mesh (including the processor ones - remember that wildcards are allowed, so you could simply put in "proc*.*" and OF will take care of it for you). Once snappy is done in parallel, I rename 0.org to 0 and copy it into the processor directories (in terminal, it is just a single line) and start my simulations. Hope this helps. Cheers, Antimony |
|
August 8, 2017, 18:38 |
|
#12 |
New Member
Join Date: Dec 2016
Posts: 9
Rep Power: 10 |
Hi Dominic,
firstly about the script: It's very useful and fast for the cases like yours with over 200 processors. What you should mind is, that it's not for the reconstructParMesh, but for the reconstructPar (your future work after running a solver). Since your thread title is "reconstructPar/reconstructParMesh in parallel" I would recommend to use this script for the first part of your title (reconstructPar). With it you can save a lot of time in future! And secondly about the meshing phase, where you are now: I would like to know, if you use the writeCompression option in the controlDict. If you switch it to "on", you could reduce your data volume to half and therefore do the reconstructParMesh faster. Regards, Armin |
|
August 9, 2017, 06:30 |
|
#13 |
Member
Dominic
Join Date: Jan 2017
Posts: 41
Rep Power: 9 |
Hi Armin,
Really?! I am so glad to hear that! But when I tried to run the script, I got the following error message, hope you could shed some light on this. Thanks. Code:
running reconstructPar in pseudo-parallel mode on 6 processors reconstructing 1 time directories making temp dir Starting Job 1 - reconstructing time = 68 through 0 Job started with PID 9345 --> FOAM FATAL ERROR: No times selected From function reconstructPar in file reconstructPar.C at line 210. FOAM exiting 1 directories remaining... finished Many thanks. |
|
August 9, 2017, 06:31 |
|
#14 |
Member
Dominic
Join Date: Jan 2017
Posts: 41
Rep Power: 9 |
Hi Antimony,
Thank you for your guidance. The problem was solved. Dominic |
|
August 9, 2017, 19:59 |
|
#15 |
New Member
Join Date: Dec 2016
Posts: 9
Rep Power: 10 |
Hi Dominic,
you're welcome. Could you please write your command in the terminal, which led to this error? Regards, Armin |
|
August 9, 2017, 22:13 |
|
#16 |
Member
Dominic
Join Date: Jan 2017
Posts: 41
Rep Power: 9 |
Hi Armin,
I typed "sh parReconstructPar.sh -n 6" to try to run the script. |
|
August 10, 2017, 11:30 |
|
#17 |
New Member
Join Date: Dec 2016
Posts: 9
Rep Power: 10 |
Hi Dominic,
Please type the following command and inform me about the result: Code:
./parReconstructPar.sh -n 6 Armin |
|
August 10, 2017, 22:16 |
|
#18 |
Member
Dominic
Join Date: Jan 2017
Posts: 41
Rep Power: 9 |
Hi Armin,
This gives me permission error. I used to run script using "sh" instead of "./", though I don't know why this works. Thanks. Dominic |
|
August 11, 2017, 07:07 |
|
#19 |
New Member
Join Date: Dec 2016
Posts: 9
Rep Power: 10 |
Hi Dominic,
okay. Then please give this first: Code:
chmod +x parReconstructPar.sh Code:
./parReconstructPar.sh -n 6 Regards, Armin |
|
August 15, 2017, 03:40 |
|
#20 |
Member
Dominic
Join Date: Jan 2017
Posts: 41
Rep Power: 9 |
Hi Armin,
Thank you very much! It works! On the other hand, do you have any experience running this script on LSF platform? Because I will need to do so in the future. Many Thanks. Dominic |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' | muth | OpenFOAM Running, Solving & CFD | 3 | August 27, 2018 05:18 |
Explicitly filtered LES | saeedi | Main CFD Forum | 16 | October 14, 2015 12:58 |
simpleFoam parallel | AndrewMortimer | OpenFOAM Running, Solving & CFD | 12 | August 7, 2015 19:45 |
simpleFoam in parallel issue | plucas | OpenFOAM Running, Solving & CFD | 3 | July 17, 2013 12:30 |
parallel Grief: BoundaryFields ok in single CPU but NOT in Parallel | JR22 | OpenFOAM Running, Solving & CFD | 2 | April 19, 2013 17:49 |