Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Die immediately with an explicit message when MPI_Init was given a NULL parameter.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Fri, 7 Mar 2014 15:07:32 +0000 (16:07 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Fri, 7 Mar 2014 15:28:11 +0000 (16:28 +0100)
src/smpi/smpi_global.c

index e90b83a..46a46c8 100644 (file)
@@ -86,6 +86,8 @@ void smpi_process_init(int *argc, char ***argv)
     simcall_rdv_set_receiver(data->mailbox_small, proc);
     XBT_DEBUG("<%d> New process in the game: %p", index, proc);
   }
     simcall_rdv_set_receiver(data->mailbox_small, proc);
     XBT_DEBUG("<%d> New process in the game: %p", index, proc);
   }
+  if (smpi_process_data() == NULL)
+    xbt_die("smpi_process_data() returned NULL. You probably gave a NULL parameter to MPI_Init. Although it's required by MPI-2, this is currently not supported by SMPI.");
 }
 
 void smpi_process_destroy(void)
 }
 
 void smpi_process_destroy(void)