/* Connect our log channels: that must be done manually under windows */
#ifdef XBT_LOG_CONNECT
XBT_LOG_CONNECT(smpi_base, smpi);
/* Connect our log channels: that must be done manually under windows */
#ifdef XBT_LOG_CONNECT
XBT_LOG_CONNECT(smpi_base, smpi);
// mallocators
smpi_global->request_mallocator =
xbt_mallocator_new(SMPI_REQUEST_MALLOCATOR_SIZE, smpi_request_new,
// mallocators
smpi_global->request_mallocator =
xbt_mallocator_new(SMPI_REQUEST_MALLOCATOR_SIZE, smpi_request_new,
xbt_mallocator_new(SMPI_MESSAGE_MALLOCATOR_SIZE, smpi_message_new,
smpi_message_free, smpi_message_reset);
xbt_mallocator_new(SMPI_MESSAGE_MALLOCATOR_SIZE, smpi_message_new,
smpi_message_free, smpi_message_reset);
- // queues
- smpi_global->received_message_queues = xbt_new(xbt_fifo_t, size);
+ smpi_global->process_count = SIMIX_process_count();
+ fprintf(stderr,"There is %d processes\n",smpi_global->process_count);
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 = 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->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 =
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->host_count);
- for (i = 0; i < smpi_global->host_count; i++) {
+ 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;
}
smpi_mpi_global->mpi_comm_world->rank_to_index_map[i] = i;
smpi_mpi_global->mpi_comm_world->index_to_rank_map[i] = i;
}