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

Parallel dual mesh interpolation

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By FlameSlave

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 2, 2019, 04:37
Default Parallel dual mesh interpolation
  #1
New Member
 
Erik
Join Date: Sep 2019
Posts: 4
Rep Power: 6
FlameSlave is on a distinguished road
Hi everyone,


I am currently trying to transfer fields between two coexisting regions within one case. The two regions overlap perfectly and have the same resolution. I am using MeshToMesh to map the desired fields back and forth. When I initialize with
Code:
// create interpolation object for charge density mapping
meshToMesh interpolatorObj_(electricRegion, fluidRegion, meshToMesh::imDirect, false);
it runs fine in serial. However, when going to parallel using mpirun I get a segmentation fault error when initializing the meshToMesh object:
Code:
[1] [4] #0  Foam::error::printStack(Foam::Ostream&)[5] #0  Foam::error::printStack(Foam::Ostream&)#0[3] #0  Foam::error::printStack(Foam::Ostream&)  Foam::error::printStack(Foam::Ostream&)[6] #0  Foam::error::printStack(Foam::Ostream&)[0] #0  Foam::error::printStack(Foam::Ostream&)[7] #0  Foam::error::printStack(Foam::Ostream&)[2] #0  Foam::error::printStack(Foam::Ostream&) at ??:?
[1] #1  Foam::sigSegv::sigHandler(int) at ??:?
 at ??:?
[4] #1  Foam::sigSegv::sigHandler(int)[5] #1  Foam::sigSegv::sigHandler(int) at ??:?
[0] #1  Foam::sigSegv::sigHandler(int) at ??:?
[3] #1  Foam::sigSegv::sigHandler(int) at ??:?
 at ??:?
[2] #1  Foam::sigSegv::sigHandler(int)[7] #1  Foam::sigSegv::sigHandler(int) at ??:?
[6] #1  Foam::sigSegv::sigHandler(int) at ??:?
[1] #2  ? at ??:?
[0] #2  ? at ??:?
[4] #2  ? at ??:?
 at ??:?
