Cube - communication  for  MPI
C 
C  Basic-Routine for Inner-Cube-Communication
C    Send N words from X to processor IWHO
C
        SUBROUTINE Send_Node_1(N,X,IWHO)

        INCLUDE 'include/trnet.inc'
        INCLUDE 'include/times.inc'
        INCLUDE 'mpif.h'
#ifdef SECNDS_EXTERNAL
	EXTERNAL secnds
#endif

        INTEGER   INFO
CPVM    Dimension X(*)
        parameter(ibyte=4)
        Integer X(*)

        if (n.gt.0) then
	   call MPI_Send (x, n,MPI_INTEGER,iwho,ich,MPI_COMM_WORLD,ierr)
        endif
        Toutput=Toutput + secnds(t)
        RETURN
        END
C
C  Basic-Routine for Inner-Cube-Communication
C  Receive  N words over Link NrLink
C
        SUBROUTINE Recv_Node_1(N,X,IWHO)

        INCLUDE 'include/trnet.inc'
        INCLUDE 'include/times.inc'
        INCLUDE 'mpif.h'
#ifdef SECNDS_EXTERNAL
	EXTERNAL secnds
#endif
        INTEGER   INFO
        integer X(*)
	integer status(MPI_STATUS_SIZE)
        parameter(ibyte=4)

        t=secnds(0.0)

        if (n.gt.0) then
	   call MPI_Recv (X, N, MPI_INTEGER, iwho, MPI_ANY_TAG,
     *          MPI_COMM_WORLD, status, ierr)
        endif
        Tinput=Tinput + secnds(t)
        RETURN
        END
