From 2589a5617fe05b8b2aaf2bc9bb998e6ad4271518 Mon Sep 17 00:00:00 2001 From: Arnaud Legrand Date: Fri, 4 Apr 2014 01:48:11 +0200 Subject: [PATCH] Distinguish between time precision and sharing precision. - Set up two distinct configuration variables and use them in the right places - Set them to legacy values especially in smpirun - Revalidate tesh files accordingly (only the "Configuration change" message) --- examples/smpi/energy/energy.tesh | 1 + examples/smpi/energy/f77/energy.tesh | 1 + examples/smpi/energy/f90/energy.tesh | 1 + examples/smpi/replay/smpi_replay.tesh | 10 ++++++++++ examples/smpi/tracing/smpi_traced.tesh | 6 ++++++ src/include/surf/maxmin.h | 15 ++++++++------- src/simgrid/sg_config.c | 12 +++++++++++- src/smpi/smpi_bench.c | 4 ++-- src/smpi/smpirun.in | 2 +- src/surf/cpu_cas01.cpp | 2 +- src/surf/cpu_interface.cpp | 4 ++-- src/surf/cpu_ti.cpp | 4 ++-- src/surf/fair_bottleneck.cpp | 4 ++-- src/surf/lagrange.cpp | 6 +++--- src/surf/maxmin.cpp | 11 ++++++----- src/surf/network_cm02.cpp | 6 +++--- src/surf/network_constant.cpp | 2 +- src/surf/storage_n11.cpp | 2 +- src/surf/surf_interface.cpp | 4 ++-- src/surf/surf_interface.hpp | 4 ++-- src/surf/workstation_ptask_L07.cpp | 4 ++-- teshsuite/smpi/TI_output.tesh | 4 ++++ teshsuite/smpi/bcast.tesh | 3 +++ teshsuite/smpi/hvector.tesh | 1 + teshsuite/smpi/indexed.tesh | 1 + teshsuite/smpi/pt2pt.tesh | 2 ++ teshsuite/smpi/reduce.tesh | 3 +++ teshsuite/smpi/shared.tesh | 1 + teshsuite/smpi/struct.tesh | 1 + teshsuite/smpi/vector.tesh | 1 + testsuite/surf/lmm_usage.c | 4 ++-- 31 files changed, 87 insertions(+), 39 deletions(-) diff --git a/examples/smpi/energy/energy.tesh b/examples/smpi/energy/energy.tesh index c77fdd998a..f8b74fddb6 100644 --- a/examples/smpi/energy/energy.tesh +++ b/examples/smpi/energy/energy.tesh @@ -1,6 +1,7 @@ p Test smpi bindings for dvfs functions (C example) $ ../../../smpi_script/bin/smpirun -np 2 -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/platform.xml --cfg=smpi/cpu_threshold:-1 ${bindir:=.}/se --cfg=plugin:Energy --log=smpi_kernel.thres:warning > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1' diff --git a/examples/smpi/energy/f77/energy.tesh b/examples/smpi/energy/f77/energy.tesh index c23f3f8a53..9173c490ef 100644 --- a/examples/smpi/energy/f77/energy.tesh +++ b/examples/smpi/energy/f77/energy.tesh @@ -2,6 +2,7 @@ p Test smpi bindings for dvfs functions (Fortran 77 example) ! output sort 1 $ ../../../smpi_script/bin/smpirun -np 2 -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/platform.xml --cfg=smpi/cpu_threshold:-1 ${bindir:=.}/f77/sef --cfg=plugin:Energy --log=smpi_kernel.thres:warning > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1' diff --git a/examples/smpi/energy/f90/energy.tesh b/examples/smpi/energy/f90/energy.tesh index c39d8bd560..799dffd98f 100644 --- a/examples/smpi/energy/f90/energy.tesh +++ b/examples/smpi/energy/f90/energy.tesh @@ -2,6 +2,7 @@ p Test smpi bindings for dvfs functions (Fortran 90 example) ! output sort 1 $ ../../../smpi_script/bin/smpirun -np 2 -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/platform.xml --cfg=smpi/cpu_threshold:-1 ${bindir:=.}/f90/sef90 --cfg=plugin:Energy --log=smpi_kernel.thres:warning > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1' diff --git a/examples/smpi/replay/smpi_replay.tesh b/examples/smpi/replay/smpi_replay.tesh index 4cbef48818..048b46c61f 100644 --- a/examples/smpi/replay/smpi_replay.tesh +++ b/examples/smpi/replay/smpi_replay.tesh @@ -10,6 +10,7 @@ $ mkfile replay/one_trace $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/cpu_threshold:-1 -np 3 -platform ${srcdir:=.}/replay/replay_platform.xml -hostfile ${srcdir:=.}/hostfile ./smpi_replay replay/one_trace --log=smpi_kernel.thres:warning > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1' @@ -40,6 +41,7 @@ $ mkfile replay/one_trace $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=no_loc --cfg=tracing:yes --cfg=tracing/smpi:yes --cfg=tracing/smpi/computing:yes --cfg=smpi/cpu_threshold:-1 -np 3 -platform ${srcdir:=.}/replay/replay_platform.xml -hostfile ${srcdir:=.}/hostfile ./smpi_replay replay/one_trace --log=smpi_kernel.thres:warning > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing' to 'yes' @@ -232,6 +234,7 @@ $ mkfile ./split_traces_tesh $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/cpu_threshold:-1 -np 2 -platform ${srcdir:=.}/replay/replay_platform.xml -hostfile ${srcdir:=.}/hostfile ./smpi_replay ./split_traces_tesh --log=smpi_kernel.thres:warning > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1' @@ -255,6 +258,7 @@ $ mkfile replay/one_trace $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/cpu_threshold:-1 -np 3 -platform ${srcdir:=.}/replay/replay_platform.xml -hostfile ${srcdir:=.}/hostfile ./smpi_replay replay/one_trace --log=smpi_kernel.thres:warning > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1' @@ -278,6 +282,7 @@ $ mkfile replay/one_trace $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/cpu_threshold:-1 -np 3 -platform ${srcdir:=.}/replay/replay_platform.xml -hostfile ${srcdir:=.}/hostfile ./smpi_replay replay/one_trace --log=smpi_kernel.thres:warning > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1' @@ -306,6 +311,7 @@ $ mkfile replay/one_trace $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/cpu_threshold:-1 -np 3 -platform ${srcdir:=.}/replay/replay_platform.xml -hostfile ${srcdir:=.}/hostfile ./smpi_replay replay/one_trace --log=smpi_kernel.thres:warning > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1' @@ -327,6 +333,7 @@ $ mkfile replay/one_trace $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/cpu_threshold:-1 -np 3 -platform ${srcdir:=.}/replay/replay_platform.xml -hostfile ${srcdir:=.}/hostfile ./smpi_replay replay/one_trace --log=smpi_kernel.thres:warning > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1' @@ -345,6 +352,7 @@ $ mkfile replay/one_trace $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/cpu_threshold:-1 -np 3 -platform ${srcdir:=.}/replay/replay_platform.xml -hostfile ${srcdir:=.}/hostfile ./smpi_replay replay/one_trace --log=smpi_kernel.thres:warning > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1' @@ -363,6 +371,7 @@ $ mkfile replay/one_trace $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/cpu_threshold:-1 -np 3 -platform ${srcdir:=.}/replay/replay_platform.xml -hostfile ${srcdir:=.}/hostfile ./smpi_replay replay/one_trace --log=smpi_kernel.thres:warning > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1' @@ -381,6 +390,7 @@ $ mkfile replay/one_trace $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/cpu_threshold:-1 -np 3 -platform ${srcdir:=.}/replay/replay_platform.xml -hostfile ${srcdir:=.}/hostfile ./smpi_replay replay/one_trace --log=smpi_kernel.thres:warning > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1' diff --git a/examples/smpi/tracing/smpi_traced.tesh b/examples/smpi/tracing/smpi_traced.tesh index a12e36feb5..70a45c4c8e 100644 --- a/examples/smpi/tracing/smpi_traced.tesh +++ b/examples/smpi/tracing/smpi_traced.tesh @@ -10,6 +10,7 @@ $ ../../smpi_script/bin/smpirun -trace -trace-resource -trace-file smpi_traced.t > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/categorized' to 'yes' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/uncategorized' to 'yes' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s) @@ -22,6 +23,7 @@ $ ../../smpi_script/bin/smpirun -trace -trace-resource -trace-file smpi_traced.t > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/categorized' to 'yes' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/uncategorized' to 'yes' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s) @@ -29,6 +31,7 @@ $ ../../smpi_script/bin/smpirun -trace -trace-resource -trace-file smpi_traced.t p Testing without trace parameters $ ../../smpi_script/bin/smpirun -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../msg/tracing/platform.xml -np 3 ./smpi_traced_simple --log=smpi_kernel.thres:warning > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s) @@ -40,6 +43,7 @@ $ ../../smpi_script/bin/smpirun -trace -trace-grouped -trace-file smpi_traced.tr > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi' to 'yes' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi/group' to 'yes' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s) @@ -54,6 +58,7 @@ $ ../../smpi_script/bin/smpirun -trace -trace-resource -trace-viva -trace-file s > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'viva/categorized' to 'smpi_cat.plist' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'viva/uncategorized' to 'smpi_uncat.plist' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1' @@ -63,6 +68,7 @@ $ ../../smpi_script/bin/smpirun -trace -trace-resource -trace-viva -trace-file s p Testing with parameters but without activating them with the safe switch (-trace) $ ../../smpi_script/bin/smpirun -trace-resource -trace-viva -trace-file smpi_traced.trace -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../msg/tracing/platform.xml -np 3 ./smpi_traced_simple --log=smpi_kernel.thres:warning > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s) diff --git a/src/include/surf/maxmin.h b/src/include/surf/maxmin.h index 48afee6309..791be489af 100644 --- a/src/include/surf/maxmin.h +++ b/src/include/surf/maxmin.h @@ -86,22 +86,23 @@ */ extern double sg_maxmin_precision; -#define MAXMIN_PRECISION sg_maxmin_precision -static XBT_INLINE void double_update(double *variable, double value) +extern double sg_surf_precision; + +static XBT_INLINE void double_update(double *variable, double value, double precision) { *variable -= value; - if (*variable < MAXMIN_PRECISION) + if (*variable < precision) *variable = 0.0; } -static XBT_INLINE int double_positive(double value) +static XBT_INLINE int double_positive(double value, double precision) { - return (value > MAXMIN_PRECISION); + return (value > precision); } -static XBT_INLINE int double_equals(double value1, double value2) +static XBT_INLINE int double_equals(double value1, double value2, double precision) { - return (fabs(value1 - value2) < MAXMIN_PRECISION); + return (fabs(value1 - value2) < precision); } SG_BEGIN_DECL() diff --git a/src/simgrid/sg_config.c b/src/simgrid/sg_config.c index ad4794faa9..818aad91bd 100644 --- a/src/simgrid/sg_config.c +++ b/src/simgrid/sg_config.c @@ -258,6 +258,11 @@ static void _sg_cfg_cb__maxmin_precision(const char* name, int pos) sg_maxmin_precision = xbt_cfg_get_double(_sg_cfg_set, name); } +static void _sg_cfg_cb__surf_precision(const char* name, int pos) +{ + sg_surf_precision = xbt_cfg_get_double(_sg_cfg_set, name); +} + static void _sg_cfg_cb__sender_gap(const char* name, int pos) { sg_sender_gap = xbt_cfg_get_double(_sg_cfg_set, name); @@ -534,8 +539,13 @@ void sg_config_init(int *argc, char **argv) xbt_cfgelm_double, 1, 1, _sg_cfg_cb__tcp_gamma, NULL); xbt_cfg_setdefault_double(_sg_cfg_set, "network/TCP_gamma", 4194304.0); + xbt_cfg_register(&_sg_cfg_set, "surf/precision", + "Numerical precision used when updating simulation times (hence this value is expressed in seconds)", + xbt_cfgelm_double, 1, 1, _sg_cfg_cb__surf_precision, NULL); + xbt_cfg_setdefault_double(_sg_cfg_set, "surf/precision", 0.00001); + xbt_cfg_register(&_sg_cfg_set, "maxmin/precision", - "Numerical precision used when updating simulation models (epsilon in double comparisons)", + "Numerical precision used when computing resource sharing (hence this value is expressed in ops/sec or bytes/sec)", xbt_cfgelm_double, 1, 1, _sg_cfg_cb__maxmin_precision, NULL); xbt_cfg_setdefault_double(_sg_cfg_set, "maxmin/precision", 0.00001); diff --git a/src/smpi/smpi_bench.c b/src/smpi/smpi_bench.c index a9d1e42f57..9bd3882fd9 100644 --- a/src/smpi/smpi_bench.c +++ b/src/smpi/smpi_bench.c @@ -244,11 +244,11 @@ int smpi_gettimeofday(struct timeval *tv) return 0; } -extern double sg_maxmin_precision; +extern double sg_surf_precision; unsigned long long smpi_rastro_resolution (void) { smpi_bench_end(); - double resolution = (1/sg_maxmin_precision); + double resolution = (1/sg_surf_precision); smpi_bench_begin(); return (unsigned long long)resolution; } diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index 90c0d1e4ce..3a015ffbda 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -21,7 +21,7 @@ NETWORK_BANDWIDTH="${DEFAULT_NETWORK_BANDWIDTH}" NETWORK_LATENCY="${DEFAULT_NETWORK_LATENCY}" POWER="${DEFAULT_POWER}" -SIMOPTS="--cfg=maxmin/precision:1e-9 --cfg=network/model:SMPI --cfg=network/TCP_gamma:4194304" +SIMOPTS="--cfg=maxmin/precision:1e-9 --cfg=surf/precision:1e-9 --cfg=network/model:SMPI --cfg=network/TCP_gamma:4194304" #usage to print the way this script should be called usage () { diff --git a/src/surf/cpu_cas01.cpp b/src/surf/cpu_cas01.cpp index c746e9a836..a66bacad37 100644 --- a/src/surf/cpu_cas01.cpp +++ b/src/surf/cpu_cas01.cpp @@ -315,7 +315,7 @@ CpuActionPtr CpuCas01::execute(double size) CpuActionPtr CpuCas01::sleep(double duration) { if (duration > 0) - duration = MAX(duration, MAXMIN_PRECISION); + duration = MAX(duration, sg_surf_precision); XBT_IN("(%s,%g)", getName(), duration); CpuCas01ActionPtr action = new CpuCas01Action(getModel(), 1.0, getState() != SURF_RESOURCE_ON, diff --git a/src/surf/cpu_interface.cpp b/src/surf/cpu_interface.cpp index 246f48ff16..652259da77 100644 --- a/src/surf/cpu_interface.cpp +++ b/src/surf/cpu_interface.cpp @@ -36,7 +36,7 @@ void CpuModel::updateActionsStateLazy(double now, double /*delta*/) { CpuActionPtr action; while ((xbt_heap_size(getActionHeap()) > 0) - && (double_equals(xbt_heap_maxkey(getActionHeap()), now))) { + && (double_equals(xbt_heap_maxkey(getActionHeap()), now, sg_surf_precision))) { action = static_cast(static_cast(xbt_heap_pop(getActionHeap()))); XBT_CDEBUG(surf_kernel, "Something happened to action %p", action); #ifdef HAVE_TRACING @@ -226,7 +226,7 @@ void CpuAction::updateRemainingLazy(double now) if (m_remains > 0) { XBT_CDEBUG(surf_kernel, "Updating action(%p): remains was %f, last_update was: %f", this, m_remains, m_lastUpdate); - double_update(&(m_remains), m_lastValue * delta); + double_update(&(m_remains), m_lastValue * delta, sg_maxmin_precision*sg_surf_precision); #ifdef HAVE_TRACING if (TRACE_is_enabled()) { diff --git a/src/surf/cpu_ti.cpp b/src/surf/cpu_ti.cpp index fc07dd59c7..c4bf40422c 100644 --- a/src/surf/cpu_ti.cpp +++ b/src/surf/cpu_ti.cpp @@ -148,7 +148,7 @@ double CpuTiTrace::integrateSimplePoint(double a) ("a %f ind %d integral %f ind + 1 %f ind %f time +1 %f time %f", a, ind, integral, p_integral[ind + 1], p_integral[ind], p_timePoints[ind + 1], p_timePoints[ind]); - double_update(&a_aux, p_timePoints[ind]); + double_update(&a_aux, p_timePoints[ind], sg_maxmin_precision*sg_surf_precision); if (a_aux > 0) integral += ((p_integral[ind + 1] - @@ -835,7 +835,7 @@ CpuActionPtr CpuTi::execute(double size) CpuActionPtr CpuTi::sleep(double duration) { if (duration > 0) - duration = MAX(duration, MAXMIN_PRECISION); + duration = MAX(duration, sg_surf_precision); XBT_IN("(%s,%g)", getName(), duration); CpuTiActionPtr action = new CpuTiAction(static_cast(getModel()), 1.0, getState() != SURF_RESOURCE_ON, this); diff --git a/src/surf/fair_bottleneck.cpp b/src/surf/fair_bottleneck.cpp index 1e9c3f79fb..2affd8dcd4 100644 --- a/src/surf/fair_bottleneck.cpp +++ b/src/surf/fair_bottleneck.cpp @@ -146,7 +146,7 @@ void bottleneck_solve(lmm_system_t sys) cnst, cnst->remaining, elem->variable, elem->variable->mu); double_update(&(cnst->remaining), - elem->value * elem->variable->mu); + elem->value * elem->variable->mu, sg_maxmin_precision); } else { XBT_DEBUG ("\tNon-Shared variable. Update constraint usage of %p (%g) with variable %p by %g", @@ -158,7 +158,7 @@ void bottleneck_solve(lmm_system_t sys) XBT_DEBUG("\tUpdate constraint %p (%g) by %g", cnst, cnst->remaining, cnst->usage); - double_update(&(cnst->remaining), cnst->usage); + double_update(&(cnst->remaining), cnst->usage, sg_maxmin_precision); } XBT_DEBUG("\tRemaining for %p : %g", cnst, cnst->remaining); diff --git a/src/surf/lagrange.cpp b/src/surf/lagrange.cpp index c62055b5c3..64fc0ad39a 100644 --- a/src/surf/lagrange.cpp +++ b/src/surf/lagrange.cpp @@ -63,7 +63,7 @@ static int __check_feasible(xbt_swag_t cnst_list, xbt_swag_t var_list, tmp += var->value; } - if (double_positive(tmp - cnst->bound)) { + if (double_positive(tmp - cnst->bound, sg_maxmin_precision)) { if (warn) XBT_WARN ("The link (%p) is over-used. Expected less than %f and got %f", @@ -84,7 +84,7 @@ static int __check_feasible(xbt_swag_t cnst_list, xbt_swag_t var_list, XBT_DEBUG("Checking feasability for variable (%p): sat = %f mu = %f", var, var->value - var->bound, var->mu); - if (double_positive(var->value - var->bound)) { + if (double_positive(var->value - var->bound, sg_maxmin_precision)) { if (warn) XBT_WARN ("The variable (%p) is too large. Expected less than %f and got %f", @@ -171,7 +171,7 @@ void lagrange_solve(lmm_system_t sys) * Lagrange Variables. */ int max_iterations = 100; - double epsilon_min_error = MAXMIN_PRECISION; + double epsilon_min_error = 0.00001; /* this is the precision on the objective function so it's none of the configurable values and this value is the legacy one */ double dichotomy_min_error = 1e-14; double overall_modification = 1; diff --git a/src/surf/maxmin.cpp b/src/surf/maxmin.cpp index 8f885199e9..b40d829963 100644 --- a/src/surf/maxmin.cpp +++ b/src/surf/maxmin.cpp @@ -21,6 +21,7 @@ typedef struct s_dyn_light { } s_dyn_light_t, *dyn_light_t; XBT_EXPORT_NO_IMPORT(double) sg_maxmin_precision = 0.00001; +XBT_EXPORT_NO_IMPORT(double) sg_surf_precision = 0.00001; static void *lmm_variable_mallocator_new_f(void); static void lmm_variable_mallocator_free_f(void *var); @@ -561,7 +562,7 @@ void lmm_print(lmm_system_t sys) } XBT_DEBUG("%s", trace_buf); trace_buf[0] = '\000'; - xbt_assert(!double_positive(sum - cnst->bound), + xbt_assert(!double_positive(sum - cnst->bound, sg_maxmin_precision), "Incorrect value (%f is not smaller than %f): %g", sum, cnst->bound, sum - cnst->bound); } @@ -573,7 +574,7 @@ void lmm_print(lmm_system_t sys) if (var->bound > 0) { XBT_DEBUG("'%d'(%f) : %f (<=%f)", var->id_int, var->weight, var->value, var->bound); - xbt_assert(!double_positive(var->value - var->bound), + xbt_assert(!double_positive(var->value - var->bound, sg_maxmin_precision), "Incorrect value (%f is not smaller than %f", var->value, var->bound); } else { @@ -724,8 +725,8 @@ void lmm_solve(lmm_system_t sys) elem = &var->cnsts[i]; cnst = elem->constraint; if (cnst->shared) { - double_update(&(cnst->remaining), elem->value * var->value); - double_update(&(cnst->usage), elem->value / var->weight); + double_update(&(cnst->remaining), elem->value * var->value, sg_maxmin_precision); + double_update(&(cnst->usage), elem->value / var->weight, sg_maxmin_precision); if(cnst->usage<=0 || cnst->remaining<=0) { if (cnst->cnst_light) { int index = (cnst->cnst_light-cnst_light_tab); @@ -910,7 +911,7 @@ XBT_INLINE lmm_constraint_t lmm_get_next_active_constraint(lmm_system_t #ifdef HAVE_LATENCY_BOUND_TRACKING XBT_INLINE int lmm_is_variable_limited_by_latency(lmm_variable_t var) { - return (double_equals(var->bound, var->value)); + return (double_equals(var->bound, var->value, sg_maxmin_precision)); } #endif diff --git a/src/surf/network_cm02.cpp b/src/surf/network_cm02.cpp index 66e588370d..73bc407998 100644 --- a/src/surf/network_cm02.cpp +++ b/src/surf/network_cm02.cpp @@ -315,7 +315,7 @@ void NetworkCm02Model::updateActionsStateLazy(double now, double /*delta*/) { NetworkCm02ActionPtr action; while ((xbt_heap_size(p_actionHeap) > 0) - && (double_equals(xbt_heap_maxkey(p_actionHeap), now))) { + && (double_equals(xbt_heap_maxkey(p_actionHeap), now, sg_surf_precision))) { action = (NetworkCm02ActionPtr) xbt_heap_pop(p_actionHeap); XBT_DEBUG("Something happened to action %p", action); #ifdef HAVE_TRACING @@ -638,13 +638,13 @@ void NetworkCm02Action::updateRemainingLazy(double now) if (m_remains > 0) { XBT_DEBUG("Updating action(%p): remains was %f, last_update was: %f", this, m_remains, m_lastUpdate); - double_update(&(m_remains), m_lastValue * delta); + double_update(&(m_remains), m_lastValue * delta, sg_maxmin_precision*sg_surf_precision); XBT_DEBUG("Updating action(%p): remains is now %f", this, m_remains); } if (m_maxDuration != NO_MAX_DURATION) - double_update(&m_maxDuration, delta); + double_update(&m_maxDuration, delta, sg_surf_precision); if (m_remains <= 0 && (lmm_get_variable_weight(getVariable()) > 0)) { diff --git a/src/surf/network_constant.cpp b/src/surf/network_constant.cpp index e813122ade..c331629c13 100644 --- a/src/surf/network_constant.cpp +++ b/src/surf/network_constant.cpp @@ -58,7 +58,7 @@ void NetworkConstantModel::updateActionsState(double /*now*/, double delta) action = static_cast(&*it); if (action->m_latency > 0) { if (action->m_latency > delta) { - double_update(&(action->m_latency), delta); + double_update(&(action->m_latency), delta, sg_surf_precision); } else { action->m_latency = 0.0; } diff --git a/src/surf/storage_n11.cpp b/src/surf/storage_n11.cpp index 5944409670..d27457bca7 100644 --- a/src/surf/storage_n11.cpp +++ b/src/surf/storage_n11.cpp @@ -313,7 +313,7 @@ void StorageN11Model::updateActionsState(double /*now*/, double delta) double rate = lmm_variable_getvalue(action->getVariable()); /* Hack to avoid rounding differences between x86 and x86_64 * (note that the next sizes are of type sg_size_t). */ - long incr = delta * rate + MAXMIN_PRECISION; + long incr = delta * rate + 0.00001; // Use legacy value. I don't know what this hack can be... FIXME: Pierre, please check. action->p_storage->m_usedSize += incr; // disk usage action->p_file->size += incr; // file size diff --git a/src/surf/surf_interface.cpp b/src/surf/surf_interface.cpp index 5c7050115d..93506d614b 100644 --- a/src/surf/surf_interface.cpp +++ b/src/surf/surf_interface.cpp @@ -1057,7 +1057,7 @@ void Action::updateRemainingLazy(double now) if (m_remains > 0) { XBT_DEBUG("Updating action(%p): remains was %f, last_update was: %f", this, m_remains, m_lastUpdate); - double_update(&m_remains, m_lastValue * delta); + double_update(&m_remains, m_lastValue * delta, sg_surf_precision*sg_maxmin_precision); #ifdef HAVE_TRACING if (getModel() == static_cast(surf_cpu_model_pm) && TRACE_is_enabled()) { @@ -1071,7 +1071,7 @@ void Action::updateRemainingLazy(double now) if(getModel() == static_cast(surf_network_model)) { if (m_maxDuration != NO_MAX_DURATION) - double_update(&m_maxDuration, delta); + double_update(&m_maxDuration, delta, sg_surf_precision); //FIXME: duplicated code if ((m_remains <= 0) && diff --git a/src/surf/surf_interface.hpp b/src/surf/surf_interface.hpp index a56495f557..1b4a4c7909 100644 --- a/src/surf/surf_interface.hpp +++ b/src/surf/surf_interface.hpp @@ -514,14 +514,14 @@ public: * * @param delta [TODO] */ - void updateMaxDuration(double delta) {double_update(&m_maxDuration, delta);} + void updateMaxDuration(double delta) {double_update(&m_maxDuration, delta,sg_surf_precision);} /** * @brief Update the remaining time of the current action * * @param delta [TODO] */ - void updateRemains(double delta) {double_update(&m_remains, delta);} + void updateRemains(double delta) {double_update(&m_remains, delta, sg_maxmin_precision*sg_surf_precision);} /** * @brief Set the remaining time of the current action diff --git a/src/surf/workstation_ptask_L07.cpp b/src/surf/workstation_ptask_L07.cpp index 71d2a57037..d964ddf188 100644 --- a/src/surf/workstation_ptask_L07.cpp +++ b/src/surf/workstation_ptask_L07.cpp @@ -85,10 +85,10 @@ void WorkstationL07Model::updateActionsState(double /*now*/, double delta) deltap = delta; if (action->m_latency > 0) { if (action->m_latency > deltap) { - double_update(&(action->m_latency), deltap); + double_update(&(action->m_latency), deltap, sg_surf_precision); deltap = 0.0; } else { - double_update(&(deltap), action->m_latency); + double_update(&(deltap), action->m_latency, sg_surf_precision); action->m_latency = 0.0; } if ((action->m_latency == 0.0) && (action->isSuspended() == 0)) { diff --git a/teshsuite/smpi/TI_output.tesh b/teshsuite/smpi/TI_output.tesh index 33e4cd797c..3ebd98277f 100644 --- a/teshsuite/smpi/TI_output.tesh +++ b/teshsuite/smpi/TI_output.tesh @@ -17,6 +17,7 @@ $ ../../smpi_script/bin/smpirun -trace-ti --cfg=tracing/filename:out_in_ti.txt - > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi/format' to 'TI' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi/computing' to 'yes' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'out_in_ti.txt' @@ -52,6 +53,7 @@ $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.:critical -trace-t > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi/format' to 'TI' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi/computing' to 'yes' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'out_ti.txt' @@ -127,6 +129,7 @@ $ ../../smpi_script/bin/smpirun -trace-ti --cfg=tracing/filename:out_in_ti.txt - > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi/format' to 'TI' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi/computing' to 'yes' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'out_in_ti.txt' @@ -162,6 +165,7 @@ $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.:critical -trace-t > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi/format' to 'TI' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi/computing' to 'yes' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'out_ti.txt' diff --git a/teshsuite/smpi/bcast.tesh b/teshsuite/smpi/bcast.tesh index 7b5430e82d..352f56c78e 100644 --- a/teshsuite/smpi/bcast.tesh +++ b/teshsuite/smpi/bcast.tesh @@ -7,6 +7,7 @@ $ ../../smpi_script/bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform $ > [rank 1] -> Jupiter > [rank 2] -> Fafard > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s) @@ -21,6 +22,7 @@ $ ../../smpi_script/bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform $ > [rank 3] -> Ginette > [rank 4] -> Bourassa > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s) @@ -43,6 +45,7 @@ $ ../../smpi_script/bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform $ > [rank 10] -> Tremblay > [rank 11] -> Jupiter > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s) diff --git a/teshsuite/smpi/hvector.tesh b/teshsuite/smpi/hvector.tesh index 99e111128c..b5f789e252 100644 --- a/teshsuite/smpi/hvector.tesh +++ b/teshsuite/smpi/hvector.tesh @@ -4,6 +4,7 @@ p Test hvector $ ../../smpi_script/bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../../examples/msg/small_platform.xml -np 2 ./hvector_test -q --log=smpi_kernel.thres:warning > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s) > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [rank 0] -> Tremblay diff --git a/teshsuite/smpi/indexed.tesh b/teshsuite/smpi/indexed.tesh index c5e6f8d7f4..f8777fb597 100644 --- a/teshsuite/smpi/indexed.tesh +++ b/teshsuite/smpi/indexed.tesh @@ -4,6 +4,7 @@ p Test indexed $ ../../smpi_script/bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../../examples/msg/small_platform.xml -np 2 ./indexed_test -q --log=smpi_kernel.thres:warning > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s) > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [rank 0] -> Tremblay diff --git a/teshsuite/smpi/pt2pt.tesh b/teshsuite/smpi/pt2pt.tesh index 9b88c7b07f..a67ee17558 100644 --- a/teshsuite/smpi/pt2pt.tesh +++ b/teshsuite/smpi/pt2pt.tesh @@ -4,6 +4,7 @@ p Test dsend $ ../../smpi_script/bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../../examples/msg/small_platform.xml -np 2 ./dsend -q --log=smpi_kernel.thres:warning > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s) > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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:(0) 0.000000] [dsend/INFO] rank 1: data exchanged @@ -22,6 +23,7 @@ $ ../../smpi_script/bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform $ > == pivot=2 : pingpong [2] <--> [3] > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s) > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0] About to send 1st message '99' to process [1] diff --git a/teshsuite/smpi/reduce.tesh b/teshsuite/smpi/reduce.tesh index a1910888d4..1d3e74cf2c 100644 --- a/teshsuite/smpi/reduce.tesh +++ b/teshsuite/smpi/reduce.tesh @@ -8,6 +8,7 @@ $ ../../smpi_script/bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform $ > [rank 1] -> Jupiter > [rank 2] -> Fafard > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s) @@ -31,6 +32,7 @@ $ ../../smpi_script/bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform $ > [rank 3] -> Ginette > [rank 4] -> Bourassa > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s) @@ -64,6 +66,7 @@ $ ../../smpi_script/bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform $ > [rank 10] -> Tremblay > [rank 11] -> Jupiter > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s) diff --git a/teshsuite/smpi/shared.tesh b/teshsuite/smpi/shared.tesh index 3d78abb398..64d932aace 100644 --- a/teshsuite/smpi/shared.tesh +++ b/teshsuite/smpi/shared.tesh @@ -5,6 +5,7 @@ p Test compute $ ../../smpi_script/bin/smpirun -platform ${srcdir:=.}/../../examples/msg/small_platform_with_routers.xml -hostfile ${srcdir:=.}/hostfile -np 4 ./shared --log=smpi_kernel.thres:warning > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s) > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [0] After change, the value in the shared buffer is: 16053117601147974045 diff --git a/teshsuite/smpi/struct.tesh b/teshsuite/smpi/struct.tesh index c6e05dbaa8..ebeb8c65af 100644 --- a/teshsuite/smpi/struct.tesh +++ b/teshsuite/smpi/struct.tesh @@ -6,6 +6,7 @@ $ ../../smpi_script/bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform $ > Process 1 got -2 (-2?) and 8.000000 (8.0?), tab (should be all 0): 0 0 0 0 0 0 > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s) > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [rank 0] -> Tremblay diff --git a/teshsuite/smpi/vector.tesh b/teshsuite/smpi/vector.tesh index ddd03a0408..e9a31a65db 100644 --- a/teshsuite/smpi/vector.tesh +++ b/teshsuite/smpi/vector.tesh @@ -4,6 +4,7 @@ p Test vector $ ../../smpi_script/bin/smpirun -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../../examples/msg/small_platform.xml -np 2 ./vector_test -q --log=smpi_kernel.thres:warning > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s) > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [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' > [rank 0] -> Tremblay diff --git a/testsuite/surf/lmm_usage.c b/testsuite/surf/lmm_usage.c index 3d886707c9..060ed25cec 100644 --- a/testsuite/surf/lmm_usage.c +++ b/testsuite/surf/lmm_usage.c @@ -173,7 +173,7 @@ void test1(method_t method) max_deviation = MAX(max_deviation, fabs(lmm_variable_getvalue(R_1_2_3) - (a - x))); - if (max_deviation > MAXMIN_PRECISION) { + if (max_deviation > 0.00001) { // Legacy value used in lagrange.c XBT_WARN("Max Deviation from optimal solution : %g", max_deviation); XBT_WARN("Found x = %1.20f", x); XBT_WARN("Deviation from optimal solution (R_1 = %g): %1.20f", x, @@ -208,7 +208,7 @@ void test1(method_t method) max_deviation = MAX(max_deviation, fabs(lmm_variable_getvalue(R_1_2_3) - (a - x))); - if (max_deviation > MAXMIN_PRECISION) { + if (max_deviation > 0.00001) { // Legacy value used in lagrange.c XBT_WARN("Max Deviation from optimal solution : %g", max_deviation); XBT_WARN("Found x = %1.20f", x); XBT_WARN("Deviation from optimal solution (R_1 = %g): %1.20f", x, -- 2.20.1