details:
- nothing is traced yet, just coupling smpi with the tracing module
- compile simgrid with enable_trace = on
- execute it with --cfg=tracing/smpi:1
- TODO: add an option "--trace" to smpirun when this is completed
that is translated to the previously cited execution parameter
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8123
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
src/instr/msg_volume.c
src/instr/smx_instr.c
src/instr/surf_instr.c
+ src/instr/smpi_instr.c
src/instr/variables_instr.c
src/instr/private.h
)
int TRACE_surf_gtnets_get_dst (void *action);
void TRACE_surf_gtnets_destroy (void *action);
+/* from smpi_instr.c */
+void TRACE_smpi_init (int rank);
+void TRACE_smpi_finalize (int rank);
+void TRACE_smpi_start (void);
+void TRACE_smpi_end (void);
+
/* from instr_config.c */
int _TRACE_configured (void);
int _TRACE_smpi_enabled (void);
--- /dev/null
+/* Copyright (c) 2010. The SimGrid Team.
+ * All rights reserved. */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+#include "instr/private.h"
+
+#ifdef HAVE_TRACING
+
+void TRACE_smpi_start (void)
+{
+ if (IS_TRACING_SMPI){
+ TRACE_start ();
+ }
+}
+
+void TRACE_smpi_end (void)
+{
+ if (IS_TRACING_SMPI){
+ TRACE_end();
+ }
+}
+
+void TRACE_smpi_init (int rank)
+{
+ if (!IS_TRACING_SMPI) return;
+ //double time = SIMIX_get_clock();
+ //smx_host_t host = SIMIX_host_self();
+}
+
+void TRACE_smpi_finalize (int rank)
+{
+ if (!IS_TRACING_SMPI) return;
+ //double time = SIMIX_get_clock();
+ //smx_host_t host = SIMIX_host_self();
+}
+
+#endif
+
#include "xbt/xbt_os_time.h"
#include "simix/simix.h"
#include "smpi/smpi.h"
+#include "instr/private.h"
struct s_smpi_process_data;
typedef struct s_smpi_process_data* smpi_process_data_t;
"Minimal computation time (in seconds) not discarded.",
xbt_cfgelm_double, &default_threshold, 1, 1, NULL, NULL);
+#ifdef HAVE_TRACING
+ TRACE_global_init (&argc, argv);
+#endif
+
SIMIX_global_init(&argc, argv);
+#ifdef HAVE_TRACING
+ TRACE_smpi_start ();
+#endif
+
// parse the platform file: get the host list
SIMIX_create_environment(argv[1]);
SIMIX_message_sizes_output("toto.txt");
+#ifdef HAVE_TRACING
+ TRACE_smpi_end ();
+#endif
+
SIMIX_clean();
return 0;
}
int MPI_Init(int* argc, char*** argv) {
smpi_process_init(argc, argv);
smpi_bench_begin(-1, NULL);
+#ifdef HAVE_TRACING
+ TRACE_smpi_init(smpi_process_index());
+#endif
return MPI_SUCCESS;
}
int MPI_Finalize(void) {
+#ifdef HAVE_TRACING
+ TRACE_smpi_finalize(smpi_process_index());
+#endif
smpi_bench_end(-1, NULL);
smpi_process_destroy();
return MPI_SUCCESS;