1 /* Copyright (c) 2011, 2014. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
7 /**--------- <copy/paste C code snippet in surf/network.c> -------------
9 * ./regression2.py ./pingpong-in.dat 0.15 30 2 2.4e-5 1.25e8
12 plot "./pingpong-in.dat" using 1:2 with lines title "data", \
13 (x >= 65472) ? 0.00850436*x+558.894 : \
14 (x >= 15424) ? 0.0114635*x+167.446 : \
15 (x >= 9376) ? 0.0136219*x+124.464 : \
16 (x >= 5776) ? 0.00735707*x+105.022 : \
17 (x >= 3484) ? 0.0103235*x+90.2886 : \
18 (x >= 1426) ? 0.0131384*x+77.3159 : \
19 (x >= 732) ? 0.0233927*x+93.6146 : \
20 (x >= 257) ? 0.0236608*x+93.7637 : \
21 (x >= 127) ? 0.0246645*x+94.0447 : \
22 (x >= 64) ? 0.037963*x+93.0877 : \
23 (x >= 0) ? 2.22507e-308*x+98.0633 : \
24 1.0 with lines title "piecewise function"
25 *-------------------------------------------------------------------*/
27 static double smpi_bandwidth_factor(double size)
30 if (size >= 65472) return 0.940694;
31 if (size >= 15424) return 0.697866;
32 if (size >= 9376) return 0.58729;
33 if (size >= 5776) return 1.08739;
34 if (size >= 3484) return 0.77493;
35 if (size >= 1426) return 0.608902;
36 if (size >= 732) return 0.341987;
37 if (size >= 257) return 0.338112;
38 if (size >= 127) return 0.324353;
39 if (size >= 64) return 0.210731;
40 if (size >= 0) return 3.59539e+305;
44 static double smpi_latency_factor(double size)
47 if (size >= 65472) return 11.6436;
48 if (size >= 15424) return 3.48845;
49 if (size >= 9376) return 2.59299;
50 if (size >= 5776) return 2.18796;
51 if (size >= 3484) return 1.88101;
52 if (size >= 1426) return 1.61075;
53 if (size >= 732) return 1.9503;
54 if (size >= 257) return 1.95341;
55 if (size >= 127) return 1.95926;
56 if (size >= 64) return 1.93933;
57 if (size >= 0) return 2.04299;
61 /**--------- <copy/paste C code snippet in surf/network.c> -----------*/