View Issue Details

IDProjectCategoryView StatusLast Update
0001260OpenFOAMBugpublic2014-04-09 15:38
ReporterAndreasG Assigned Touser2 
PriorityhighSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSFedora 19OS Versionamd64
Summary0001260: cyclicAMI crashes in parallel when processor has faces for only on AMI patch
DescriptionI tried to run a case with cyclicAMI and non planar rotational patches (rotationAngle set). The case runs fine on a single or on a small number of processors. Using more processors results in cyclicAMI failing to initialize.
After some observation I think that this error occurs when a processor holds faces from one ami patch but not from the other one.

Please find a test case attached (pipe flow and a rotation angle of 60 deg). The case runs fine on a single processor and crashes in parallel.

Steps To ReproduceTo reproduce run Allrun script in attached file.
Additional InformationWhen the decomposition changed to force faces of both AMI patches on each processor it will run fine in parallel; change decomposeParDict to:
simpleCoeffs
{
    n (1 1 2);
// n (2 1 1);
    delta 0.1;
}
TagsNo tags attached.

Activities

AndreasG

2014-04-04 15:03

reporter  

pipeCyclic2.zip (10,391 bytes)

AndreasG

2014-04-04 15:20

reporter   ~0002996

please also see http://www.cfd-online.com/Forums/openfoam-solving/132701-cyclicami-crashes-parallel-when-processor-has-faces-only-ami-patch.html#post483892

AndreasG

2014-04-09 14:31

reporter   ~0003004

Seems like the check for orientation of the rotation was the root of this bug and the source for warnings even if the patch align perfectly. Here's the fix for this bug:

From 5811815091ef368b64ca93eaf2027dcf353b872f Mon Sep 17 00:00:00 2001
From: AndreasG <openfoam@kwijybo.de>
Date: Wed, 9 Apr 2014 15:24:16 +0200
Subject: [PATCH] fixing bug #0001260 fix the check for orientation of given
 rotation angle in cyclicAMI

---
 .../cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C
index 91ac2b8..a7e8cbe 100644
--- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C
+++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C
@@ -173,16 +173,20 @@ void Foam::cyclicAMIPolyPatch::calcTransforms
                 reduce(transformedAreaNeg, sumOp<vector>());
                 reduce(area1, sumOp<vector>());
 
- scalar errorPos = mag(transformedAreaPos - area1);
- scalar errorNeg = mag(transformedAreaNeg - area1);
+ // Vectors of patches are pointing to outside, so sum of master and transformed
+ // slave patch has to zero - AG 2014/04/09
+ scalar errorPos = mag(transformedAreaPos + area1);
+ scalar errorNeg = mag(transformedAreaNeg + area1);
 
+ // Transformation RPos is transformation for neighbour patch, so local transformation
+ // is transpose tensor - AG 2014/04/09
                 if (errorPos < errorNeg)
                 {
- revT = RPos;
+ revT = RPos.T();
                 }
                 else
                 {
- revT = RNeg;
+ revT = RNeg.T();
                     rotationAngle_ *= -1;
                 }
 
--
1.8.1.4

user2

2014-04-09 15:38

  ~0003005

Thanks for the report - fixed by commit 689b37f

Issue History

Date Modified Username Field Change
2014-04-04 15:03 AndreasG New Issue
2014-04-04 15:03 AndreasG File Added: pipeCyclic2.zip
2014-04-04 15:20 AndreasG Note Added: 0002996
2014-04-09 14:31 AndreasG Note Added: 0003004
2014-04-09 15:38 user2 Note Added: 0003005
2014-04-09 15:38 user2 Status new => resolved
2014-04-09 15:38 user2 Fixed in Version => 2.3.x
2014-04-09 15:38 user2 Resolution open => fixed
2014-04-09 15:38 user2 Assigned To => user2