	program sumtest
	PARAMETER (N=16)
	integer a(N) , al,l0
	real b(N) ,bl,l1
	double precision c(N),cl,l2
	complex d(N) , dl,l3
	logical e(N)
!HPF$   PROCESSORS P(4)
!HPF$   DISTRIBUTE  (BLOCK) ONTO P ::  a,b,c,d,e
!!HPF$   out_of_core	a
	

	forall (i= 1:N) 
		a(i)=i
		b(i)=i+1
	end forall
!	print *, 'a=',(a(i),i=1,N) 
!	print *, 'b=',(b(i),i=1,N)
!	print *, 'c=',(c(i),i=1,N)
!	print *, 'd=',(d(i),i=1,N)

!	CALL pcrc_clock(0)
	al=sum(a)
!	CALL pcrc_clock(1)
	bl=sum(b)

	PRINT *,"SUM(a) , MASK=a>2"
!	CALL pcrc_clock(0)
	do i=1,2
	l0=sum(a,mask=a>2)
	enddo
!	CALL pcrc_clock(1)
	end 
