X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f3b7e5f4b4d7c87ee3e8827313ec966ea8fc8387..09392faf42646e631a4e42553e901410eb3e488e:/teshsuite/smpi/macro-sample/macro-sample.c diff --git a/teshsuite/smpi/macro-sample/macro-sample.c b/teshsuite/smpi/macro-sample/macro-sample.c index 19aafb06bb..c777e7b11a 100644 --- a/teshsuite/smpi/macro-sample/macro-sample.c +++ b/teshsuite/smpi/macro-sample/macro-sample.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2009-2020. The SimGrid Team. +/* Copyright (c) 2009-2023. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -43,7 +43,23 @@ int main(int argc, char *argv[]) d = compute(2.0); } + //tagged version, should differentiate between two different calls to the same kernel and run calibration even on the second one + for (int tag=0; tag < 4; tag++){ + char ctag [12]; + //run twice with the same tag, test should skip 1 and 3, as they were already benched. + sprintf(ctag, "%d", tag - tag%2); + SMPI_SAMPLE_GLOBAL_TAG(int i = 0, i < 500, i++, 2, 0.1, ctag){ + if (verbose) + fprintf(stderr, "(%12.6f) [rank:%d]", MPI_Wtime(), rank); + else + fprintf(stderr, "(0)"); + fprintf(stderr, " Run the computation %d with tag %d\n", tag, tag- tag%2); + d = compute(2.0); + } + } + n = 0; + //Use 0 as max iter, but one will always be performed by design. SMPI_SAMPLE_LOCAL (int i = 0, i < 5, i++,0, 0.1){ if (verbose || n < 2) { n++;