summaryrefslogtreecommitdiffstats
path: root/mpi
diff options
context:
space:
mode:
Diffstat (limited to 'mpi')
-rw-r--r--mpi/mpi.c9
-rw-r--r--mpi/mpi.h6
-rw-r--r--mpi/mplogic.c3
3 files changed, 11 insertions, 7 deletions
diff --git a/mpi/mpi.c b/mpi/mpi.c
index 0b5e622f..c52e47bd 100644
--- a/mpi/mpi.c
+++ b/mpi/mpi.c
@@ -10,11 +10,18 @@
*/
#include "config.h"
-#include "mpi.h"
+#if MP_IOFUNC
+#include <stdio.h>
+#include <ctype.h>
+#endif
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
+#include "mpi.h"
+#if MP_ARGCHK == 2
+#include <assert.h>
+#endif
#define MAX(A, B) ((A) > (B) ? (A) : (B))
#define MIN(A, B) ((A) < (B) ? (A) : (B))
diff --git a/mpi/mpi.h b/mpi/mpi.h
index ac2929d3..0e000643 100644
--- a/mpi/mpi.h
+++ b/mpi/mpi.h
@@ -16,11 +16,6 @@
#define MP_IOFUNC 1
#endif
-#if MP_IOFUNC
-#include <stdio.h>
-#include <ctype.h>
-#endif
-
#include <limits.h>
#define MP_NEG 1
@@ -60,7 +55,6 @@
#if MP_ARGCHK == 1
#define ARGCHK(X,Y) {if(!(X)){return (Y);}}
#elif MP_ARGCHK == 2
-#include <assert.h>
#define ARGCHK(X,Y) assert(X)
#else
#define ARGCHK(X,Y) /* */
diff --git a/mpi/mplogic.c b/mpi/mplogic.c
index 2d1cf7bf..eb44b866 100644
--- a/mpi/mplogic.c
+++ b/mpi/mplogic.c
@@ -11,6 +11,9 @@
#include "config.h"
#include "mplogic.h"
+#if MP_ARGCHK == 2
+#include <assert.h>
+#endif
#include <stdlib.h>
/* Some things from the guts of the MPI library we make use of... */