Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/nccl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvain Jeaugey <sjeaugey@nvidia.com>2018-12-04 22:57:35 +0300
committerSylvain Jeaugey <sjeaugey@nvidia.com>2018-12-04 23:10:58 +0300
commitcdae05b27728b1b5b25b3a4f294334df9fb5164d (patch)
tree4d12c67d55d1e9ec0798da1ebf49a04436601485
parent5fe2618c0eed3638cc108e2b5f66f3ddf933202d (diff)
Improve INFO message when external network is not found.
Fix #162
-rw-r--r--src/init.cu13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/init.cu b/src/init.cu
index c9700a8..a8c8011 100644
--- a/src/init.cu
+++ b/src/init.cu
@@ -86,7 +86,14 @@ ncclResult_t initNet(ncclNet_t* net) {
ncclResult_t initNetPlugin(ncclNet_t** net) {
void* netPluginLib = dlopen("libnccl-net.so", RTLD_NOW | RTLD_LOCAL);
if (netPluginLib == NULL) {
- INFO(NCCL_INIT, "Unable to load libnccl-net.so : %s", dlerror());
+ // dlopen does not guarantee to set errno, but dlerror only gives us a
+ // string, so checking errno doesn't hurt to try to provide a better
+ // error message
+ if (errno == ENOENT) {
+ INFO(NCCL_INIT, "No network plugin found.");
+ } else {
+ INFO(NCCL_INIT, "Unable to load libnccl-net.so : %s", dlerror());
+ }
return ncclSuccess;
}
ncclNet_t* extNet = (ncclNet_t*) dlsym(netPluginLib, STR(NCCL_PLUGIN_SYMBOL));
@@ -109,7 +116,7 @@ ncclResult_t initNet() {
NCCLCHECK(initNetPlugin(&ncclNet));
if (ncclNet != NULL) {
- INFO(NCCL_INIT, "Using external Network %s", ncclNetName());
+ INFO(NCCL_INIT, "Using network plugin %s", ncclNetName());
return ncclSuccess;
}
if (initNet(&ncclNetIb) == ncclSuccess) {
@@ -117,7 +124,7 @@ ncclResult_t initNet() {
} else {
ncclNet = &ncclNetSocket;
}
- INFO(NCCL_INIT,"Using internal Network %s", ncclNetName());
+ INFO(NCCL_INIT,"Using network %s", ncclNetName());
return ncclSuccess;
}