Ejemplo n.º 1
0
int TRACE_start()
{
  TRACE_getopts();

  // tracing system must be:
  //    - enabled (with --cfg=tracing:1)
  //    - already configured (TRACE_global_init already called)
  if (!(TRACE_is_enabled() && TRACE_is_configured())){
    return 0;
  }

  XBT_DEBUG("Tracing starts");

  /* open the trace file */
  TRACE_paje_start();

  /* activate trace */
  if (trace_active == 1){
    THROWF (tracing_error, 0, "Tracing is already active");
  }
  trace_active = 1;
  XBT_DEBUG ("Tracing is on");

  /* other trace initialization */
  created_categories = xbt_dict_new_homogeneous(xbt_free);
  declared_marks = xbt_dict_new_homogeneous (xbt_free);
  user_host_variables = xbt_dict_new_homogeneous (xbt_free);
  user_link_variables = xbt_dict_new_homogeneous (xbt_free);
  TRACE_surf_alloc();
  TRACE_smpi_alloc();
  return 0;
}
Ejemplo n.º 2
0
// This function can be called from extern file, to initialize logs, options, and processes of smpi
// without the need of smpirun
void SMPI_init(){
  smpi_init_logs();
  smpi_init_options();
  smpi_global_init();
  smpi_check_options();
  if (TRACE_is_enabled() && TRACE_is_configured())
    TRACE_smpi_alloc();
  if(smpi_privatize_global_variables)
    smpi_initialize_global_memory_segments();
}