- smpi_global = xbt_new(s_smpi_global_t, 1);
-
- // mallocators
- smpi_global->request_mallocator =
- xbt_mallocator_new(SMPI_REQUEST_MALLOCATOR_SIZE, smpi_request_new,
- smpi_request_free, smpi_request_reset);
- smpi_global->message_mallocator =
- xbt_mallocator_new(SMPI_MESSAGE_MALLOCATOR_SIZE, smpi_message_new,
- smpi_message_free, smpi_message_reset);
-
- smpi_global->process_count = SIMIX_process_count();
- DEBUG1("There is %d processes",smpi_global->process_count);
-
- // sender/receiver processes
- smpi_global->main_processes = xbt_new(smx_process_t, smpi_global->process_count);
-
- // timers
- smpi_global->timer = xbt_os_timer_new();
- smpi_global->timer_mutex = SIMIX_mutex_init();
- smpi_global->timer_cond = SIMIX_cond_init();
-
- smpi_global->do_once_duration_nodes = NULL;
- smpi_global->do_once_duration = NULL;
- smpi_global->do_once_mutex = SIMIX_mutex_init();
-
-
- smpi_mpi_global = xbt_new(s_smpi_mpi_global_t, 1);
-
- // global communicator
- smpi_mpi_global->mpi_comm_world = xbt_new(s_smpi_mpi_communicator_t, 1);
- smpi_mpi_global->mpi_comm_world->size = smpi_global->process_count;
- smpi_mpi_global->mpi_comm_world->barrier_count = 0;
- smpi_mpi_global->mpi_comm_world->barrier_mutex = SIMIX_mutex_init();
- smpi_mpi_global->mpi_comm_world->barrier_cond = SIMIX_cond_init();
- smpi_mpi_global->mpi_comm_world->rank_to_index_map =
- xbt_new(int, smpi_global->process_count);
- smpi_mpi_global->mpi_comm_world->index_to_rank_map =
- xbt_new(int, smpi_global->process_count);
- for (i = 0; i < smpi_global->process_count; i++) {
- smpi_mpi_global->mpi_comm_world->rank_to_index_map[i] = i;
- smpi_mpi_global->mpi_comm_world->index_to_rank_map[i] = i;
- }