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

How to make utilities Parallel aware

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 11, 2007, 13:32
Default Hello everyone, A good day
  #1
Senior Member
 
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25
philippose will become famous soon enough
Hello everyone,

A good day :-)!

I was wondering.... How does one make a post-processing utility "parallel aware" ? As in... if I have a case which I ran in parallel, with say... 2 or more processors, how do I do post-processing on the data without having to do a "reconstructPar" on the case first?

I know, that for example, during a parallel simulation, if I need to perform a summation on a patch distributed across multiple processors, I can use the "gSum" command instead of the normal "sum" command... this works fine, and makes things really simple.

On the other hand, this does not seem to be working in the case of a post-processing utility... it does not realise that the case was run in parallel.

One lead I have, is the "calcMassFlow" utility available on the OpenFOAM wiki... here, the file "buildGlobalBoundaryList.H" seems to do exactly what I want.... but... it seems to be overly complicated for something which should be simple to achieve or??

Is there any simple way of detecting if a case was run in parallel, and extracting data across processors? Something like the "gSum" alternative to "sum" ??

Hoping something does exist :-)!

Have a nice weekend!

Philippose
philippose is offline   Reply With Quote

Old   August 12, 2007, 18:12
Default Hello again, Ok.... I have
  #2
Senior Member
 
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25
philippose will become famous soon enough
Hello again,

Ok.... I have finally come up with a utility that is "parallel aware" :-)! Basically, I used ideas from the "reconstructParMesh" utility, to look for and handle multiple processor directories, without actually reconstructing the distributed mesh and data into one mesh again.

As a demonstration of the concept, I integrated it into a utility which calculates the forces due to pressure, on a given set of patches.

The utility now works transparently, with both... serial, and parallel cases. If it finds any processor directories within the case directory, it uses the time / field data within these directories to calculate the forces on the patches, and if there are no processor directories, it carries on happily with the normal dataset available within the case directory.

If anyone else has such a requirement, I would be happy to provide you with the code for the utility.

(I would ofcourse, be delighted if someone would take the code and suggest improvements and point out bugs :-)! )

I am toying with the idea of doing something like this for the paraFoam libraries (vtkFoam) in OpenFOAM, but I think that will be a "longer" term project.

Philippose
philippose is offline   Reply With Quote

Old   August 12, 2007, 18:33
Default Just small comment. Paraview
  #3
Senior Member
 
Join Date: Mar 2009
Posts: 225
Rep Power: 18
paka is on a distinguished road
Just small comment.
Paraview in parallel would be a great idea(!). In my case using that tool right now is a bit pointless...

Actually, I cannot produce any of the movies without any quirks, it takes a long time to create them, and requires weird thing like not using some of the applications in the background, other way it brakes.

For initial view I still stick to Paravie, but for any other postprocessing, data read, etc., I stick to TecPlot.

Regards and thanks for a good work
Krystian
paka is offline   Reply With Quote

Old   February 18, 2011, 08:15
Default Solver parallell aware !
  #4
New Member
 
Anders Rynell
Join Date: Jan 2011
Posts: 1
Rep Power: 0
arynell is on a distinguished road
Hi philippose !

I am really interested in how you have implemented the processing in your utility. I am about to re write a solver which at "runtime" gives me some parameters regardless if the domain is split into several domains or not. I will be very glad if you provide me the code for that utility

Best regards !

/anders
arynell is offline   Reply With Quote

Old   October 18, 2011, 17:31
Default
  #5
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
I would also appreciate a copy of this code, or perhaps have it posted to the wiki.
mturcios777 is offline   Reply With Quote

Old   October 20, 2011, 10:41
Default
  #6
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 17
kmooney is on a distinguished road
Paraview should be able to detect and actively reconstruct the mesh & fields for viewing.

Under the "Object Inspector" panel there is a "case type" drop down menu. Change that to "Decomposed Case" and hit the Apply button. That should load the decomposed processor# meshes and fields instead of the fields and meshes present in the main case directory.
kmooney is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Proposal for an extension for the timeoptions of Utilities gschaider OpenFOAM Bugs 5 August 26, 2008 20:13
Problem with foam utilities in foamx alan_fergus OpenFOAM Bugs 2 January 15, 2008 07:38
New Utilities coops OpenFOAM Post-Processing 1 July 4, 2007 05:21
Utilities to download for research/programmers For those who favor open-source Main CFD Forum 0 September 21, 2006 17:03
Running utilities for a given time step melanie OpenFOAM Running, Solving & CFD 2 March 10, 2006 08:28


All times are GMT -4. The time now is 07:16.