From 464d6862b05aa46aa3c14db09442943d175c93ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Doblas=20Jim=C3=A9nez?= Date: Mon, 12 Apr 2021 14:38:10 +0200 Subject: [PATCH] Ex. 1 ping_pong instructions --- Exercises/ex_1/ping_pong/ping-pong.txt | 33 ++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Exercises/ex_1/ping_pong/ping-pong.txt diff --git a/Exercises/ex_1/ping_pong/ping-pong.txt b/Exercises/ex_1/ping_pong/ping-pong.txt new file mode 100644 index 0000000..4194f9b --- /dev/null +++ b/Exercises/ex_1/ping_pong/ping-pong.txt @@ -0,0 +1,33 @@ + +Exercise 'ping pong' +~~~~~~~~~~~~~~~~~~~~ + +- Write a program in which two processes repeatedly pass a message back and + forth. + +- Insert timing calls to measure the time taken for one message + (send+receive). + +- Investigate how the time taken varies with the size of the message. + +- Use message sizes 1, 2, 4, 8, 16, 32, ..., ~1 million + or 1, 10, 100, 1000, ..., 1 million + +- Loop over message sizes + +- In the loop time this block of code with MPI_Wtime() + + MPI_Send(...); + MPI_Recv(...); + +- Print out a table: message_size transfer_time + +- Extra task: produce a graphical plot with double logarithmic axes for + transfer_time(message_size) + +- Timers: + + C : double MPI_Wtime(void); + Fortran : real(8), external :: mpi_wtime() + + see also: MPI_Wtick()