data->argc = argc;
data->argv = argv;
// set the process attached to the mailbox
- simcall_rdv_set_receiver(data->mailbox_small, proc);
+ simcall_mbox_set_receiver(data->mailbox_small, proc);
XBT_DEBUG("<%d> New process in the game: %p", index, proc);
}
xbt_assert(smpi_process_data(),
//process_data[i]->index = i;
process_data[i]->argc = NULL;
process_data[i]->argv = NULL;
- process_data[i]->mailbox = simcall_rdv_create(get_mailbox_name(name, i));
- process_data[i]->mailbox_small = simcall_rdv_create(get_mailbox_name_small(name, i));
+ process_data[i]->mailbox = simcall_mbox_create(get_mailbox_name(name, i));
+ process_data[i]->mailbox_small = simcall_mbox_create(get_mailbox_name_small(name, i));
process_data[i]->mailboxes_mutex = xbt_mutex_init();
process_data[i]->timer = xbt_os_timer_new();
if (MC_is_active())
smpi_bench_destroy();
if (MPI_COMM_WORLD != MPI_COMM_UNINITIALIZED){
while (smpi_group_unuse(smpi_comm_group(MPI_COMM_WORLD)) > 0);
- xbt_free(MPI_COMM_WORLD);
xbt_barrier_destroy(process_data[0]->finalization_barrier);
}else{
smpi_deployment_cleanup_instances();
}
- MPI_COMM_WORLD = MPI_COMM_NULL;
for (i = 0; i < count; i++) {
if(process_data[i]->comm_self!=MPI_COMM_NULL){
- smpi_group_unuse(smpi_comm_group(process_data[i]->comm_self));
smpi_comm_destroy(process_data[i]->comm_self);
}
if(process_data[i]->comm_intra!=MPI_COMM_NULL){
- smpi_group_unuse(smpi_comm_group(process_data[i]->comm_intra));
smpi_comm_destroy(process_data[i]->comm_intra);
}
xbt_os_timer_free(process_data[i]->timer);
- simcall_rdv_destroy(process_data[i]->mailbox);
- simcall_rdv_destroy(process_data[i]->mailbox_small);
xbt_mutex_destroy(process_data[i]->mailboxes_mutex);
xbt_free(process_data[i]);
}
xbt_free(process_data);
process_data = NULL;
+ if (MPI_COMM_WORLD != MPI_COMM_UNINITIALIZED){
+ smpi_comm_cleanup_smp(MPI_COMM_WORLD);
+ smpi_comm_cleanup_attributes(MPI_COMM_WORLD);
+ xbt_free(MPI_COMM_WORLD);
+ }
+
+ MPI_COMM_WORLD = MPI_COMM_NULL;
+
xbt_free(index_to_process_data);
if(smpi_privatize_global_variables)
smpi_destroy_global_memory_segments();