Exemplo n.º 1
0
static void action_init(const char *const *action)
{
  int i;
  XBT_DEBUG("Initialize the counters");
  smpi_replay_globals_t globals =  xbt_new(s_smpi_replay_globals_t, 1);
  globals->irecvs = xbt_dynar_new(sizeof(MPI_Request),NULL);

  if(action[2]) MPI_DEFAULT_TYPE= MPI_DOUBLE; // default MPE dataype 
  else MPI_DEFAULT_TYPE= MPI_BYTE; // default TAU datatype

  smpi_process_set_user_data((void*) globals);

  /* start a simulated timer */
  smpi_process_simulated_start();
  /*initialize the number of active processes */
  active_processes = smpi_process_count();

  if (!reqq) {
    reqq=xbt_new0(xbt_dynar_t,active_processes);

    for(i=0;i<active_processes;i++){
      reqq[i]=xbt_dynar_new(sizeof(MPI_Request),NULL);
    }
  }
}
Exemplo n.º 2
0
static void action_init(const char *const *action)
{
  XBT_DEBUG("Initialize the counters");
  CHECK_ACTION_PARAMS(action, 0, 1);
  if(action[2]) MPI_DEFAULT_TYPE= MPI_DOUBLE; // default MPE dataype 
  else MPI_DEFAULT_TYPE= MPI_BYTE; // default TAU datatype

  /* start a simulated timer */
  smpi_process_simulated_start();
  /*initialize the number of active processes */
  active_processes = smpi_process_count();

  if (!reqq) {
    reqq = xbt_dict_new();
  }

  set_reqq_self(xbt_dynar_new(sizeof(MPI_Request),&xbt_free_ref));

  /*
    reqq=xbt_new0(xbt_dynar_t,active_processes);

    for(i=0;i<active_processes;i++){
      reqq[i]=xbt_dynar_new(sizeof(MPI_Request),&xbt_free_ref);
    }
  }
  */
}
Exemplo n.º 3
0
int smpi_sample_2(int global, const char *file, int line)
{
  char *loc = sample_location(global, file, line);
  local_data_t *data;

  xbt_assert(samples, "You did something very inconsistent, didn't you?");
  data = xbt_dict_get_or_null(samples, loc);
  if (!data) {
    xbt_assert(data, "Please, do thing in order");
  }
  if (!data->started) {
    if ((data->iters > 0 && data->count >= data->iters)
        || (data->count > 1 && data->threshold > 0.0 && data->relstderr <= data->threshold)) {
      XBT_DEBUG("Perform some wait of %f", data->mean);
      smpi_execute(data->mean);
    } else {
      data->started = 1;
      data->count++;
    }
  } else {
    data->started = 0;
  }
  free(loc);
  smpi_bench_begin();
  smpi_process_simulated_start();
  return data->started;
}
Exemplo n.º 4
0
static void action_init(const char *const *action)
{
  XBT_DEBUG("Initialize the counters");
  smpi_replay_globals_t globals =  xbt_new(s_smpi_replay_globals_t, 1);
  globals->isends = xbt_dynar_new(sizeof(MPI_Request),NULL);
  globals->irecvs = xbt_dynar_new(sizeof(MPI_Request),NULL);

  smpi_process_set_user_data((void*) globals);

  /* start a simulated timer */
  smpi_process_simulated_start();
  /*initialize the number of active processes */
  active_processes = smpi_process_count();
}
Exemplo n.º 5
0
static void action_init(const char *const *action)
{
  XBT_DEBUG("Initialize the counters");
  CHECK_ACTION_PARAMS(action, 0, 1)
  if(action[2]) 
    MPI_DEFAULT_TYPE=MPI_DOUBLE; // default MPE dataype 
  else MPI_DEFAULT_TYPE= MPI_BYTE; // default TAU datatype

  /* start a simulated timer */
  smpi_process_simulated_start();
  /*initialize the number of active processes */
  active_processes = smpi_process_count();

  set_reqq_self(new std::vector<MPI_Request>);
}