X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b62e431af6ffa480a59647aad94ffe0d292c05a8..bb92988e1631f85a149f1270fbe95bd586883230:/src/smpi/smpi_global.cpp diff --git a/src/smpi/smpi_global.cpp b/src/smpi/smpi_global.cpp index 72a89925a0..526ad14920 100644 --- a/src/smpi/smpi_global.cpp +++ b/src/smpi/smpi_global.cpp @@ -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)