From c42c8f1c9c48a271f8f5e8af6e7e9809ddfa1864 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Mon, 25 Apr 2016 22:21:02 +0200 Subject: [PATCH] and now kebab-case the tracing options --- ChangeLog | 3 +-- doc/doxygen/options.doc | 2 +- doc/doxygen/tracing.doc | 22 ++++++++++---------- src/instr/instr_TI_trace.cpp | 4 ++-- src/instr/instr_config.cpp | 22 +++++++++++++------- src/smpi/smpirun.in | 2 +- teshsuite/smpi/pt2pt-pingpong/TI_output.tesh | 8 +++---- 7 files changed, 35 insertions(+), 28 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4ebb78ddc2..1f3131468a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -45,8 +45,7 @@ SimGrid (3.13) UNRELEASED; urgency=low in the previous release). Options: - * All options are consistently in kebab-case (but the tracing ones). - Old names are kept as alias. + * All options are consistently in kebab-case. Old names are kept as alias. XML platforms: * Switch to platform v4 format. diff --git a/doc/doxygen/options.doc b/doc/doxygen/options.doc index 37832fe87d..86c24f8057 100644 --- a/doc/doxygen/options.doc +++ b/doc/doxygen/options.doc @@ -683,7 +683,7 @@ reproduce an experiment. You have two ways to do that: - Add the contents of a textual file on top of the trace file as comment: \verbatim ---cfg=tracing/comment_file:my_file_with_additional_information.txt +--cfg=tracing/comment-file:my_file_with_additional_information.txt \endverbatim Please, use these two parameters (for comments) to make reproducible diff --git a/doc/doxygen/tracing.doc b/doc/doxygen/tracing.doc index d5f2d01246..3b25b06c01 100644 --- a/doc/doxygen/tracing.doc +++ b/doc/doxygen/tracing.doc @@ -166,12 +166,12 @@ happening during a collective MPI call. \endverbatim \li \c -tracing/smpi/display_sizes +tracing/smpi/display-sizes : This option only has effect if this simulator is SMPI-based. Display the sizes of the messages exchanged in the trace, both in the links and on the states. For collective, size means the global size of data sent by the process in general. \verbatim ---cfg=tracing/smpi/display_sizes:yes +--cfg=tracing/smpi/display-sizes:yes \endverbatim \li \c @@ -191,7 +191,7 @@ TODO \endverbatim \li \c -tracing/smpi/format/ti_one_file +tracing/smpi/format/ti-one-file : TODO \verbatim @@ -230,7 +230,7 @@ tracing/buffer \endverbatim \li \c -tracing/onelink_only +tracing/onelink-only : This option changes the way SimGrid register its platform on the trace file. Normally, the tracing considers all routes (no matter their @@ -239,11 +239,11 @@ option is activated, only the routes with one link are used to register the topology within an AS. Routes among AS continue to be traced as usual. \verbatim ---cfg=tracing/onelink_only:yes +--cfg=tracing/onelink-only:yes \endverbatim \li \c -tracing/disable_link +tracing/disable-link : TODO \verbatim @@ -251,7 +251,7 @@ TODO \endverbatim \li \c -tracing/disable_power +tracing/disable-power : TODO \verbatim @@ -259,13 +259,13 @@ TODO \endverbatim \li \c -tracing/disable_destroy +tracing/disable-destroy : Disable the destruction of containers at the end of simulation. This can be used with simulators that have a different notion of time (different from the simulated time). \verbatim ---cfg=tracing/disable_destroy:yes +--cfg=tracing/disable-destroy:yes \endverbatim \li \c @@ -288,11 +288,11 @@ Use this to add a comment line to the top of the trace file. \endverbatim \li \c -tracing/comment_file +tracing/comment-file : Use this to add the contents of a file to the top of the trace file as comment. \verbatim ---cfg=tracing/comment_file:textual_file.txt +--cfg=tracing/comment-file:textual_file.txt \endverbatim \li \c diff --git a/src/instr/instr_TI_trace.cpp b/src/instr/instr_TI_trace.cpp index 3d567cf88a..fa32d4c56a 100644 --- a/src/instr/instr_TI_trace.cpp +++ b/src/instr/instr_TI_trace.cpp @@ -69,7 +69,7 @@ void print_TICreateContainer(paje_event_t event) prefix = xbt_os_time(); } - if (!xbt_cfg_get_boolean("tracing/smpi/format/ti_one_file") || temp == NULL) { + if (!xbt_cfg_get_boolean("tracing/smpi/format/ti-one-file") || temp == NULL) { char *folder_name = bprintf("%s_files", TRACE_get_filename()); char *filename = bprintf("%s/%f_%s.txt", folder_name, prefix, ((createContainer_t) event->data)->container->name); #ifdef WIN32 @@ -90,7 +90,7 @@ void print_TICreateContainer(paje_event_t event) void print_TIDestroyContainer(paje_event_t event) { - if (!xbt_cfg_get_boolean("tracing/smpi/format/ti_one_file")|| xbt_dict_length(tracing_files) == 1) { + if (!xbt_cfg_get_boolean("tracing/smpi/format/ti-one-file")|| xbt_dict_length(tracing_files) == 1) { FILE* f = (FILE*)xbt_dict_get_or_null(tracing_files, ((destroyContainer_t) event->data)->container->name); fclose(f); } diff --git a/src/instr/instr_config.cpp b/src/instr/instr_config.cpp index 3d844afa36..0e2f3e2d95 100644 --- a/src/instr/instr_config.cpp +++ b/src/instr/instr_config.cpp @@ -14,18 +14,18 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_config, instr, "Configuration"); #define OPT_TRACING_BASIC "tracing/basic" #define OPT_TRACING_BUFFER "tracing/buffer" #define OPT_TRACING_CATEGORIZED "tracing/categorized" -#define OPT_TRACING_COMMENT_FILE "tracing/comment_file" +#define OPT_TRACING_COMMENT_FILE "tracing/comment-file" #define OPT_TRACING_COMMENT "tracing/comment" -#define OPT_TRACING_DISABLE_DESTROY "tracing/disable_destroy" -#define OPT_TRACING_DISABLE_LINK "tracing/disable_link" -#define OPT_TRACING_DISABLE_POWER "tracing/disable_power" -#define OPT_TRACING_DISPLAY_SIZES "tracing/smpi/display_sizes" +#define OPT_TRACING_DISABLE_DESTROY "tracing/disable-destroy" +#define OPT_TRACING_DISABLE_LINK "tracing/disable-link" +#define OPT_TRACING_DISABLE_POWER "tracing/disable-power" +#define OPT_TRACING_DISPLAY_SIZES "tracing/smpi/display-sizes" #define OPT_TRACING_FILENAME "tracing/filename" -#define OPT_TRACING_FORMAT_TI_ONEFILE "tracing/smpi/format/ti_one_file" +#define OPT_TRACING_FORMAT_TI_ONEFILE "tracing/smpi/format/ti-one-file" #define OPT_TRACING_FORMAT "tracing/smpi/format" #define OPT_TRACING_MSG_PROCESS "tracing/msg/process" #define OPT_TRACING_MSG_VM "tracing/msg/vm" -#define OPT_TRACING_ONELINK_ONLY "tracing/onelink_only" +#define OPT_TRACING_ONELINK_ONLY "tracing/onelink-only" #define OPT_TRACING_PLATFORM "tracing/platform" #define OPT_TRACING_PRECISION "tracing/precision" #define OPT_TRACING_SMPI_COMPUTING "tracing/smpi/computing" @@ -390,6 +390,14 @@ void TRACE_global_init(int *argc, char **argv) xbt_cfg_register_string(OPT_VIVA_UNCAT_CONF, "", NULL, "Viva Graph configuration file for uncategorized resource utilization traces."); xbt_cfg_register_string(OPT_VIVA_CAT_CONF, "", NULL, "Viva Graph configuration file for categorized resource utilization traces."); + xbt_cfg_register_alias(OPT_TRACING_COMMENT_FILE,"tracing/comment_file"); + xbt_cfg_register_alias(OPT_TRACING_DISABLE_DESTROY, "tracing/disable_destroy"); + xbt_cfg_register_alias(OPT_TRACING_DISABLE_LINK, "tracing/disable_link"); + xbt_cfg_register_alias(OPT_TRACING_DISABLE_POWER, "tracing/disable_power"); + xbt_cfg_register_alias(OPT_TRACING_DISPLAY_SIZES, "tracing/smpi/display_sizes"); + xbt_cfg_register_alias(OPT_TRACING_FORMAT_TI_ONEFILE, "tracing/smpi/format/ti_one_file"); + xbt_cfg_register_alias(OPT_TRACING_ONELINK_ONLY, "tracing/onelink_only"); + /* instrumentation can be considered configured now */ trace_configured = 1; } diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index 22677512fa..8e07eaf1f9 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -457,7 +457,7 @@ if [ -n "${TRACE_ACTIVE}" ]; then fi if [ -n "${TRACE_COMMENT_FILE}" ]; then - TRACEOPTIONS="${TRACEOPTIONS} --cfg=tracing/comment_file:${TRACE_COMMENT_FILE}" + TRACEOPTIONS="${TRACEOPTIONS} --cfg=tracing/comment-file:${TRACE_COMMENT_FILE}" fi if [ -n "${TRACE_GROUPED}" ]; then diff --git a/teshsuite/smpi/pt2pt-pingpong/TI_output.tesh b/teshsuite/smpi/pt2pt-pingpong/TI_output.tesh index b4dd15c6f6..b4d98eeb51 100644 --- a/teshsuite/smpi/pt2pt-pingpong/TI_output.tesh +++ b/teshsuite/smpi/pt2pt-pingpong/TI_output.tesh @@ -111,7 +111,7 @@ $ rm out_in_ti.txt p Same test, but only using one output file for all processes p generate a trace with pingpong, and replay itself, then check that output trace of the second run is the same as in the first (once sorted) ! output sort -$ ${bindir:=.}/../../../bin/smpirun -trace-ti --cfg=tracing/filename:out_in_ti.txt --cfg=tracing/smpi/format/ti_one_file:yes -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 4 ${bindir:=.}/pt2pt-pingpong -q --log=smpi_kernel.thres:warning +$ ${bindir:=.}/../../../bin/smpirun -trace-ti --cfg=tracing/filename:out_in_ti.txt --cfg=tracing/smpi/format/ti-one-file:yes -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 4 ${bindir:=.}/pt2pt-pingpong -q --log=smpi_kernel.thres:warning > *** Ping-pong test (MPI_Send/MPI_Recv) *** > == pivot=0 : pingpong [0] <--> [1] > == pivot=1 : pingpong [1] <--> [2] @@ -125,7 +125,7 @@ $ ${bindir:=.}/../../../bin/smpirun -trace-ti --cfg=tracing/filename:out_in_ti.t > [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' -> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi/format/ti_one_file' to 'yes' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi/format/ti-one-file' to 'yes' > [0] About to send 1st message '99' to process [1] > [0] Received reply message '100' from process [1] > [1] About to send 1st message '100' to process [2] @@ -146,7 +146,7 @@ $ ${bindir:=.}/../../../bin/smpirun -trace-ti --cfg=tracing/filename:out_in_ti.t > [rank 2] -> Fafard > [rank 3] -> Ginette -$ ${bindir:=.}/../../../bin/smpirun -ext smpi_replay --log=replay.:critical -trace-ti --cfg=tracing/filename:out_ti.txt --cfg=tracing/smpi/format/ti_one_file:yes -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 4 ${bindir:=.}/../../../examples/smpi/replay/smpi_replay ./out_in_ti.txt --log=smpi_kernel.thres:warning +$ ${bindir:=.}/../../../bin/smpirun -ext smpi_replay --log=replay.:critical -trace-ti --cfg=tracing/filename:out_ti.txt --cfg=tracing/smpi/format/ti-one-file:yes -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 4 ${bindir:=.}/../../../examples/smpi/replay/smpi_replay ./out_in_ti.txt --log=smpi_kernel.thres:warning > [rank 0] -> Tremblay > [rank 1] -> Jupiter > [rank 2] -> Fafard @@ -160,7 +160,7 @@ $ ${bindir:=.}/../../../bin/smpirun -ext smpi_replay --log=replay.:critical -tra > [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' -> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi/format/ti_one_file' to 'yes' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi/format/ti-one-file' to 'yes' > [Jupiter:1:(2) 0.016798] [smpi_replay/INFO] Simulation time 0.016798 $ rm -rf ./out_ti.txt_files -- 2.20.1