CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   How to "reconstructPar" with multiple cores? (https://www.cfd-online.com/Forums/openfoam-post-processing/118742-how-reconstructpar-multiple-cores.html)

ripperjack June 3, 2013 12:17

How to "reconstructPar" with multiple cores?
 
Hi all,

I performed DNS simulation on a cluster with about 100 cores. I found that to reconstructPar is very time-consuming. Is there any way I can do the "reconstructPar" in parallel and make it faster? Many thanks!

Regards,

Ping

cutter June 4, 2013 03:14

See http://www.cfd-online.com/Forums/ope...structpar.html.

Alternatively you may use something like this (using the GNU version of the parallel command!):
Code:

ls -1 processor0 -I constant -I 0 | sort -g | parallel -k -j 4 reconstructPar -time {} | grep "^Time ="

kwardle June 5, 2013 13:15

Keep in mind that you can also just read and process the data in its distribute form and save the time and disk space. Just use the -builtin flag for paraFoam to use ParaViews built-in parallel reader. Alternatively, you can just make the link extension for controlDict be controlDict.foam instead of controlDict.OpenFOAM---this will also just use the built-in reader in ParaView which is distributed-aware. I originally wrote a script to do just what you ask (the link to the thread was given by cutter), but I don't both reconstructing at all anymore.
-Kent

ripperjack June 5, 2013 14:06

Hi Kent,

Thanks very much for your reply! I can do post-processing using "paraFoam -builtin" now.

I have another question. I used "postChannel" utility to plot averaged x-y line in a channnel. Is it possible to do it similarly, like "postChannel -builtin"? I have tried this and failed, but is there any other flag I can add to do "postChannel" without "reconstructPar"?

Thanks in advance.

Regards,
Ping

Quote:

Originally Posted by kwardle (Post 432263)
Keep in mind that you can also just read and process the data in its distribute form and save the time and disk space. Just use the -builtin flag for paraFoam to use ParaViews built-in parallel reader. Alternatively, you can just make the link extension for controlDict be controlDict.foam instead of controlDict.OpenFOAM---this will also just use the built-in reader in ParaView which is distributed-aware. I originally wrote a script to do just what you ask (the link to the thread was given by cutter), but I don't both reconstructing at all anymore.
-Kent


kwardle June 5, 2013 16:29

Well postChannel is just a OF application, but I see that `postChannel -help` does not list -parallel as an option as confirmed in an old thread: http://www.cfd-online.com/Forums/ope...stchannel.html Having never used this particular utility myself, I may be wrong, but couldn't you do something similar by using "sample" or functionObjects to do on-the-fly processing?
Incidentally, the -builtin flag is certainly only relevant for the paraFoam utility.

alientxtmsgs February 7, 2014 14:36

Hello everyone,

I've been running a simulation with decreasing mesh sizes to quantify the effect on the results. I'm just now learning about "paraFoam -builtin" as I wasn't aware you could view the results without reconstructPar (been using this ever since I started the tutorials).

However, when I use paraFoam -builtin I can't seem to scroll through the time steps. I've tried both acsii and binary result formats and I have also tried switching the "case type" option from reconstructed case (default) to decomposed case in paraview before you hit apply.

When I switch it to decomposed case and hit apply I get an error:

ERROR: In /home/opencfd/OpenFOAM/ParaView-3.12.0/VTK/IO/vtkOpenFOAMReader.cxx, line 8488
vtkOpenFOAMReader (0x3f98ee0): Can't open /home/steven/OpenFOAM/steven-2.2.2/run/alFaesly/meshSize/10x10x10/processor0/constant/

ERROR: In /home/opencfd/OpenFOAM/ParaView-3.12.0/VTK/Filtering/vtkExecutive.cxx, line 756
vtkPVCompositeDataPipeline (0x3e57c30): Algorithm vtkPOpenFOAMReader(0x3e47300) returned failure for request: vtkInformation (0x3e5a750)
Debug: Off
Modified Time: 70970
Reference Count: 1
Registered Events: (none)
Request: REQUEST_INFORMATION
FORWARD_DIRECTION: 0
ALGORITHM_AFTER_FORWARD: 1

It would be nice if I could get this working because reconstructPar is beginning to take excessively long for my higher grid resolution cases.

Would appreciate any input!


Steven

alientxtmsgs February 7, 2014 15:12

I realized there is no constant directory inside my processor0 to processor 3 directories. I find it strange that it looks inside those folders despite not being the default path. Is there supposed to be a constant directory there?? I'm just glad I don't need to reconstructPar anymore :)

kwardle February 7, 2014 15:13

Steven,
I assume you are running the ParaView installation from the OF and starting with paraFoam -builtin? Have you instead tried to install a current version of ParaView from paraview.org and open you case directly? paraFoam is nothing but a wrapper script which calls paraview. All you need is a softlink to your controlDict that has the extension .foam as in "controlDict.foam". Paraview will open this without a problem. I have not ever seen the error you mention and have always been able to see all timesteps.
-Kent

kwardle February 7, 2014 15:19

Yes, there should be a constant directory in each of the processor directories. This stores the mesh info and connectivity for that processor. Can't imagine why you wouldn't have it there. Which version of OpenFOAM are you using?

alientxtmsgs February 7, 2014 15:54

Hi Kent,

I have installed paraview via the standard method outlined in Ubuntu installation instructions and am using the latest version OpenFOAM 2.2.2.

I can now see all my time steps without a problem after copying my constant directory into my processor directories (0 to 3). I am not sure why it isn't in there by default, but I haven't ran into problems... my simulations run just fine. I do however run createBaffles utility to create an internal boundary which writes a new time directory (0.001) with my new mesh. I then rename this to 0 and change the old 0 into 0.org which is no longer useful to me, other than storing my blockMeshDict and output from running the blockMesh utility. I then decomposePar and begin running my simulations.

I'm unaware of this softlink to controlDict you speak of. My original controlDict is in my system directory by default but I have never changed the extension for it before viewing results!

Steven

alientxtmsgs February 7, 2014 16:01

I think it may in fact have to do with the generation of my new mesh after running createBaffles. When I look into my processor0 to processor3 directories my mesh is stored in the 0/polyMesh directory rather than a constant directory. Anyway, I don't seem to be having any issues.

Steven


All times are GMT -4. The time now is 22:32.