I'm working with OpenMP in my code, but in order to do that I have to solve this dependency:
do q=1,pppp
i=0
DO j=1, pppp
do c1=1,3
vect(c1)=xx(q,c1)-xx(j,c1)
end do
dist=sqrt(vect(1)**2+vect(2)**2+vect(3)**2)
if(dist<0.0001)then
i=i+1
if(i>10)i=10
caravec(q,i)=j
endif
ENDDO
ENDDO
I'm trying to avoid the ordered clause, because it is expensive, but I don't know how to remove the dependency. How can I do that?
Thanks for all the help