X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e4921252225dbd0ea1ec9fcd90be2134df879a0e..5666ba4cb7aa68ae1a1640d3e3c57aeba91f4b02:/src/smpi/smpi_global.c?ds=sidebyside diff --git a/src/smpi/smpi_global.c b/src/smpi/smpi_global.c index 295ddfbd2c..692d2eb24d 100644 --- a/src/smpi/smpi_global.c +++ b/src/smpi/smpi_global.c @@ -83,14 +83,15 @@ void smpi_process_init(int *argc, char ***argv) SIMIX_process_set_cleanup_function(proc, SIMIX_process_cleanup); char* instance_id = (*argv)[1]; int rank = atoi((*argv)[2]); - /* Now using segment index of the process */ - index = proc->segment_index; + index = smpi_process_index_of_smx_process(proc); if(!index_to_process_data){ index_to_process_data=(int*)xbt_malloc(SIMIX_process_count()*sizeof(int)); } if(smpi_privatize_global_variables){ + /* Now using segment index of the process */ + index = proc->segment_index; /* Done at the process's creation */ SMPI_switch_data_segment(index); } @@ -410,7 +411,7 @@ static void smpi_check_options(){ //check correctness of MPI parameters xbt_assert(sg_cfg_get_int("smpi/async_small_thresh") <= - sg_cfg_get_int("smpi/send_is_detached_thres")); + sg_cfg_get_int("smpi/send_is_detached_thresh")); if (sg_cfg_is_default_value("smpi/running_power")) { XBT_INFO("You did not set the power of the host running the simulation. "