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

Read parallel meshes

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

Like Tree1Likes
  • 1 Post By A_Pete

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 4, 2014, 05:44
Default Read parallel meshes
  #1
Member
 
Norbert Weber
Join Date: May 2012
Location: Dresden, Germany
Posts: 37
Rep Power: 14
dl6tud is on a distinguished road
I would like to read the meshes of all processors when computing in parallel. The idea is to have all meshes on each processor.

I create a "Time-Object" for each processor as

Quote:
PtrList<Time> time(Pstream::nProcs());

forAll(time, procI)
{
time.set
(
procI,
new Time
(
Time::controlDictName,
args.rootPath(),
args.globalCaseName()/fileName(word("processor") + name(procI))
)
);
}
Then, I create the meshes with
Quote:
PtrList<fvMesh> pMesh(Pstream::nProcs());
forAll(pMesh, procI)
{
pMesh.set
(
procI,
new fvMesh
(
IOobject
(
Foam::fvMesh::defaultRegion,
time[procI].timeName(),
time[procI],
IOobject::MUST_READ
)
)
);
}
The second step fails with

Quote:
Message from processor 0 not fully consumed. messageSize:20620 bytes of which only 0 consumed.
At the moment I have no idea, why OF tries to communicate with the other processors when reading the meshes. Maybe for the boundaries?
dl6tud is offline   Reply With Quote

Old   March 5, 2014, 14:04
Default
  #2
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi,

Yes, the processor boundaries exchange information, so what you are trying to do will most probably not work.

May I ask, why you need all the meshes on every processor?

Kind regards,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   March 7, 2014, 04:45
Default
  #3
Member
 
Join Date: Jul 2011
Posts: 54
Rep Power: 15
A_Pete is on a distinguished road
Hi,

what about using gather and scatter? Not sure what you exactly want to do with the mesh, but you could use gatherList.

Code:
//- Get local mesh on processor
fvMesh mesh(refCast<const fvMesh>(obr_));

//- Gather the meshes into PtrList on master processor
PtrList<fvMesh> pMesh(Pstream::nProcs());
pMesh[Pstream::myProcNo()] = mesh;
Pstream::gatherList(pMesh);
Depending on what you want to do afterwards, you could either use scatterList or put the mesh together again from the pMesh and then scatter just this fvMesh.
Behradskn likes this.
A_Pete 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
how to calculate mass flow rate on patches and summation of that during the run? immortality OpenFOAM Post-Processing 104 February 16, 2021 09:46
Case running in serial, but Parallel run gives error atmcfd OpenFOAM Running, Solving & CFD 18 March 26, 2016 13:40
How to setup a simple OpenFOAM cluster? TommiPLaiho OpenFOAM Installation 3 October 27, 2013 16:15
[Other] Creating large meshes (>10,000,00) in parallel fontania OpenFOAM Meshing & Mesh Conversion 4 April 16, 2012 17:14
Fluent parallel poovanna FLUENT 0 March 24, 2007 00:22


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