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

parallelisation with openMP

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 19, 2014, 20:11
Default parallelisation with openMP
  #1
New Member
 
Manoj Dhiman
Join Date: Dec 2014
Posts: 4
Rep Power: 11
mandman is on a distinguished road
Please go thru the link. http://1drv.ms/1wMph1U
Except this any other logic than SPMD is also valuable

Last edited by mandman; December 19, 2014 at 20:12. Reason: keywords
mandman is offline   Reply With Quote

Old   December 28, 2014, 21:19
Default
  #2
Senior Member
 
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25
mprinkey will become famous soon enough
Linking to a .pdf is not a good way to get attention to your question.

Your question is a common one. Data dependencies are critically important and the issue you are asking about is called a "race condition." You can avoid these problems dividing the nodes into two groups. Color the odd-numbered lines red and the even-numbered lines black. Then use all of the cores to update the red regions (locking the black regions if necessary). After that use all of the cores to update the black regions. This division of updates will remove the data dependencies and a do across pragma for each color update will likely parallelize cleanly.

Red-Black (and more generally multi-coloring) can be used in a variety of ways to avoid cache coherency/race conditions. You can read much about red-black Gauss-Siedel iteration and its merits versus standard GS on current CPUs. What I've described above is simply a line-implicit version.

There are other ways to deal with this type of dependency issue too--the goal should always be to avoid reading from recently written data. Parallelization of line-implicit algorithms also bring other pitfalls--for example, x-direction line updates will be fast but y-direction line updates will incur many cache misses. Some times it is worthwhile to do an explicit data transpose to make line accesses always fast.
mprinkey is offline   Reply With Quote

Reply

Tags
data synchronisation, openmp, parallel


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
How to run OpenFoam using openMP. bravikanth OpenFOAM Running, Solving & CFD 12 June 20, 2016 10:11
OpenMP maz Main CFD Forum 5 May 3, 2013 01:00
About the OpenMP jinwon park Main CFD Forum 5 August 28, 2007 05:47
OpenMP and fortran John Deas Main CFD Forum 0 May 17, 2007 16:53
Parallel computing and OpenMP ganesh Main CFD Forum 7 October 27, 2006 10:15


All times are GMT -4. The time now is 22:50.