@@ -585,6 +585,14 @@ class test_ucp_ep_based_fence : public test_ucp_rma {
585585 ucs::handle<ucp_rkey_h> rkey;
586586 rbuf.rkey (sender (), rkey);
587587
588+ /*
589+ * Some transports might need some bidirectional progress to be able
590+ * to transmit without using their pending queue.
591+ */
592+ do_rma_op (op, sbuf.ptr (), sizeof (uint32_t ), rbuf.ptr (), rkey);
593+ flush_workers ();
594+ flush_sender_cleanup ();
595+
588596 if (op == OP_ATOMIC) {
589597 (this ->*fence_func)(op, sbuf.ptr (), sizeof (uint32_t ), rbuf.ptr (),
590598 rkey);
@@ -599,12 +607,7 @@ class test_ucp_ep_based_fence : public test_ucp_rma {
599607 flush_workers ();
600608 }
601609
602- void do_rma_op_with_fence_before (op_type_t op, void *sbuf, size_t size,
603- void *target, ucp_rkey_h rkey) {
604- do_fence ();
605- do_rma_op (op, sbuf, size, target, rkey);
606-
607- flush_worker (sender ());
610+ void flush_sender_cleanup () {
608611 /*
609612 * flush_worker() doesn't reset unflushed_lanes yet (planned).
610613 * Manually clear unflushed_lanes to simulate a fence-before-op scenario
@@ -615,6 +618,15 @@ class test_ucp_ep_based_fence : public test_ucp_rma {
615618 */
616619 sender ().ep ()->ext ->unflushed_lanes = 0 ;
617620 }
621+
622+ void do_rma_op_with_fence_before (op_type_t op, void *sbuf, size_t size,
623+ void *target, ucp_rkey_h rkey) {
624+ do_fence ();
625+ do_rma_op (op, sbuf, size, target, rkey);
626+
627+ flush_worker (sender ());
628+ flush_sender_cleanup ();
629+ }
618630private:
619631 static constexpr size_t TEST_BUF_SIZE = 1000000 ;
620632};
0 commit comments