Skip to content

Commit

Permalink
Last fixes. Multi nodes is working now.
Browse files Browse the repository at this point in the history
  • Loading branch information
awicenec committed Dec 15, 2021
1 parent 691336a commit 889daa8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions daliuge-engine/dlg/deploy/remotes.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __init__(self, options, my_ip):

def _get_ip_from_name(self, hostname):
rx = re.compile("^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$")
if re.match(hostname): # already an IP??
if rx.match(hostname): # already an IP??
return hostname
else:
return socket.gethostbyname(hostname)
Expand All @@ -55,10 +55,10 @@ def _set_world(self, rank, size, sorted_peers):
"""Called by subclasses"""
self.rank = rank
self.size = size
if len(set(self.sorted_peers)) != self.size:
if len(set(sorted_peers)) != self.size:
raise RuntimeError("More than one task started per node, cannot continue")
# convert nodes to IP addresses if hostnames
self.sorted_peers = list(map(lambda x:self.get_ip_from_name,
self.sorted_peers = list(map(lambda x:self._get_ip_from_name(x),
sorted_peers))
nm_range = self._nm_range()
if nm_range[0] == nm_range[1]:
Expand Down

0 comments on commit 889daa8

Please sign in to comment.