smpi_bench_destroy();
smpi_shared_destroy();
smpi_deployment_cleanup_instances();
- for (int i = 0, count = smpi_process_count(); i < count; i++) {
+ int count = smpi_process_count();
+ for (int i = 0; i < count; i++) {
if(process_data[i]->comm_self()!=MPI_COMM_NULL){
simgrid::smpi::Comm::destroy(process_data[i]->comm_self());
}
xbt_os_timer_free(global_timer);
}
- xbt_free(index_to_process_data);
+ delete[] index_to_process_data;
if(smpi_privatize_global_variables == SMPI_PRIVATIZE_MMAP)
smpi_destroy_global_memory_segments();
smpi_free_static();
if (smpi_cpu_threshold < 0)
smpi_cpu_threshold = DBL_MAX;
- const char* val = xbt_cfg_get_string("smpi/shared-malloc").c_str();
- if (not strcasecmp(val, "yes") || not strcmp(val, "1") || not strcasecmp(val, "on") ||
- not strcasecmp(val, "global")) {
+ std::string val = xbt_cfg_get_string("smpi/shared-malloc");
+ if ((val == "yes") || (val == "1") || (val == "on") || (val == "global")) {
smpi_cfg_shared_malloc = shmalloc_global;
- } else if (not strcasecmp(val, "local")) {
+ } else if (val == "local") {
smpi_cfg_shared_malloc = shmalloc_local;
- } else if (not strcasecmp(val, "no") || not strcmp(val, "0") || not strcasecmp(val, "off")) {
+ } else if ((val == "no") || (val == "0") || (val == "off")) {
smpi_cfg_shared_malloc = shmalloc_none;
} else {
xbt_die("Invalid value '%s' for option smpi/shared-malloc. Possible values: 'on' or 'global', 'local', 'off'",
- val);
+ val.c_str());
}
}
}
}
int ret = 0;
- for (int i = 0, count = smpi_process_count(); i < count; i++) {
+ int count = smpi_process_count();
+ for (int i = 0; i < count; i++) {
if(process_data[i]->return_value()!=0){
ret=process_data[i]->return_value();//return first non 0 value
break;