CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Help: Serial code to parallel but even slower

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 13, 2008, 05:51
Default Help: Serial code to parallel but even slower
  #1
Zonexo
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.
  Reply With Quote

Old   April 13, 2008, 11:08
Default Re: Help: Serial code to parallel but even slower
  #2
cfd_newbie
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.

  Reply With Quote

Old   April 13, 2008, 11:47
Default Re: Help: Serial code to parallel but even slower
  #3
Dominic
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
  Reply With Quote

Old   April 14, 2008, 04:38
Default Re: Help: Serial code to parallel but even slower
  #4
Praveen. C
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.
  Reply With Quote

Old   May 14, 2008, 11:26
Default Re: Help: Serial code to parallel but even slower
  #5
agg
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.
  Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 10:15.