Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[SMPI] Use xbt_die() instead of printf & exit
authorChristian Heinrich <franz-christian.heinrich@inria.fr>
Wed, 6 Dec 2017 12:16:13 +0000 (13:16 +0100)
committerChristian Heinrich <franz-christian.heinrich@inria.fr>
Fri, 12 Jan 2018 00:08:31 +0000 (01:08 +0100)
src/smpi/internals/smpi_process.cpp

index db93d3f..f35b948 100644 (file)
@@ -271,8 +271,7 @@ void Process::set_return_value(int val){
 void Process::init(int *argc, char ***argv){
 
   if (smpi_process_count() == 0) {
 void Process::init(int *argc, char ***argv){
 
   if (smpi_process_count() == 0) {
-    printf("SimGrid was not initialized properly before entering MPI_Init. Aborting, please check compilation process and use smpirun\n");
-    exit(1);
+    xbt_die("SimGrid was not initialized properly before entering MPI_Init. Aborting, please check compilation process and use smpirun\n");
   }
   if (argc != nullptr && argv != nullptr) {
     smx_actor_t proc = SIMIX_process_self();
   }
   if (argc != nullptr && argv != nullptr) {
     smx_actor_t proc = SIMIX_process_self();