CMAX: [Version 1.0 (6/22/93)]
CMAX: ----------------------------------------------------
CMAX: Transformation of MIRHEAPY from mirheapy.f
CMAX: ----------------------------------------------------
      SUBROUTINE mirheapy_v1(test,iheap,os,ln,n)
C  MIN-REAL-HEAP-CREATION
cmax: Changed argument IHEAP to passed with index
      INTEGER os
      INTEGER ln
      INTEGER iheap(1-os+1:ln+1-os), n, i
      REAL TEST (N)
!hpf$ distribute iheap(block)
!hpf$ distribute test(block)
C  INITIALIZE HEAP POINTERS
      FORALL (i = 1:n) iheap(i) = i
C  BUILD UP EXISTING HEAPS STARTING WITH THE BOTTOM LEAVES
      DO 7002 i = n / 2 , 1 , (-1)
        CALL mirheapj_v1(test,iheap,os,ln,i,n)
  200   CONTINUE
 7002 CONTINUE
      RETURN
      END
CMAX: ----------------------------------------------------
