Skip to content

Commit

Permalink
Fix nvml init error when libnvidia-ml.so ist not found
Browse files Browse the repository at this point in the history
This fixes sysfeatures, where likwid was compiled with Nvidia support,
but is run on a system without Nvidia runtime libraries or GPU.
  • Loading branch information
ipatix committed Dec 4, 2024
1 parent c98e60c commit cf782c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/sysFeatures.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,7 @@ int likwid_sysft_init(void)
#ifdef LIKWID_WITH_NVMON
err = likwid_sysft_init_nvml(&_feature_list);
if (err < 0)
{
ERROR_PRINT(Failed to initialize SysFeatures nvml module);
return err;
}
DEBUG_PRINT(DEBUGLEV_INFO, Failed to initialize SysFeatures nvml module);
#endif

DEBUG_PRINT(DEBUGLEV_DEVELOP, Initialized %d features, _feature_list.num_features);
Expand Down
2 changes: 1 addition & 1 deletion src/sysFeatures_nvml.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ int likwid_sysft_init_nvml(_SysFeatureList *list)

if (!dl_nvml)
{
ERROR_PRINT(dlopen(libnvidia-ml.so) failed: %s, dlerror());
DEBUG_PRINT(DEBUGLEV_INFO, dlopen(libnvidia-ml.so) failed: %s, dlerror());
return -ELIBACC;
}

Expand Down

0 comments on commit cf782c8

Please sign in to comment.