]> git.openfabrics.org - ~ardavis/dapl.git/commitdiff
dtest: incorrectly setting completions on each rdma write
authorArlin Davis <arlin.r.davis@intel.com>
Wed, 6 Feb 2013 19:33:21 +0000 (11:33 -0800)
committerArlin Davis <arlin.r.davis@intel.com>
Wed, 6 Feb 2013 20:25:52 +0000 (12:25 -0800)
Fix setting of completion flags based on signal rates.
Change default burst to 100 from 50
Add size of IO to final bandwidth results

Signed-off-by: Arlin Davis <arlin.r.davis@intel.com>
test/dtest/dtest.c

index 7a3f5d9077c96f6003124e803ec823d3cd627b1c..a46fa59ce31e4517ec529953352474ec0122bdcf 100755 (executable)
@@ -198,7 +198,7 @@ static int uni_direction = 0;
 static int align_data=0;
 static int performance_times = 1;
 static int connected = 0;
-static int burst = 50;
+static int burst = 100;
 static int signal_rate = 2;
 static int server = 1;
 static int verbose = 0;
@@ -284,6 +284,8 @@ collect_event(DAT_EVD_HANDLE dto_evd,
        DAT_COUNT       nmore;
        DAT_RETURN      ret = DAT_SUCCESS;
 
+       LOGPRINTF("%d waiting for event...\n", getpid());
+
        if (use_cno) {
 retry:
                /* CNO wait could return EVD's in any order and
@@ -315,6 +317,7 @@ retry:
                        if (counter)
                                (*counter)++;
        }
+       LOGPRINTF("%d event complete\n", getpid());
        return (ret);
 }
 
@@ -727,10 +730,10 @@ complete:
        if (ts.rdma_wr) {
                int msgs = uni_direction ? burst : burst * 2;
 
-               printf("\n%d: RDMA write (%s): Total=%6.2lf usec, %d msgs, itime=%6.2lf us, pc=%d %4.2lf MB/sec\n",
+               printf("\n%d: RDMA write (%s): Total=%6.2lf usec, itime=%6.2lf us, poll=%d, %d x %d, %4.2lf MB/sec\n",
                        getpid(), uni_direction ? "uni-direction" : "bi-direction",
-                       ts.rdma_wr, msgs, ts.rdma_wr / msgs,
-                       rdma_wr_poll_count, (double)(1/(ts.rdma_wr/msgs/buf_len)));
+                       ts.rdma_wr, ts.rdma_wr / msgs, rdma_wr_poll_count, msgs, buf_len,
+                       (double)(1/(ts.rdma_wr/msgs/buf_len)));
        }
 
        if (!performance_times)
@@ -1372,9 +1375,12 @@ DAT_RETURN do_rdma_write_with_msg(void)
 
                sprintf(&sbuf[25], "rdma writes completed == %d", i+1);
                sbuf[buf_len-1] = i;
-               if ((i == (burst - 1)) || (i % (burst-1/signal_rate) == 0))
+               if ((i == (burst - 1)) || (i % (burst/signal_rate) == 0))
                        flags =  DAT_COMPLETION_DEFAULT_FLAG;
-               cookie.as_64 = 0x9999;
+               else
+                       flags = DAT_COMPLETION_SUPPRESS_FLAG;
+
+               cookie.as_64 = i;
                ret = dat_ep_post_rdma_write(h_ep,      // ep_handle
                                             MSG_IOV_COUNT,     // num_segments
                                             l_iov,     // LMR
@@ -1395,6 +1401,11 @@ DAT_RETURN do_rdma_write_with_msg(void)
                                          DTO_TIMEOUT,
                                          &rdma_wr_poll_count) != DAT_SUCCESS)
                                return (DAT_ABORT);
+                       if (event.event_data.dto_completion_event_data.user_cookie.as_64 != i) {
+                               fprintf(stderr, "ERROR rdma_write: cookie=" F64x" exp 0x%x\n",
+                                       event.event_data.dto_completion_event_data.user_cookie.as_64,i);
+                               return (DAT_ABORT);
+                       }
                }
        }
        stop = get_time();
@@ -2157,6 +2168,7 @@ void print_usage(void)
 {
        printf("\n DAPL USAGE \n\n");
        printf("s: server\n");
+       printf("u: unidirectional bandwidth (default=bidirectional\n");
        printf("t: performance times\n");
        printf("c: use cno\n");
        printf("v: verbose\n");