        sum=localsum
        do k = 1, p-1
          if(nodeid().eq.k-1) snd(k, sum, real, k, 8)
          if(nodeid().eq.k) 
            call rcv(k, sum, real, k-1, 1)
            sum=sum+localsum
          endif
        enddo
