extern double smpi_total_benched_time;
xbt_os_timer_t global_timer;
MPI_Comm MPI_COMM_WORLD = MPI_COMM_UNINITIALIZED;
-
MPI_Errhandler *MPI_ERRORS_RETURN = NULL;
MPI_Errhandler *MPI_ERRORS_ARE_FATAL = NULL;
MPI_Errhandler *MPI_ERRHANDLER_NULL = NULL;
if (argc && argv) {
proc = SIMIX_process_self();
//FIXME: dirty cleanup method to avoid using msg cleanup functions on these processes when using MSG+SMPI
- SIMIX_process_set_cleanup_function(proc, SIMIX_process_cleanup);
+ SIMIX_process_set_cleanup_function(proc, MSG_process_cleanup_from_SIMIX);
char* instance_id = (*argv)[1];
int rank = xbt_str_parse_int((*argv)[2], "Invalid rank: %s");
index = smpi_process_index_of_smx_process(proc);
if (MPI_COMM_WORLD != MPI_COMM_UNINITIALIZED){
smpi_comm_cleanup_smp(MPI_COMM_WORLD);
smpi_comm_cleanup_attributes(MPI_COMM_WORLD);
+ if(smpi_coll_cleanup_callback!=NULL)
+ smpi_coll_cleanup_callback();
xbt_free(MPI_COMM_WORLD);
}
MPI_COMM_WORLD = MPI_COMM_NULL;
+ if (!MC_is_active()) {
+ xbt_os_timer_free(global_timer);
+ }
+
xbt_free(index_to_process_data);
if(smpi_privatize_global_variables)
smpi_destroy_global_memory_segments();
int barrier_id = find_coll_description(mpi_coll_barrier_description, xbt_cfg_get_string("smpi/barrier"),"barrier");
mpi_coll_barrier_fun = (int (*)(MPI_Comm comm)) mpi_coll_barrier_description[barrier_id].coll;
+ smpi_coll_cleanup_callback=NULL;
smpi_cpu_threshold = xbt_cfg_get_double("smpi/cpu-threshold");
smpi_running_power = xbt_cfg_get_double("smpi/running-power");
smpi_privatize_global_variables = xbt_cfg_get_boolean("smpi/privatize-global-variables");