# Some help for Red black SOR with OpenMP

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

 February 4, 2006, 10:26 Some help for Red black SOR with OpenMP #1 Davoche Guest   Posts: n/a Hi everybody, I'm trying to parallelize ( with OpenMP ) a Numerical recipes routine. In fact, this is a Red black SOR algorithm. But I don't know how to begin... If somone could help me for this first experience... Davoche PS: You can find the algorithm below ************************************************** ph():represent the 3D quantity to solve res(): is the source term omeg : is the relaxation parameter ************************************************** * kjsw=1 do ipass=1,2 isw=kjsw do 14 k=2,n3x do 14 j=2,n2y do 13 i=isw+1,n1z,2 fj=(-(ph(i+1,j,k)+ph(i-1,j,k) +ph(i,j-1,k)+ph(i,j+1,k) +ph(i,j,k+1)+ph(i,j,k-1))+res(i,j,k)) ph(i,j,k)=omeg*(fj/6)+(1.d0-omeg)*ph(i,j,k) 13 continue isw=3-isw 14 continue kjsw=3-kjsw 15 continue

 February 5, 2006, 18:19 Re: Some help for Red black SOR with OpenMP #2 AnotherCFDUser Guest   Posts: n/a Parallelize the inner loop (there are no data dependencies as far as I can tell). The speed-up you will get will depend upon the size of the maximum index in the loop. I forget the exact syntax but something like: !\$OMP PARALLEL DO (PRIVATE i,fj) . . . !\$OMP END PARALLEL DO should be about right.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post poiu FLUENT 5 September 6, 2009 09:24 jinwon park Main CFD Forum 5 August 28, 2007 05:47 John Deas Main CFD Forum 0 May 17, 2007 16:53 Anish FLUENT 2 March 28, 2007 01:02 Sjoerd Romkes CFX 0 March 8, 2002 12:20

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