Parallelism problem during creating a plan using "usdpst".

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
rezki

Parallelism problem during creating a plan using "usdpst".

Post by rezki »

Hello,
I am using 2.0.2 version and would like to create a plan bounded by two points (x1, y1, z1) and (x2, y2, z3).

When using one processor , the code works finely. However, with more than one processor, it doesn't work.

Code: Select all

if (ipart .eq. 1) then

    nommai = 'VolumeY'
    npoint = 200
    mpoint = 50
    iel1   = -999
    irang1 = -999

    x1 = 0.001d0
    x2 = 0.04d0
    y1 = 0.016d0
    y2 = 0.015d0
    z1 = 0.d0
    z2 = 0.044d0
    nlcel = 0
   
    a = (y2-y1)/(x2-x1)
    b = y1-a*x1
       do jj = 1, mpoint
          xyz3 = z1+float(jj-1)/float(mpoint-1)*z2
          do ii = 1, npoint     
            xyz1 = x1+float(ii-1)/float(npoint-1)*x2
            xyz2 = a*xyz1+b

            call findpt(ncelet, ncel, xyzcen, xyz1, xyz2, xyz3, iel, irangv)
            !==========

            if ((iel.ne.iel1).or.(irangv.ne.irang1)) then
             iel1   = iel
             irang1 = irangv
              if (xyzcen(1,iel).gt.x1 .and. xyzcen(1,iel).lt.x2) then
                nlcel = nlcel + 1
                lstcel(nlcel)= iel
              endif
            endif
         enddo
       enddo
endif
Do you have any idea how to solve this parallelism problem ?!
Best regards

RC
Jacques Fontaine
Posts: 118
Joined: Mon Feb 20, 2012 2:07 pm

Re: Parallelism problem during creating a plan using "usdpst

Post by Jacques Fontaine »

Hello,

Why you did not use getcel or getfac function ?
rezki

Re: Parallelism problem during creating a plan using "usdpst

Post by rezki »

Thanks for your help.

the problem is solved by adding the following instruction:

Code: Select all

if (irangp.eq.irangv) then  
  nlcel = nlcel + 1
  lstcel(nlcel)= iel
endif
It allows the processor to increment its cells list.

Best regards.

RC
Post Reply