jx=1 (Counter variable)
! squeeze out zeros from k
!$omp parallel do
do ix=1,tdof
do iy=1,tdof
if (iy.ge.ix) then ! Upper triangular elements
if ((abs(K(ix,iy))-0.d0)>1e-10) then ! Non zero entries
irndum(jx)=ix
jcndum(jx)=iy
Adum(jx)=K(ix,iy)
jx=jx+1
endif
endif
enddo
enddo
!$omp end parallel do
Hi all, in the above code is filtering the non-zero elements in the upper triangular portion of the matrix. The value of tdof is large (40k) so i want to parallelize using openmp. Any suggestions on how to categorize the variables as private or shared especially the jx variable. the arrays irndum,jcndum,Adum are allocatable arrays and I assigned some size in prior. Thanks in advance.