Skip to content
Snippets Groups Projects
Commit e6250a33 authored by Carsten Patzke's avatar Carsten Patzke
Browse files

Added env 'ASAPO_PRINT_FALLBACK_REASON' to see why TCP was used

parent f66de6bc
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,7 @@ auto const kNotSupportedOnBuildError = FabricErrorTemplate {
"This build of ASAPO does not support LibFabric", FabricErrorType::kNotSupported
};
auto const kLibraryNotFoundError = FabricErrorTemplate {
"asapo-fabric, LibFabric or dependencies were not found", FabricErrorType::kLibraryNotFound
"LibFabric or dependencies were not found", FabricErrorType::kLibraryNotFound
};
auto const kLibraryCompatibilityError = FabricErrorTemplate {
"LibFabric was found but somehow some a function is missing", FabricErrorType::kLibraryCompatibilityError
......
......@@ -15,7 +15,7 @@ std::unique_ptr<FabricFactory> asapo::fabric::GenerateDefaultFabricFactory() {
return std::unique_ptr<FabricFactory>(new FabricFactoryImpl());
}
void* handle = dlopen("libfabric.so", RTLD_LAZY);
void* handle = dlopen("libfabric.so.1", RTLD_LAZY);
if (handle) {
#define ADD_FABRIC_CALL(fName) do { if (!(*((void**)&gffm().fName) = dlsym(handle, #fName))) goto functionNotFoundError; } while(0)
ADD_FABRIC_CALL(fi_version);
......
......@@ -7,6 +7,7 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include <rdma/fi_tagged.h>
#include <iostream>
#include "fabric_context_impl.h"
#include "fabric_memory_region_impl.h"
......@@ -31,8 +32,7 @@ std::string __PRETTY_FUNCTION_TO_NAMESPACE__(const std::string& prettyFunction)
} \
} while(0) // Enforce ';'
// TODO: It is super important that version 1.10 is installed, but since its not released yet we go with 1.9
const uint32_t FabricContextImpl::kMinExpectedLibFabricVersion = FI_VERSION(1, 9);
const uint32_t FabricContextImpl::kMinExpectedLibFabricVersion = FI_VERSION(1, 11);
FabricContextImpl::FabricContextImpl() : io__{ GenerateDefaultIO() }, alive_check_response_task_(this) {
}
......
......@@ -49,6 +49,6 @@ void FabricSelfRequeuingTask::AfterCompletion() {
}
}
FabricContextImpl* FabricSelfRequeuingTask::ParentContext() {
FabricContextImpl* FabricSelfRequeuingTask::ParentContext() const {
return parent_context_;
}
......@@ -25,7 +25,7 @@ class FabricSelfRequeuingTask : public FabricTask {
void HandleCompletion(const fi_cq_tagged_entry* entry, FabricAddress source) final;
void HandleErrorCompletion(const fi_cq_err_entry* errEntry) final;
protected:
FabricContextImpl* ParentContext();
FabricContextImpl* ParentContext() const;
virtual void RequeueSelf() = 0;
virtual void OnCompletion(const fi_cq_tagged_entry* entry, FabricAddress source) = 0;
......
......@@ -10,7 +10,7 @@ FabricHandshakeAcceptingTask::FabricHandshakeAcceptingTask(FabricServerImpl* par
: FabricSelfRequeuingTask(parentServerContext) {
}
FabricServerImpl* FabricHandshakeAcceptingTask::ServerContext() {
FabricServerImpl* FabricHandshakeAcceptingTask::ServerContext() const {
return dynamic_cast<FabricServerImpl*>(ParentContext());
}
......
......@@ -18,7 +18,7 @@ class FabricHandshakeAcceptingTask : public FabricSelfRequeuingTask {
explicit FabricHandshakeAcceptingTask(FabricServerImpl* server);
private:
FabricServerImpl* ServerContext();
FabricServerImpl* ServerContext() const;
protected: // override FabricSelfRequeuingTask
void RequeueSelf() override;
......
......@@ -134,6 +134,8 @@ Error ServerDataBroker::ProcessPostRequest(const RequestInfo& request, RequestOu
httpclient__->Post(RequestWithToken(request.host + request.api) + request.extra_params, request.cookie,
request.body, &response->data_output, response->data_output_size, code);
break;
default:
break;
}
return err;
}
......@@ -373,6 +375,10 @@ Error ServerDataBroker::TryGetDataFromBuffer(const FileInfo* info, FileData* dat
return error; // Successfully received data and is now using a fabric client
}
if (std::getenv("ASAPO_PRINT_FALLBACK_REASON")) {
std::cout << "Fallback to TCP because error: " << error << std::endl;
}
// Retry with TCP
should_try_rdma_first_ = false;
error = nullptr;
......
......@@ -24,6 +24,7 @@ void ReceiverDataServer::Run() {
if (err == IOErrorTemplates::kTimeout) {
continue;
}
if (!err) {
err = request_pool__->AddRequests(std::move(requests));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment