Multithreading Big loop containing several loops inside

yafayez@yahoo.com
Total Points:
60
Registered User
October 8, 2008 2:26 PM PDT
Rate
 
#4 Reply to #3

Hi,

 

I added the commands and i see that all processors are working but the program is much slower. How can i detect bootlenick. Thanks, is there a phone number i can call you at to discuss it more. Thanks again,

 

Yasser

You might start with something like the following:

!$omp parallel
!$omp do private(i,j)
do i=nx1+1,nx2-2
do j=ny1+2,ny2-2

     “stuff1”
enddo
enddo
!$omp end do nowait

 

!$omp do private(i,j)
do i=nx1+2,nx2-2
do j=ny1+1,ny2-2

     “stuff2”
enddo
enddo
!$omp end do nowait
!$omp end parallel

Note, depending on what is inside of stuff1 and stuff2 you may need to use different temporaries (or make subroutines out of stuff1 and stuff2 and passing i and j into the routines.

Also, if the computation overhead varies per iteration then experiment with adding the schedule clause.

Once you get the above working for stuff1 and stuff2 apply what you learned to the remaining stuff sections.

Jim Dempsey

 

 



Intel Software Network Forums Statistics

8473 users have contributed to 31604 threads and 100653 posts to date.
In the past 24 hours, we have 31 new thread(s) 110 new posts(s), and 163 new user(s).

In the past 3 days, the most popular thread for everyone has been gemm(A,A,A) like possible? The most posts were made to gemm(A,A,A) like possible? The post with the most views is Dear Steve, excuse me for a d

Please welcome our newest member Kevin Johnson