From: degomme Date: Tue, 18 Oct 2016 15:19:21 +0000 (+0200) Subject: Add a check so that process_init exits cleanly when improperly called. X-Git-Tag: v3_14~305 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/da71981c2747f50fc9db495993504b3d5cab7c73 Add a check so that process_init exits cleanly when improperly called. --- diff --git a/src/smpi/smpi_global.cpp b/src/smpi/smpi_global.cpp index 72a89925a0..a804bcb990 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);