CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

How to "reconstructPar" with multiple cores?

Register Blogs Community New Posts Updated Threads Search

Like Tree12Likes
  • 4 Post By cutter
  • 7 Post By kwardle
  • 1 Post By ripperjack

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 3, 2013, 12:17
Default How to "reconstructPar" with multiple cores?
  #1
Member
 
Jack
Join Date: Dec 2011
Posts: 94
Rep Power: 14
ripperjack is on a distinguished road
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
ripperjack is offline   Reply With Quote

Old   June 4, 2013, 03:14
Default
  #2
Senior Member
 
Join Date: Mar 2010
Location: Germany
Posts: 154
Rep Power: 16
cutter is on a distinguished road
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 ="
cutter is offline   Reply With Quote

Old   June 5, 2013, 13:15
Default
  #3
Senior Member
 
Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 219
Rep Power: 21
kwardle is on a distinguished road
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 is offline   Reply With Quote

Old   June 5, 2013, 14:06
Default
  #4
Member
 
Jack
Join Date: Dec 2011
Posts: 94
Rep Power: 14
ripperjack is on a distinguished road
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 View Post
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
yeyinglcn likes this.
ripperjack is offline   Reply With Quote

Old   June 5, 2013, 16:29
Default
  #5
Senior Member
 
Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 219
Rep Power: 21
kwardle is on a distinguished road
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.
kwardle is offline   Reply With Quote

Old   February 7, 2014, 14:36
Default
  #6
New Member
 
Steven
Join Date: Jan 2014
Posts: 14
Rep Power: 12
alientxtmsgs is on a distinguished road
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 is offline   Reply With Quote

Old   February 7, 2014, 15:12
Default
  #7
New Member
 
Steven
Join Date: Jan 2014
Posts: 14
Rep Power: 12
alientxtmsgs is on a distinguished road
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
alientxtmsgs is offline   Reply With Quote

Old   February 7, 2014, 15:13
Default
  #8
Senior Member
 
Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 219
Rep Power: 21
kwardle is on a distinguished road
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 is offline   Reply With Quote

Old   February 7, 2014, 15:19
Default
  #9
Senior Member
 
Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 219
Rep Power: 21
kwardle is on a distinguished road
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?
kwardle is offline   Reply With Quote

Old   February 7, 2014, 15:54
Default
  #10
New Member
 
Steven
Join Date: Jan 2014
Posts: 14
Rep Power: 12
alientxtmsgs is on a distinguished road
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 is offline   Reply With Quote

Old   February 7, 2014, 16:01
Default
  #11
New Member
 
Steven
Join Date: Jan 2014
Posts: 14
Rep Power: 12
alientxtmsgs is on a distinguished road
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
alientxtmsgs is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 06:09
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 05:36
enGrid on multiple cores large_eddy enGrid 2 March 19, 2013 05:08
Using multiple cores tsmith10 STAR-CCM+ 4 October 8, 2012 15:01
OpenFOAM static build on Cray XT5 asaijo OpenFOAM Installation 9 April 6, 2011 12:21


All times are GMT -4. The time now is 23:15.