Skip to content

Commit

Permalink
Add error checking assert for init mpi.
Browse files Browse the repository at this point in the history
  • Loading branch information
goracle committed Mar 3, 2018
1 parent a09b043 commit a1e427d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/mpi/QMP_init_mpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <stdlib.h>
#include <ctype.h>
#include <stdarg.h>
#include <assert.h>

#include "QMP_P_COMMON.h"

Expand Down Expand Up @@ -39,6 +40,7 @@ QMP_init_machine_mpi (int* argc, char*** argv, QMP_thread_level_t required,
QMP_abort_string (-1, "MPI_Init failed");
}else{
MPI_Query_thread(&mpi_prv);
assert(mpi_prv==mpi_req);
}

switch(mpi_prv) {
Expand Down

1 comment on commit a1e427d

@goracle
Copy link
Contributor Author

@goracle goracle commented on a1e427d Mar 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adds a consistency check.

Please sign in to comment.