]> AND Public Git Repository - simgrid.git/blobdiff - src/smpi/smpi_global.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
don't test pointers after dereferencing them (thanks, sonar)
[simgrid.git] / src / smpi / smpi_global.cpp
index 72a89925a07a2792e4d97420f633c2b9f0e13c16..a804bcb9907ed367a2e606fff0859ba603e4f90d 100644 (file)
@@ -99,6 +99,10 @@ static char *get_mailbox_name_small(char *str, int index)
 void smpi_process_init(int *argc, char ***argv)
 {
 
+  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 (argc != nullptr && argv != nullptr) {
     smx_actor_t proc = SIMIX_process_self();
     proc->context->set_cleanup(&MSG_process_cleanup_from_SIMIX);