- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am not sure if its a right forum thread, if not let me
know I will move my question to appropriate one. I need some help to
detect race condition inside my code. Here is the part which is
parallelized.
!$omp parallel default(none)&
!$omp shared(GKL, IEL, NR, MAXBWL, NRS)
!$omp do lastprivate(L, CP, I, J, K, N, M, PIVOT, MR)
DO N=1,NRSM = N - 1
MR =
MIN0(MAXBWL,NR-M)PIVOT = GKL(IEL,N,1)
DO L=2,MRCP = GKL(IEL,N,L)/PIVOT
I = M + L
J = 0
DO K=L,MRJ = J + 1
GKL(IEL,I,J) = GKL(IEL,I,J) - CP*GKL(IEL,N,K)
END DOGKL(IEL,N,L) = CP
END DOEND DO!$omp end do
!$omp end parallel
I am having problem with 2D matrix, and its really hard to detect
because when I am using small example something like 8x8 matrix everythingworks great, but when I am running bigger case at some point it startmiscalculating decimal numbers, for example instead of 0.3122880E-04 it
gives me 0.3125670E-04.
If someone could help me figure this out I would be highly appreciated.
Thanks in advance.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wow I cant believe that no one can help me here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could help yourself by running Intel Thread Checker, if you don't care to clarify your example. If the question were more specifically about threading, you could try the threading forum. If you are using single precision, it may not be surprising that changes in threading produce numerical changes such as you mention.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page