# Known issues in parallel

### From Gerris

Revision as of 08:41, 10 March 2012Zaleski (Talk | contribs) ← Previous diff |
Revision as of 08:52, 10 March 2012Zaleski (Talk | contribs) (→A two-box simulation gives different results with one or two pids - described the results of the simulation at issue) Next diff → |
||

Line 35: |
Line 35: | ||

</pre> | </pre> | ||

- | Here is the result of running without mpi on MacOS 10.7.3 on a MacBook Pro with a four-core intel i7 system | + | Here is the result of running without mpi on MacOS 10.7.3 on a MacBook Pro with a four-core intel i7 system. |

+ | <pre> | ||

+ | % gerris2D twobox-twopid.gfs | ||

+ | step: 0 t: 0.00000000 dt: 5.263158e-03 cpu: 0.12000000 real: 0.12951800 | ||

+ | Approximate projection | ||

+ | niter: 13 | ||

+ | residual.bias: -1.000e-01 -1.984e-04 | ||

+ | residual.first: 5.020e-02 9.960e-05 1.6 | ||

+ | residual.second: 5.668e-01 1.330e-04 1.9 | ||

+ | residual.infty: 6.400e+00 6.251e-04 2 | ||

+ | </pre> | ||

+ | On the other hand, if we run the same simulation with mpi (openmpi installed with macports) | ||

+ | and two pids, this is the result: | ||

+ | <pre> | ||

+ | % mpirun -np 2 gerris2D twobox-twopid.gfs | ||

+ | step: 0 t: 0.00000000 dt: 5.263158e-03 cpu: 0.03000000 real: 0.03374700 | ||

+ | Approximate projection | ||

+ | niter: 4 | ||

+ | residual.bias: -1.000e-01 -7.446e-05 | ||

+ | residual.first: 5.020e-02 3.839e-05 6 | ||

+ | residual.second: 5.668e-01 4.914e-05 10 | ||

+ | residual.infty: 6.400e+00 2.713e-04 12 | ||

+ | </pre> | ||

+ | The two results are different: the pre-iteration Projection statistics (first column) are the same | ||

+ | but the post-iteration Projection statistics are different. However, since there are the same | ||

+ | number of boxes, the mpi communication should send the same information that is exchanged between boxes | ||

+ | in the non-mpi run. Thus something is amiss in the way information is exchanged between boxes. | ||

+ | |||

+ | Using larger number of boxes and pids, we found cases where the non-mpi runs converge but the mpi run do | ||

+ | not converge, i.e. the residual is not reduced below the required minimum of 0.001 . |

## Revision as of 08:52, 10 March 2012

## A two-box simulation gives different results with one or two pids

We run a simplified version of the Von-Karman test case. The modified simulation file is

2 1 GfsSimulation GfsBox GfsGEdge {} { Time { iend = 0 } Refine 6 Solid (x*x + y*y - 0.0625*0.0625) OutputTime { istep = 1 } stderr OutputProjectionStats { istep = 1 } stderr OutputSimulation { start = 0.1 step = 0.1} simulation.gfs { variables = U,V,P } } GfsBox { id=1 pid=0 left = Boundary { BcDirichlet U 1 } } GfsBox { id=2 pid=1 right = BoundaryOutflow } 1 2 right

We use the following version of Gerris

%gerris2D -V gerris: using 2D libgfs version 1.3.2 (120229-075733 + local changes) compiled with flags: -DBSD_SOURCE -D_DARWIN_C_SOURCE MPI: yes pkg-config: yes m4: yes

Here is the result of running without mpi on MacOS 10.7.3 on a MacBook Pro with a four-core intel i7 system.

% gerris2D twobox-twopid.gfs step: 0 t: 0.00000000 dt: 5.263158e-03 cpu: 0.12000000 real: 0.12951800 Approximate projection niter: 13 residual.bias: -1.000e-01 -1.984e-04 residual.first: 5.020e-02 9.960e-05 1.6 residual.second: 5.668e-01 1.330e-04 1.9 residual.infty: 6.400e+00 6.251e-04 2

On the other hand, if we run the same simulation with mpi (openmpi installed with macports) and two pids, this is the result:

% mpirun -np 2 gerris2D twobox-twopid.gfs step: 0 t: 0.00000000 dt: 5.263158e-03 cpu: 0.03000000 real: 0.03374700 Approximate projection niter: 4 residual.bias: -1.000e-01 -7.446e-05 residual.first: 5.020e-02 3.839e-05 6 residual.second: 5.668e-01 4.914e-05 10 residual.infty: 6.400e+00 2.713e-04 12

The two results are different: the pre-iteration Projection statistics (first column) are the same but the post-iteration Projection statistics are different. However, since there are the same number of boxes, the mpi communication should send the same information that is exchanged between boxes in the non-mpi run. Thus something is amiss in the way information is exchanged between boxes.

Using larger number of boxes and pids, we found cases where the non-mpi runs converge but the mpi run do not converge, i.e. the residual is not reduced below the required minimum of 0.001 .