View Issue Details

IDProjectCategoryView StatusLast Update
0003537OpenFOAMBugpublic2020-08-25 17:02
ReportermillszgAssigned Tohenry 
Status resolvedResolutionfixed 
Platformx86-64OSUbuntuOS Version18.04
Product Version8 
Fixed in Version 
Summary0003537: faceAgglomerate hangs for certain values of nFacesInCoarsestLevel and featureAngle in parallel
DescriptionfaceAgglomerate will occasionally hang for certain values of nFacesInCoarsestLevel and featureAngle. This only occurs when running in parallel, and the same values that cause it to hang for a certain number of processors will work for a different number of processors. Increasing nFacesInCoarsestLevel will sometimes alleviate it, but oftentimes it needs to be increased so much that very little agglomeration is actually occurring. In runs where the program hangs, it will always print "Agglomerating patch : patch_name" at least one time, but will not always print for each patch being agglomerated. Keeping everything the same, but rearranging the order of patches in the viewfactorsDict file will usually lead to the programming hanging after outputting "Agglomerating patch..." for a different patch. From what I have tested, this occurs in OpenFOAM 6, 7, 8 and dev. I have had this issues with multiple different meshes and on different computers. From what I have found, this is actually caused by a bug in the pairPatchAgglomeration class (see additional information for explanation).
Steps To ReproduceA case which will reproduce the error is attached. It is a single region of a multiregion case, so some of the boundaries are mappedWall. This error was occurring with the entire multi-region mesh was included in the case folder, so the use of mapped walls without the patch being mapped to is not the cause of the issue. The mesh has already been generated and calling faceAgglomerate will cause it to hang. The culprit seems to be innerGas_to_holderBase. When nFacesInCoarsestLevel for the patch is set to 7000, faceAgglomerate hangs. When it is increased to 10000, it will complete successfully. When the innerGas_to_holderBase is the first in the list of patch dictionaries in viewFactorsDict, faceAgglomerate seems to hang on innerGas_to_retort. When it's the fourth dictionary (between innerGas_to_tempDisks and innerGas_to_retort), faceAgglomerate seems to hang on innerGas_to_retortInlet.
Additional InformationFrom debugging it appears the problem is in the pairPatchAgglomeration class. In the agglomerate() function, at least one process hangs while the rest continue, causing the program to be unable to continue. This seems to happen in the do-while loop where the agglomOK variable for processes that hang remains false, while it is set to true for the other processes and they complete the function. The issue seems to be resolved by adding in a call to reduce the agglomOK variable with an orOp operation the reduce operation for nCoarseFaces on line 412 of pairPatchAgglomeration.C (in version 8). I have attached a copy of pairPatchAgglomeration.C that I am using, which is no longer causing the error for me.
TagsNo tags attached.



2020-08-21 15:34


pairPatchAgglomeration.C (15,853 bytes)


2020-08-25 17:02

manager   ~0011478

Thanks for the report and correction, I agree that with the current rather convoluted logic an additional reduction is needed

Resolved in OpenFOAM-8 by commit dd46ea14cf84c7d19a07f2f8d633d7c74025d5dd
Resolved in OpenFOAM-dev by commit 2ad3fa242aa2c0c4de9cab5fbb275df093e3ac29

Issue History

Date Modified Username Field Change
2020-08-21 15:34 millszg New Issue
2020-08-21 15:34 millszg File Added: pairPatchAgglomeration.C
2020-08-25 17:02 henry Assigned To => henry
2020-08-25 17:02 henry Status new => resolved
2020-08-25 17:02 henry Resolution open => fixed
2020-08-25 17:02 henry Note Added: 0011478