Skip to content

Notes on taking data with the Mellanox NIC

In order to get readout applicaitons working with non-Intel NICs, we needed to allow the user to execute the daq_application as sudo. In order to do this, there is a set of requirements that were implemented in branch PawelPlesniak/RootDAQApp_v2. The changes are summarized as

  • Executing the command as the sudo user.

  • Passing the calling user's environment to the sudo environment with sudo -E

  • Passing the LD_LIBRARY_PATH as sudo -E env LD_LIBRARY_PATH=$LD_LIBRARY_PATH

  • Pointing to the binary of the daq_application as sudo -E env LD_LIBRARY_PATH=$LD_LIBRARY_PATH {shutil.which('daq_application')}

This is is summarized with the very simplistic implementation, which would apply for ALL daq_applications. These notes are left here for reference should we need to implement this more robustly.

if exe_arg.exec == "daq_application":
    cmd += f"sudo -E env LD_LIBRARY_PATH=$LD_LIBRARY_PATH {shutil.which('daq_application')} "
else:
    cmd += exe_arg.exec