File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -154,6 +154,16 @@ endif()
154154find_package (NUMA REQUIRED)
155155find_package (Threads REQUIRED)
156156
157+ set (CMAKE_COLOR_DIAGNOSTICS ON )
158+ function (msg_red text)
159+ string (ASCII 27 ESC)
160+ message ("${ESC} [31m${text}${ESC} [0m" )
161+ endfunction ()
162+
163+ if (NOT IBVERBS_FOUND)
164+ msg_red("libibverbs not found. Install libibverbs-dev or rdma-core-devel." )
165+ endif ()
166+
157167include (FetchContent)
158168FetchContent_Declare(json URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz)
159169FetchContent_MakeAvailable(json)
Original file line number Diff line number Diff line change @@ -17,7 +17,18 @@ struct IBVerbs {
1717 // Static method to initialize the library
1818 static void initialize () {
1919 initialized = true ;
20- handle = dlopen (" libibverbs.so" , RTLD_NOW);
20+
21+ // Try different versions of libibverbs
22+ const char * lib_possible_names[] = {
23+ " libibverbs.so" ,
24+ " libibverbs.so.1" ,
25+ };
26+ for (int i = 0 ; lib_possible_names[i] != nullptr ; i++) {
27+ handle = dlopen (lib_possible_names[i], RTLD_NOW);
28+ if (handle) {
29+ break ;
30+ }
31+ }
2132 if (!handle) {
2233 throw mscclpp::IbError (" Failed to load libibverbs: " + std::string (dlerror ()), errno);
2334 }
You can’t perform that action at this time.
0 commit comments