C-------------------------------------------------------------
C
C   NAME:
C        MAIN
C   PURPOSE:
C        This section of an HPF program running on nproc 
C        processors of the T3E shows how we call the 
C        Fortran 77 subroutine "send.f" from an HPF program.
C
C-------------------------------------------------------------

      program main

C     Build HPF interface block for communication with a
C     Fortran 77 subroutine, send(frnum)
      INTERFACE
      EXTRINSIC(f77_LOCAL) SUBROUTINE send (frnum)
         INTEGER, INTENT(IN) :: frnum
         END SUBROUTINE send
      END INTERFACE

C     Hydrodynamic code
C             .
C             .
C             .
C     Hydrodynamic code

C     Call Fortran 77 subroutine send(frnum)
      open(unit=50,form='unformatted',status='unknown',file=whichone)
      write(unit=50) rho
      close(unit=50)

C     Call Fortran 77 subroutine send(frnum)
      call send(frnum)
      frnum = frnum + 1

C     Hydrodynamic code
C             .
C             .
C             .
C     Hydrodynamic code


      stop
      end