|
[Sponsors] |
Help: Serial code to parallel but even slower |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 13, 2008, 05:51 |
Help: Serial code to parallel but even slower
|
#1 |
Guest
Posts: n/a
|
Hi,
I've a serial 2D CFD code. As my grid size requirement increases, the simulation takes longer. Also, memory requirement becomes a problem. Grid size 've reached 1200x1200. Going higher is not possible due to memory problem. Currently, I'm using the PETSc solver which is a parallel MPI solver, to solve the momentum and poisson eqn. I tried to convert my code to a parallel one but after restructuring and enabling the parallel mode of the solver, I found that it is much slower, although the answer is correct. I wonder what I should do to check what's wrong. Btw, is a grid size of 1200x1200 suitable for parallel run of 4 processors? I read that if grid is too small, it may be inefficient. Thank you. |
|
April 13, 2008, 11:08 |
Re: Help: Serial code to parallel but even slower
|
#2 |
Guest
Posts: n/a
|
From my experience a small problem like yours won't scale very nice on multiple machines because the communications will take longer than the calculations. Try to run the same problem on a dual/quad core machine and if your code is correct it will run faster.
|
|
April 13, 2008, 11:47 |
Re: Help: Serial code to parallel but even slower
|
#3 |
Guest
Posts: n/a
|
From my experience, I dont think 1200 x 1200 ( ~ 1.4 Million Unknowns ) is a small problem. You should get a speedup. Try timing the Poisson equation part only and see if you get a speed up.. -Dominic
|
|
April 14, 2008, 04:38 |
Re: Help: Serial code to parallel but even slower
|
#4 |
Guest
Posts: n/a
|
Which mpi implementation are you using ? If you have access to different mpi like mpich, mpich2, openmpi, lammpi, then try compiling with others and check. In our experience, we found mpich2 to give poor performace which was dramatically improved when we used openmpi.
|
|
May 14, 2008, 11:26 |
Re: Help: Serial code to parallel but even slower
|
#5 |
Guest
Posts: n/a
|
Have you tried OpenMP? This is an easier option i.e less work involved. You could try automatic parallelization as a first step.
As for the MPI code, there are tools available such as vampir and jumpshot to analyze the code and see why it is slow. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
DPM parallel is not working but serial is working | johnwinter | FLUENT | 1 | March 27, 2012 03:01 |
Self implemented code is not running in parallel | michi | OpenFOAM Running, Solving & CFD | 2 | November 6, 2008 06:09 |
Parallel convergence worse than serial! | Michael B | FLUENT | 3 | December 9, 2006 22:46 |
Problems with MFIX code and Parallel Processing. | Fernando Pio | Main CFD Forum | 4 | August 29, 2006 15:33 |
Design Integration with CFD? | John C. Chien | Main CFD Forum | 19 | May 17, 2001 16:56 |