CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [ImmersedBoundary] Immersed Boundary Method: Error Occurs in parallelization of icoIbFoam (https://www.cfd-online.com/Forums/openfoam-community-contributions/179386-immersed-boundary-method-error-occurs-parallelization-icoibfoam.html)

wudi October 29, 2016 09:52

Immersed Boundary Method: Error Occurs in parallelization of icoIbFoam
 
Hi Foamers:

As you know Immersed boundary method has been implemented in Openfoam-extend. Currently I am using foam-extend-4.0 version.

I just try to run a cylinderInChannelFineIcoIbFoam simulation in the tutorial folder, and the simulation goes well in serial computation. Then I test it in parallel mode. I followed the description in "Allrun" file and do the following command:

1. blockMesh
2. cp save/boundary constant/polyMesh/
3. mkdir 0
4. cp 0_org/* 0/
5. decomposePar (I have modified the decomposeParDict file in system folder, 4 processors are specified)
6. mpirun -np 4 potentialIbFoam -parallel
Then I got errors from step 6, which are:

************************************************** *************************************************
Create time

Create mesh for time = 0


SIMPLE: no convergence criteria found. Calculations will run for 50 steps.

Create immersed boundary cell mask
Create immersed boundary face mask
Found immersed boundary patch 0 named ibCylinder
[3] Number of IB cells: 0
External flow
[0] Number of IB cells: 72
[1] Number of IB cells: 0
[2] Number of IB cells: 72
Reading field p

Reading field U


Calculating potential flow
[wudi-HOME:19883] *** An error occurred in MPI_Recv
[wudi-HOME:19883] *** reported by process [3012755457,0]
[wudi-HOME:19883] *** on communicator MPI_COMM_WORLD
[wudi-HOME:19883] *** MPI_ERR_TRUNCATE: message truncated
[wudi-HOME:19883] *** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort,
[wudi-HOME:19883] *** and potentially your MPI job)
************************************************** **************************************************

I searched online, someone else report the same error in 2014. Here is the link:
https://sourceforge.net/p/openfoam-e...ndrelease/260/

I have no idea whether this error or bug got solved or not. Please advise! Thank you in advance.

wudi October 29, 2016 13:09

Update
 
Hi,
It's me again. After a few hours investigation, before sleeping I post some updates to this issue.

This error message was caused by the MPI communication type. Specifically, one should put commsType to be nonBlocking in $WM_PROJECT_DIR/etc/controlDict . The default value is blocking. However, this method is only applicable to the versions before foam-extend-3.2.

From foam-extend-3.2, $WM_PROJECT_DIR/etc/controlDict has been removed, and $WM_PROJECT_DIR/etc/controlDict-SAMPLE is added to this folder. Re-name this controlDict-SAMPLE to controlDict won't work.

Now the problem becomes more clear. The key issue is to change commsType in OptimisationSwitches to nonBlocking. I will update the solution later. If all the methods fail, maybe I will consider to downgrade the version back to 3.1.

wudi October 31, 2016 00:48

Still confused
 
Still confused. I have re-compiled the whole library with commsType set to be "nonBlocking", however the problem still exists.

My MPI version is OpenMPI 1.10.2, and parallel computation works fine in other standard solver such as "simpleFoam" and "icoFoam", it only fails in "ImmersedBoundary" folder.

Expect someone who can give me a hint. Thanks in advance.

Best regards

Blow is error message:
[wudi-HOME:19883] *** An error occurred in MPI_Recv
[wudi-HOME:19883] *** reported by process [3012755457,0]
[wudi-HOME:19883] *** on communicator MPI_COMM_WORLD
[wudi-HOME:19883] *** MPI_ERR_TRUNCATE: message truncated
[wudi-HOME:19883] *** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort,
[wudi-HOME:19883] *** and potentially your MPI job)

wudi October 31, 2016 03:20

Got it worked in parallel eventually!

Will update later. Thanks for watching.

GFarello January 24, 2017 09:55

Hi wudi,

I have the same problem... how did you fix that?

wudi January 25, 2017 04:57

Quote:

Originally Posted by GFarello (Post 634541)
Hi wudi,

I have the same problem... how did you fix that?

Hi GFarello,

It has been a few months since I post this thread. As far as I could remember, potentialIbFoam does NOT support parallel computing, you have to run it sequentially. Once you have done this, you need to modify the initial conditions in the 0 folder, and then you may run icoIbFoam in parallel.

Regards


All times are GMT -4. The time now is 13:09.