Skip to content

Commit

Permalink
Libwrap checks for LIB.so.1 if LIB.so not found
Browse files Browse the repository at this point in the history
Change-Id: I6f07f887f828cb2259dcfd496a2ad707db898cf5
Reviewed-on: http://git-master/r/1000162
Reviewed-by: Przemek Tredak <[email protected]>
Tested-by: Przemek Tredak <[email protected]>
  • Loading branch information
nluehr authored and ptrendx committed Jan 29, 2016
1 parent 2758353 commit caa40b8
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/libwrap.cu
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,20 @@ ncclResult_t wrapSymbols(void) {

nvmlhandle=dlopen("libnvidia-ml.so", RTLD_NOW);
if (!nvmlhandle) {
WARN("Failed to open libnvidia-ml.so");
goto teardown;
nvmlhandle=dlopen("libnvidia-ml.so.1", RTLD_NOW);
if (!nvmlhandle) {
WARN("Failed to open libnvidia-ml.so[.1]");
goto teardown;
}
}

cuhandle = dlopen("libcuda.so", RTLD_NOW);
if (!cuhandle) {
WARN("Failed to open libcuda.so");
goto teardown;
cuhandle = dlopen("libcuda.so.1", RTLD_NOW);
if (!cuhandle) {
WARN("Failed to open libcuda.so[.1]");
goto teardown;
}
}

#define LOAD_SYM(handle, symbol, funcptr) do { \
Expand Down

0 comments on commit caa40b8

Please sign in to comment.