Hi everyone;

I had a problem with paralellizing of fortran program here to share. My program had a three nested big do loops which were taking too much time to run. So, I decided to paralellize outside do loop (n=1,nszf) and then use it in some supercomuters in my university. My current Dell xps 8500 Windows 7 ultimate PC has 8 threads. here is that part of my program:

!$omp parallel private(i,j,k,n,l,c) shared (nszf, nband) reduction (- : sk, r1)

!$omp do

**do** **300** n=1,nszf ! nszf=139020

i=n

**do** **290** l=2,nband ! nband=7000

i=i+1

if (sk(n,l)) 240,290,240

240 c = sk(n,l)/sk(n,1)

J=0

** do** **270** k=l,nband

j=j+1

if(sk(n,k)) 260,270,260

260 sk(i,j)=sk(i,j)-c*sk(n,k)

** 270** **continue**

280 sk(n,l)=c

r1(i)=r1(i)-c*r1(n)

**290** **continue**

** 300** r1(n)=r1(n)/sk(n,1)

!$omp end do

!$omp end parallel

Without omp clauses program runs well, but using paralell gives some errors. I think program have problem in private, shared, and reduction clauses parts. **sk **is a stiffness matrix and** r1 is **force array. It should be noted that this program is the same famous Gaussian elimination method to solve a unknown in a matrix. Is it true to use reduction for matrix and arrays this way here? please let me know where the problem is?

Thanks