Parallelism issue in uselrc
Posted: Wed Apr 13, 2011 3:40 pm
Hello,
I am using special physics electric arcs in Saturne V2-rc2. I try to use the restriking model.
I get some troubles with parallelism when I want to get the restriking position point. My code is working in a single processor, but it does not give me the good position in multi-processors, probably because of the local variable emax.
Here is the code :
do iel = 1, ncel
if(xyzcen(3,iel) .gt. 2.d-3 .and. xyzcen(3,iel) .lt. 70.d-3) then
xelec = propce(iel,ipcdc1)/propce(iel,ipcsig)
yelec = propce(iel,ipcdc2)/propce(iel,ipcsig)
zelec = propce(iel,ipcdc3)/propce(iel,ipcsig)
w1(iel) = sqrt ( xelec**2 + yelec**2 + zelec**2 )
amex = min(amex,w1(iel))
aiex = max(aiex,w1(iel))
endif
enddo
if(irangp.ge.0) then
call parmin (amex)
call parmax (aiex)
endif
if(aiex .ge. econs) then
iclaq = 1
ntdcla = ntcabs
do iel = 1, ncel
if(w1(iel).gt.emax) then
xclaq = xyzcen(1,iel)
yclaq = xyzcen(2,iel)
zclaq = xyzcen(3,iel)
emax = w1(iel)
endif
enddo
I tried some modifications but I get floating point exception. How can i overcome this parallelism issue ?
Thanks
I am using special physics electric arcs in Saturne V2-rc2. I try to use the restriking model.
I get some troubles with parallelism when I want to get the restriking position point. My code is working in a single processor, but it does not give me the good position in multi-processors, probably because of the local variable emax.
Here is the code :
do iel = 1, ncel
if(xyzcen(3,iel) .gt. 2.d-3 .and. xyzcen(3,iel) .lt. 70.d-3) then
xelec = propce(iel,ipcdc1)/propce(iel,ipcsig)
yelec = propce(iel,ipcdc2)/propce(iel,ipcsig)
zelec = propce(iel,ipcdc3)/propce(iel,ipcsig)
w1(iel) = sqrt ( xelec**2 + yelec**2 + zelec**2 )
amex = min(amex,w1(iel))
aiex = max(aiex,w1(iel))
endif
enddo
if(irangp.ge.0) then
call parmin (amex)
call parmax (aiex)
endif
if(aiex .ge. econs) then
iclaq = 1
ntdcla = ntcabs
do iel = 1, ncel
if(w1(iel).gt.emax) then
xclaq = xyzcen(1,iel)
yclaq = xyzcen(2,iel)
zclaq = xyzcen(3,iel)
emax = w1(iel)
endif
enddo
I tried some modifications but I get floating point exception. How can i overcome this parallelism issue ?
Thanks