Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MC: cosmetics
[simgrid.git] / src / smpi / smpi_global.cpp
index 72a8992..526ad14 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);
@@ -422,7 +426,7 @@ void smpi_comm_copy_buffer_callback(smx_activity_t synchro, void *buff, size_t b
 
 void smpi_comm_null_copy_buffer_callback(smx_activity_t comm, void *buff, size_t buff_size)
 {
-  return;
+  /* nothing done in this version */
 }
 
 static void smpi_check_options(){
@@ -658,7 +662,6 @@ void smpi_global_destroy()
 void __attribute__ ((weak)) user_main_()
 {
   xbt_die("Should not be in this smpi_simulated_main");
-  return;
 }
 
 int __attribute__ ((weak)) smpi_simulated_main_(int argc, char **argv)