      program hostsend

c     Note: This program should only demonstrate the functionality, but
c           it is a very inefficient program

      parameter (N=100)
      real ha (N), a(N), s
cmf$  layout ha(:host)

c     this loop is only executed by the host

      do i = 1, N
         ha(i) = i
      end do

      do i = 1, N
         x = ha(i)   ! host_send, host_recv
         a(i) = x    ! have_i_value
      end do

      s = sum (a)
      print *, 'Result is ', s, ' should be ', N * (N+1) / 2

      end
