Commit 18486628 authored by Jakob Luettgau's avatar Jakob Luettgau
Browse files

Allow easy debugging via logging for darshan-utils discovery.

parent 154952fa
...@@ -149,6 +149,7 @@ def find_utils(ffi, libdutil): ...@@ -149,6 +149,7 @@ def find_utils(ffi, libdutil):
if libdutil is None: if libdutil is None:
try: try:
library_path = discover_darshan_shutil() library_path = discover_darshan_shutil()
logger.debug(f"Attempting library_path={library_path} via shutil discovery.")
libdutil = ffi.dlopen(library_path + "/lib/libdarshan-util.so") libdutil = ffi.dlopen(library_path + "/lib/libdarshan-util.so")
except: except:
libdutil = None libdutil = None
...@@ -156,24 +157,27 @@ def find_utils(ffi, libdutil): ...@@ -156,24 +157,27 @@ def find_utils(ffi, libdutil):
if libdutil is None: if libdutil is None:
try: try:
library_path = discover_darshan_pkgconfig() library_path = discover_darshan_pkgconfig()
logger.debug(f"Attempting library_path={library_path} via pkgconfig discovery.")
libdutil = ffi.dlopen(library_path + "/lib/libdarshan-util.so") libdutil = ffi.dlopen(library_path + "/lib/libdarshan-util.so")
except: except:
libdutil = None libdutil = None
if libdutil is None: if libdutil is None:
try: try:
DARSHAN_PATH = discover_darshan_wheel() darshan_path = discover_darshan_wheel()
import glob import glob
library_path = glob.glob(f'{DARSHAN_PATH}/libdarshan-util*.so')[0] library_path = glob.glob(f'{darshan_path}/libdarshan-util*.so')[0]
logger.debug(f"Attempting library_path={library_path} in case of binary wheel.")
libdutil = ffi.dlopen(library_path) libdutil = ffi.dlopen(library_path)
except: except:
libdutil = None libdutil = None
if libdutil is None: if libdutil is None:
try: try:
DARSHAN_PATH = discover_darshan_pyinstaller() darshan_path = discover_darshan_pyinstaller()
import glob import glob
library_path = glob.glob(f'{DARSHAN_PATH}/libdarshan-util*.so')[0] library_path = glob.glob(f'{darshan_path}/libdarshan-util*.so')[0]
logger.debug(f"Attempting library_path={library_path} for pyinstaller bundles.")
libdutil = ffi.dlopen(library_path) libdutil = ffi.dlopen(library_path)
except: except:
libdutil = None libdutil = None
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment