- process_ = SIMIX_process_self();
- XBT_DEBUG("<%d> New process in the game: %p", index_, SIMIX_process_self());
+ XBT_DEBUG("<%d> New process in the game: %p", index_, process_);
- if (process_data == nullptr){
- printf("SimGrid was not initialized properly before entering MPI_Init. Aborting, please check compilation process and use smpirun\n");
- exit(1);
+ if (smpi_process_count() == 0) {
+ xbt_die("SimGrid was not initialized properly before entering MPI_Init. Aborting, please check compilation process and use smpirun\n");
// this up here so that I can set the privatized region before the switch.
Process* process = smpi_process_remote(index);
if(smpi_privatize_global_variables == SMPI_PRIVATIZE_MMAP){
// this up here so that I can set the privatized region before the switch.
Process* process = smpi_process_remote(index);
if(smpi_privatize_global_variables == SMPI_PRIVATIZE_MMAP){
index = proc->segment_index;
process->set_privatized_region(smpi_init_global_memory_segment_process());
/* Done at the process's creation */
index = proc->segment_index;
process->set_privatized_region(smpi_init_global_memory_segment_process());
/* Done at the process's creation */