30 SUBROUTINE intload(ndim,nrows,nnz,nstart,rp,cval,aval,tempin,rint)
41 INTEGER :: ndim, nrows, nnz, nstart
42 INTEGER,
DIMENSION(nrows+1) :: rp
43 INTEGER,
DIMENSION(nnz) :: cval
44 REAL(kind=wp),
DIMENSION(nnz) :: aval
45 REAL(kind=wp),
DIMENSION(nrows) :: tempin
48 REAL(kind=wp),
DIMENSION(nrows) :: rint
51 REAL(kind=wp),
DIMENSION(ndim) :: temptemp
52 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: numtempfrom
53 REAL(kind=wp),
ALLOCATABLE,
DIMENSION(:) :: bufsnd
54 INTEGER ::
i,
j,
k,
m, counter1, counter2
55 REAL(kind=wp) :: tempval
56 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: req_rcv, req_snd
57 INTEGER,
ALLOCATABLE,
DIMENSION(:,:) :: stat_rcv, stat_snd
63 CALL mpi_barrier(rocstar_communicator,ierr)
64 ALLOCATE(req_rcv(1:nprocs))
65 ALLOCATE(req_snd(1:nprocs))
66 ALLOCATE(stat_snd(1:mpi_status_size,1:nprocs))
67 ALLOCATE(stat_rcv(1:mpi_status_size,1:nprocs))
68 ALLOCATE(numtempfrom(1:nprocs))
72 DO j = 1, mpi_status_size
79 CALL mpi_irecv(numtempfrom(
i),1, &
80 mpi_integer,
i-1,10,rocstar_communicator, &
87 CALL mpi_send(nrows,1,mpi_integer, &
88 i-1,10,rocstar_communicator,ierr)
91 CALL mpi_waitall(nprocs,req_rcv,stat_rcv,ierr)
103 CALL mpi_barrier(rocstar_communicator,ierr)
104 ALLOCATE(req_rcv(1:nprocs))
105 ALLOCATE(req_snd(1:nprocs))
106 ALLOCATE(stat_snd(1:mpi_status_size,1:nprocs))
107 ALLOCATE(stat_rcv(1:mpi_status_size,1:nprocs))
111 DO j = 1, mpi_status_size
116 ALLOCATE(frmproc(1:nprocs))
119 IF (
i-1 /= myid)
THEN
122 ALLOCATE(frmproc(
i)%rcvbuf(1:2*int(numtempfrom(
i))))
123 CALL mpi_irecv(frmproc(
i)%rcvbuf(1),2*int(numtempfrom(
i)), &
124 mpi_double_precision,
i-1,10,rocstar_communicator, &
131 IF (
i-1 /= myid)
THEN
135 ALLOCATE(bufsnd(1:2*lnumnp))
141 IF ((global2local(
j) /= -1) .AND. (nodeproc(global2local(
j)) == myid))
THEN
145 counter1 = counter1 + 1
146 bufsnd(2*counter1-1) =
j
147 bufsnd(2*counter1) = tempin(counter1)
152 CALL mpi_send(bufsnd,2*nrows,mpi_double_precision, &
153 i-1,10,rocstar_communicator,ierr)
157 CALL mpi_waitall(nprocs,req_rcv,stat_rcv,ierr)
171 IF ((global2local(
i) /= -1) .AND. (nodeproc(global2local(
i)) == myid))
THEN
172 temptemp(
i ) = tempin(
i - (nstart-1))
179 IF (
j-1 /= myid)
THEN
181 DO m = 1, numtempfrom(
j)
185 IF (int(frmproc(
j)%rcvbuf(2*
m-1)) ==
i)
THEN
186 temptemp(
i ) = frmproc(
j)%rcvbuf(2*
m)
193 IF (nprocs > 1)
DEALLOCATE(frmproc)
subroutine comp_row_vecmult(gndim, nrows1, nnz1, nstart1, rp1, cval1, aval1, vec, ans)
subroutine intload(ndim, nrows, nnz, nstart, rp, cval, aval, tempin, rint)