Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
speeling mistakes in teshsuite (even mpich tests because why not)
[simgrid.git] / teshsuite / smpi / mpich3-test / coll / nonblocking3.c
index 35cc428..2557c92 100644 (file)
@@ -19,7 +19,7 @@
 #include <string.h>
 #include <assert.h>
 
-#ifdef HAVE_UNISTD_H
+#if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
 
@@ -27,7 +27,7 @@ static int errs = 0;
 
 /* Constants that control the high level test harness behavior. */
 /* MAIN_ITERATIONS is how many NBC ops the test will attempt to issue. */
-#define MAIN_ITERATIONS (100000)
+#define MAIN_ITERATIONS (1000)
 /* WINDOW is the maximum number of outstanding NBC requests at any given time */
 #define WINDOW (20)
 /* we sleep with probability 1/CHANCE_OF_SLEEP */
@@ -95,8 +95,8 @@ struct laundry {
     int *recvcounts;
     int *sdispls;
     int *rdispls;
-    int *sendtypes;
-    int *recvtypes;
+    MPI_Datatype *sendtypes;
+    MPI_Datatype *recvtypes;
 };
 
 static void cleanup_laundry(struct laundry *l)
@@ -122,7 +122,7 @@ static void cleanup_laundry(struct laundry *l)
 }
 
 /* Starts a "random" operation on "comm" corresponding to "rndnum" and returns
- * in (*req) a request handle corresonding to that operation.  This call should
+ * in (*req) a request handle corresponding to that operation.  This call should
  * be considered collective over comm (with a consistent value for "rndnum"),
  * even though the operation may only be a point-to-point request. */
 static void start_random_nonblocking(MPI_Comm comm, unsigned int rndnum, MPI_Request * req,
@@ -136,8 +136,8 @@ static void start_random_nonblocking(MPI_Comm comm, unsigned int rndnum, MPI_Req
     int *recvcounts = NULL;
     int *sdispls = NULL;
     int *rdispls = NULL;
-    int *sendtypes = NULL;
-    int *recvtypes = NULL;
+    MPI_Datatype *sendtypes = NULL;
+    MPI_Datatype *recvtypes = NULL;
     signed char *buf_alias = NULL;
 
     MPI_Comm_rank(comm, &rank);
@@ -415,12 +415,6 @@ static void check_after_completion(struct laundry *l)
     MPI_Comm comm = l->comm;
     int *buf = l->buf;
     int *recvbuf = l->recvbuf;
-    int *sendcounts = l->sendcounts;
-    int *recvcounts = l->recvcounts;
-    int *sdispls = l->sdispls;
-    int *rdispls = l->rdispls;
-    int *sendtypes = l->sendtypes;
-    int *recvtypes = l->recvtypes;
     char *buf_alias = (char *) buf;
 
     MPI_Comm_rank(comm, &rank);
@@ -802,7 +796,7 @@ int main(int argc, char **argv)
         complete_seq = gen_prn(complete_seq);
         for (i = 0; i < outcount; ++i) {
             int idx = indices[i];
-            assert(reqs[idx] == MPI_REQUEST_NULL);
+          //  assert(reqs[idx] == MPI_REQUEST_NULL);
             if (larr[idx].case_num != -1) {
                 check_after_completion(&larr[idx]);
                 cleanup_laundry(&larr[idx]);