From: degomme Date: Wed, 8 Jun 2016 15:01:02 +0000 (+0200) Subject: Finally test for timing injection in MPI_Send, MPI_Isend, MPI_Recv X-Git-Tag: v3_14~1027 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/3b1803a87beb62978480b50a85bcb8dbeba9338e Finally test for timing injection in MPI_Send, MPI_Isend, MPI_Recv MPI_Irecv timings are injected in the consecutive MPI_Wait, actually --- diff --git a/teshsuite/smpi/pt2pt-dsend/pt2pt-dsend.c b/teshsuite/smpi/pt2pt-dsend/pt2pt-dsend.c index 7244ec4a2c..7bdec96528 100644 --- a/teshsuite/smpi/pt2pt-dsend/pt2pt-dsend.c +++ b/teshsuite/smpi/pt2pt-dsend/pt2pt-dsend.c @@ -13,16 +13,16 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(dsend,"the dsend test"); int main(int argc, char *argv[]) { int rank; - int data=11; + int32_t data=11; MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Request r; if (rank==1) { data=22; - MPI_Send(&data,1,MPI_BYTE,(rank+1)%2,666,MPI_COMM_WORLD); + MPI_Send(&data,1,MPI_INT32_T,(rank+1)%2,666,MPI_COMM_WORLD); } else { - MPI_Recv(&data,1,MPI_BYTE,MPI_ANY_SOURCE,666,MPI_COMM_WORLD,NULL); + MPI_Recv(&data,1,MPI_INT32_T,MPI_ANY_SOURCE,666,MPI_COMM_WORLD,NULL); if (data !=22) { printf("rank %d: Damn, data does not match (got %d)\n",rank, data); } @@ -30,10 +30,10 @@ int main(int argc, char *argv[]) { if (rank==1) { data=22; - MPI_Isend(&data,1,MPI_BYTE,(rank+1)%2,666,MPI_COMM_WORLD, &r); + MPI_Isend(&data,1,MPI_INT32_T,(rank+1)%2,666,MPI_COMM_WORLD, &r); MPI_Wait(&r, MPI_STATUS_IGNORE); } else { - MPI_Irecv(&data,1,MPI_BYTE,MPI_ANY_SOURCE,666,MPI_COMM_WORLD,&r); + MPI_Irecv(&data,1,MPI_INT32_T,MPI_ANY_SOURCE,666,MPI_COMM_WORLD,&r); MPI_Wait(&r, MPI_STATUS_IGNORE); if (data !=22) { printf("rank %d: Damn, data does not match (got %d)\n",rank, data); diff --git a/teshsuite/smpi/pt2pt-dsend/pt2pt-dsend.tesh b/teshsuite/smpi/pt2pt-dsend/pt2pt-dsend.tesh index 32f88d6cb3..75655e2078 100644 --- a/teshsuite/smpi/pt2pt-dsend/pt2pt-dsend.tesh +++ b/teshsuite/smpi/pt2pt-dsend/pt2pt-dsend.tesh @@ -6,6 +6,24 @@ $ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile -platform ../../. > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP-gamma' to '4194304' > [Jupiter:1:(2) 0.000000] [dsend/INFO] rank 1: data exchanged -> [Tremblay:0:(1) 0.002945] [dsend/INFO] rank 0: data exchanged +> [Tremblay:0:(1) 0.005890] [dsend/INFO] rank 0: data exchanged +> [rank 0] -> Tremblay +> [rank 1] -> Jupiter + +p Test dsend with timings injection +p message size is 4 bytes +p process 1 will finish at 0.5+2*4 (send) + 1+0.1*4 (isend) = 9.9s +p process 2 will finish at 0.5+2*4 (time before first send) + 2*(1+0.5*4) (recv+irecv) + 0.005890 (network time, same as before) = 14.505890s +! setenv LD_LIBRARY_PATH=../../lib +! output sort +$ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 2 ${bindir:=.}/pt2pt-dsend -q --log=smpi_kernel.thres:warning --cfg=smpi/or:0:1:0.5 --cfg=smpi/os:0:0.5:2 --cfg=smpi/ois:0:1:0.1 +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/ois' to '0:1:0.1' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/or' to '0:1:0.5' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/os' to '0:0.5:2' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP-gamma' to '4194304' +> [Jupiter:1:(2) 9.900000] [dsend/INFO] rank 1: data exchanged +> [Tremblay:0:(1) 14.505890] [dsend/INFO] rank 0: data exchanged > [rank 0] -> Tremblay > [rank 1] -> Jupiter