Skip to content

Commit ae9b62a

Browse files
authored
Revert "gloo: async" (#425)
This reverts commit fbdac74. fbshipit-source-id: 4cfad1d7b70082f5ebbe90aa76e2ca88bb4565f5
1 parent fbdac74 commit ae9b62a

27 files changed

+77
-259
lines changed

gloo/test/allgather_test.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,6 @@ TEST_F(AllgatherNewTest, TestTimeout) {
167167
AllgatherOptions opts(context);
168168
opts.setInput(input.getPointer(), 1);
169169
opts.setOutput(output.getPointer(), context->size);
170-
171-
// Run one operation first so we're measuring the operation timeout not
172-
// connection timeout.
173-
allgather(opts);
174-
175170
opts.setTimeout(std::chrono::milliseconds(10));
176171
if (context->rank == 0) {
177172
try {

gloo/test/allgatherv_test.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,6 @@ TEST_F(AllgathervTest, TestTimeout) {
9595
std::vector<size_t> counts({1, 1});
9696
AllgathervOptions opts(context);
9797
opts.setOutput(output.getPointer(), counts);
98-
99-
// Run one operation first so we're measuring the operation timeout not
100-
// connection timeout.
101-
allgatherv(opts);
102-
10398
opts.setTimeout(std::chrono::milliseconds(10));
10499
if (context->rank == 0) {
105100
try {

gloo/test/allreduce_test.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -389,11 +389,6 @@ TEST_F(AllreduceNewTest, TestTimeout) {
389389
AllreduceOptions opts(context);
390390
opts.setOutputs(outputs.getPointers(), 1);
391391
opts.setReduceFunction(getFunction<uint64_t>());
392-
393-
// Run one operation first so we're measuring the operation timeout not
394-
// connection timeout.
395-
allreduce(opts);
396-
397392
opts.setTimeout(std::chrono::milliseconds(10));
398393
if (context->rank == 0) {
399394
try {

gloo/test/barrier_test.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,18 +127,12 @@ INSTANTIATE_TEST_CASE_P(
127127
TEST_F(BarrierNewTest, TestTimeout) {
128128
spawn(Transport::TCP, 2, [&](std::shared_ptr<Context> context) {
129129
BarrierOptions opts(context);
130-
131-
// Run barrier first so we're measuring the barrier timeout not connection
132-
// timeout.
133-
barrier(opts);
134-
135130
opts.setTimeout(std::chrono::milliseconds(10));
136131
if (context->rank == 0) {
137132
try {
138133
barrier(opts);
139134
FAIL() << "Expected exception to be thrown";
140135
} catch (::gloo::IoException& e) {
141-
std::cerr << e.what() << std::endl;
142136
ASSERT_NE(std::string(e.what()).find("Timed out"), std::string::npos);
143137
}
144138
}

gloo/test/base_test.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ const char* kDefaultDevice = "localhost";
1717
// Transports that instantiated algorithms can be tested against.
1818
const std::vector<Transport> kTransportsForClassAlgorithms = {
1919
Transport::TCP,
20-
Transport::TCP_LAZY,
2120
#if GLOO_HAVE_TRANSPORT_TCP_TLS
2221
Transport::TCP_TLS,
2322
#endif
@@ -28,7 +27,6 @@ const std::vector<Transport> kTransportsForClassAlgorithms = {
2827
// preferred over the instantiated style.
2928
const std::vector<Transport> kTransportsForFunctionAlgorithms = {
3029
Transport::TCP,
31-
Transport::TCP_LAZY,
3230
#if GLOO_HAVE_TRANSPORT_TCP_TLS
3331
Transport::TCP_TLS,
3432
#endif
@@ -39,8 +37,6 @@ std::shared_ptr<::gloo::transport::Device> createDevice(Transport transport) {
3937
#if GLOO_HAVE_TRANSPORT_TCP
4038
if (transport == Transport::TCP) {
4139
return ::gloo::transport::tcp::CreateDevice(kDefaultDevice);
42-
} else if (transport == Transport::TCP_LAZY) {
43-
return ::gloo::transport::tcp::CreateLazyDevice(kDefaultDevice);
4440
}
4541
#endif
4642
#if GLOO_HAVE_TRANSPORT_TCP_TLS

gloo/test/base_test.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ class Barrier {
5959

6060
enum Transport {
6161
TCP,
62-
TCP_LAZY,
6362
#if GLOO_HAVE_TRANSPORT_TCP_TLS
6463
TCP_TLS,
6564
#endif

gloo/test/broadcast_test.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,6 @@ TEST_F(BroadcastTest, TestTimeout) {
182182
BroadcastOptions opts(context);
183183
opts.setOutput(output.getPointer(), 1);
184184
opts.setRoot(0);
185-
186-
// Run one operation first so we're measuring the operation timeout not
187-
// connection timeout.
188-
broadcast(opts);
189-
190185
opts.setTimeout(std::chrono::milliseconds(10));
191186
if (context->rank == 0) {
192187
try {

gloo/test/gather_test.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,6 @@ TEST_F(GatherTest, TestTimeout) {
7676
opts.setInput(input.getPointer(), 1);
7777
opts.setOutput(output.getPointer(), context->size);
7878
opts.setRoot(0);
79-
80-
// Run one operation first so we're measuring the operation timeout not
81-
// connection timeout.
82-
gather(opts);
83-
8479
opts.setTimeout(std::chrono::milliseconds(10));
8580
if (context->rank == 0) {
8681
try {

gloo/test/gatherv_test.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,6 @@ TEST_F(GathervTest, TestTimeout) {
106106
opts.setRoot(0);
107107
opts.setInput(input.getPointer(), 1);
108108
opts.setOutput(output.getPointer(), counts);
109-
110-
// Run one operation first so we're measuring the operation timeout not
111-
// connection timeout.
112-
gatherv(opts);
113-
114109
opts.setTimeout(std::chrono::milliseconds(10));
115110
if (context->rank == 0) {
116111
try {

gloo/test/multiproc_test.h

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -102,31 +102,11 @@ class MultiProcWorker {
102102
auto device = createDevice(transport);
103103
context->setTimeout(std::chrono::milliseconds(kMultiProcTimeout));
104104
context->connectFullMesh(store_, device);
105-
106-
// Wait for all workers to be ready
107-
ringBarrier(context);
108-
109105
device.reset();
110106
sem_post(semaphore_);
111107
fn(std::move(context));
112108
}
113109

114-
void ringBarrier(std::shared_ptr<::gloo::rendezvous::Context>& context) {
115-
int sendScratch = 0;
116-
int recvScratch = 0;
117-
auto sendBuf =
118-
context->createUnboundBuffer(&sendScratch, sizeof(sendScratch));
119-
auto recvBuf =
120-
context->createUnboundBuffer(&recvScratch, sizeof(recvScratch));
121-
const auto leftRank = (context->size + context->rank - 1) % context->size;
122-
const auto rightRank = (context->rank + 1) % context->size;
123-
124-
sendBuf->send(leftRank, 0);
125-
recvBuf->recv(rightRank, 0);
126-
sendBuf->waitSend();
127-
recvBuf->waitRecv();
128-
}
129-
130110
protected:
131111
std::shared_ptr<::gloo::rendezvous::Store> store_;
132112
sem_t* semaphore_;

0 commit comments

Comments
 (0)