Skip to content

Commit ebe4c8f

Browse files
committed
Write out also receives
1 parent 770cf24 commit ebe4c8f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

message-chain-sendrecv/cpp/solution/chain-sendrecv.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ int main(int argc, char *argv[])
4747
MPI_COMM_WORLD, &status);
4848
printf("Sender: %d. Sent elements: %d. Tag: %d. Receiver: %d\n",
4949
myid, size, myid + 1, destination);
50+
printf("Receiver: %d. first element %d.\n",
51+
myid, receiveBuffer[0]);
5052

5153
// Finalize measuring the time and print it out
5254
t1 = MPI_Wtime();

message-chain-sendrecv/fortran/solution/chain-sendrecv.F90

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ program basic
4444
' Sent elements: ', size, &
4545
'. Tag: ', myid + 1, &
4646
'. Receiver: ', destination
47+
write(*,'(A10,I3,A,I3)') 'Receiver: ', myid, &
48+
' First element: ', receiveBuffer(1)
4749

4850
! Finalize measuring the time and print it out
4951
t1 = mpi_wtime()

0 commit comments

Comments
 (0)