[5] #2  ?[3] #2  ? at ??:?
[2] #2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
[1] #3  cfree in "/lib/x86_64-linux-gnu/libc.so.6"
[0] #3  cfree at ??:?
[7] #2  ? at ??:?
[6] #2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
[5] #3  cfree in "/lib/x86_64-linux-gnu/libc.so.6"
[4] #3  cfree in "/lib/x86_64-linux-gnu/libc.so.6"
[2] #3  cfree in "/lib/x86_64-linux-gnu/libc.so.6"
[1] #4  Foam::meshToMesh::distributeAndMergeCells(Foam::mapDistribute const&, Foam::polyMesh const&, Foam::globalIndex const&, Foam::Field<Foam::Vector<double> >&, Foam::List<Foam::face>&, Foam::List<int>&, Foam::List<int>&, Foam::List<int>&) const in "/lib/x86_64-linux-gnu/libc.so.6"
[3] #3  cfree in "/lib/x86_64-linux-gnu/libc.so.6"
[0] #4  Foam::meshToMesh::distributeAndMergeCells(Foam::mapDistribute const&, Foam::polyMesh const&, Foam::globalIndex const&, Foam::Field<Foam::Vector<double> >&, Foam::List<Foam::face>&, Foam::List<int>&, Foam::List<int>&, Foam::List<int>&) const in "/lib/x86_64-linux-gnu/libc.so.6"
[7] #3  cfree in "/lib/x86_64-linux-gnu/libc.so.6"
[6] #3  cfree in "/lib/x86_64-linux-gnu/libc.so.6"
[5] #4  Foam::meshToMesh::distributeAndMergeCells(Foam::mapDistribute const&, Foam::polyMesh const&, Foam::globalIndex const&, Foam::Field<Foam::Vector<double> >&, Foam::List<Foam::face>&, Foam::List<int>&, Foam::List<int>&, Foam::List<int>&) const in "/lib/x86_64-linux-gnu/libc.so.6"
[4] #4  Foam::meshToMesh::distributeAndMergeCells(Foam::mapDistribute const&, Foam::polyMesh const&, Foam::globalIndex const&, Foam::Field<Foam::Vector<double> >&, Foam::List<Foam::face>&, Foam::List<int>&, Foam::List<int>&, Foam::List<int>&) const in "/lib/x86_64-linux-gn at ??:?
[1] #5  Foam::meshToMesh::calculate(Foam::word const&)u/l in "/lib/xibc.so.6"86_64-linux-gnu
/libc.so.6"
[2] #4  Foam::meshToMesh::distributeAndMergeCells(Foam::mapDistribute const&, Foam::polyMesh const&, Foam::globalIndex const&, Foam::Field<Foam::Vector<double> >&, Foam::List<Foam::face>&, Foam::List<int>&, Foam::List<int>&, Foam::List<int>&) const[7] #4  Foam::meshToMesh::distributeAndMergeCells(Foam::mapDistribute const&, Foam::polyMesh const&, Foam::globalIndex const&, Foam::Field<Foam::Vector<double> >&, Foam::List<Foam::face>&, Foam::List<int>&, Foam::List<int>&, Foam::List<int>&) const in "/lib/x86_64-linux-gnu/libc.so.6"
[3] #4  Foam::meshToMesh::distributeAndMergeCells(Foam::mapDistribute const&, Foam::polyMesh const&, Foam::globalIndex const&, Foam::Field<Foam::Vector<double> >&, Foam::List<Foam::face>&, Foam::List<int>&, Foam::List<int>&, Foam::List<int>&) const in "/lib/x86_64-linux-gnu/libc.so.6"
[6] #4  Foam::meshToMesh::distributeAndMergeCells(Foam::mapDistribute const&, Foam::polyMesh const&, Foam::globalIndex const&, Foam::Field<Foam::Vector<double> >&, Foam::List<Foam::face>&, Foam::List<int>&, Foam::List<int>&, Foam::List<int>&) const at ??:?
[0] #5  Foam::meshToMesh::calculate(Foam::word const&) at ??:?
[4] #5  Foam::meshToMesh::calculate(Foam::word const&) at ??:?
[5] #5  Foam::meshToMesh::calculate(Foam::word const&) at ??:?
[1] #6  Foam::meshToMesh::constructNoCuttingPatches(Foam::word const&, Foam::word const&, bool) at ??:?
[2] #5  Foam::meshToMesh::calculate(Foam::word const&) at ??:?
[7] #5  Foam::meshToMesh::calculate(Foam::word const&) at ??:?
[6] #5  Foam::meshToMesh::calculate(Foam::word const&) at ??:?
[3] #5  Foam::meshToMesh::calculate(Foam::word const&) at ??:?
[0] #6  Foam::meshToMesh::constructNoCuttingPatches(Foam::word const&, Foam::word const&, bool) at ??:?
[4] #6  Foam::meshToMesh::constructNoCuttingPatches(Foam::word const&, Foam::word const&, bool) at ??:?
[2] #6  Foam::meshToMesh::constructNoCuttingPatches(Foam::word const&, Foam::word const&, bool) at ??:?
[1] #7  Foam::meshToMesh::meshToMesh(Foam::polyMesh const&, Foam::polyMesh const&, Foam::meshToMesh::interpolationMethod const&, bool) at ??:?
[7] #6  Foam::meshToMesh::constructNoCuttingPatches(Foam::word const&, Foam::word const&, bool) at ??:?
[6] #6  Foam::meshToMesh::constructNoCuttingPatches(Foam::word const&, Foam::word const&, bool) at ??:?
[3] #6  Foam::meshToMesh::constructNoCuttingPatches(Foam::word const&, Foam::word const&, bool) at ??:?
[5] #6  Foam::meshToMesh::constructNoCuttingPatches(Foam::word const&, Foam::word const&, bool) at ??:?
[4] #7  Foam::meshToMesh::meshToMesh(Foam::polyMesh const&, Foam::polyMesh const&, Foam::meshToMesh::interpolationMethod const&, bool) at ??:?
[0] #7  Foam::meshToMesh::meshToMesh(Foam::polyMesh const&, Foam::polyMesh const&, Foam::meshToMesh::interpolationMethod const&, bool) at ??:?
[2] #7  Foam::meshToMesh::meshToMesh(Foam::polyMesh const&, Foam::polyMesh const&, Foam::meshToMesh::interpolationMethod const&, bool) at ??:?
[1] #8   at ??:?
[5] #7  Foam::meshToMesh::meshToMesh(Foam::polyMesh const&, Foam::polyMesh const&, Foam::meshToMesh::interpolationMethod const&, bool) at ??:?
[7] #7  Foam::meshToMesh::meshToMesh(Foam::polyMesh const&, Foam::polyMesh const&, Foam::meshToMesh::interpolationMethod const&, bool) at ??:?
[3] #7  Foam::meshToMesh::meshToMesh(Foam::polyMesh const&, Foam::polyMesh const&, Foam::meshToMesh::interpolationMethod const&, bool) at ??:?
[6] #7  Foam::meshToMesh::meshToMesh(Foam::polyMesh const&, Foam::polyMesh const&, Foam::meshToMesh::interpolationMethod const&, bool)? at ??:?
I have used the following steps to set up my case, similarly to the cht multi region case:
  1. blockMesh with two cellZones declared in the blockMeshDict .
  2. Now, I call splitMeshRegion -overwrite to obtain the regions
  3. Next, I manually rename the boundary conditions of the second mesh (Electric) in all polyMesh/boundary and cellToRegions files to have the same name as the first one (in blockMeshDict they were different initially to avoid conflict).
  4. For parallel only, I call decomposePar -allRegions. I have already tried both scotch and simple with the same decomposition for both meshes on 8 cores.
All these steps above run fine but the parallel case causes me some headache. Debugging it, I was able to locate the point of crashing in meshToMesh::distributeAndMergeCells which is a parallel-specific function in meshToMeshParallelOps.C. However, I have no idea what's causing it. Does anyone have an idea what might be the problem here or has even encountered something similar before?

Thanks!
FlameSlave is offline   Reply With Quote

Old   October 7, 2019, 08:21
Default
  #2
New Member
 
Erik
Join Date: Sep 2019
Posts: 4
Rep Power: 6
FlameSlave is on a distinguished road
In case someone has the same issue in the future:

I was able to work around this issue by declaring preservePatches() for all the boundary patches in the decomposeParDict file.
frobaux likes this.
FlameSlave is offline   Reply With Quote

Reply

Tags
dual mesh, mapping, meshtomesh, parallel, region


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
[snappyHexMesh] Help with Snappy: no layers growing GianF OpenFOAM Meshing & Mesh Conversion 2 September 23, 2020 08:26
simpleFoam parallel AndrewMortimer OpenFOAM Running, Solving & CFD 12 August 7, 2015 18:45
Mesh gets out of sync during parallel 2D adaptive mesh refinement pjohannes183 OpenFOAM Programming & Development 0 November 14, 2013 04:31
Icemcfd 11: Loss of mesh from surface mesh option? Joe CFX 2 March 26, 2007 18:10
Automatic Mesh Motion solver michele OpenFOAM Running, Solving & CFD 10 September 26, 2005 08:21


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