Skip to content

Commit

Permalink
Update Princeton site interface from ib0 to op0
Browse files Browse the repository at this point in the history
  • Loading branch information
leeskelvin committed Feb 27, 2023
1 parent c3cf636 commit 0260ec0
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions python/lsst/ctrl/bps/parsl/sites/princeton.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from parsl.addresses import address_by_interface
from parsl.executors.base import ParslExecutor
from parsl.launchers import SrunLauncher
from psutil import net_if_addrs

from ..configuration import get_bps_config_value
from ..environment import export_environment
Expand Down Expand Up @@ -91,10 +92,10 @@ def select_executor(self, job: "ParslJob") -> str:
return "tiger"

def get_address(self) -> str:
"""Return the IP address of the machine hosting the driver/submission
"""Return the IP address of the machine hosting the driver/submission.
This address should be accessible from the workers. This should
generally by the return value of one of the functions in
The host machine address should be accessible from the workers. This
should generally be the return value of one of the functions in
``parsl.addresses``.
This is used by the default implementation of ``get_monitor``, but will
Expand All @@ -104,4 +105,8 @@ def get_address(self) -> str:
interface, because the cluster nodes can't connect to the head node
through the regular internet.
"""
return address_by_interface("ib0")
net_interfaces = [interface for interface in net_if_addrs().keys() if interface[:2] in ["ib", "op"]]
if net_interfaces:
return address_by_interface(net_interfaces[0])
else:
raise RuntimeError("No Infiniband network interface found.")

0 comments on commit 0260ec0

Please sign in to comment.