Skip to content

Commit

Permalink
New --collect-interfaces command line flag
Browse files Browse the repository at this point in the history
This allows us to pre-compute the IPs the cluster will use, which we can
then communicate down to the actual cluster run via the
DALIUGE_CLUSTER_IPS environment variable.

Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
  • Loading branch information
rtobar committed Aug 28, 2019
1 parent 5abd1d3 commit 1fd2065
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dlg/deploy/pawsey/start_dfms_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ def main():

parser.add_option('--check-interfaces', action='store_true',
dest='check_interfaces', help = 'Run a small network interfaces test and exit', default=False)
parser.add_option('--collect-interfaces', action='store_true',
dest='collect_interfaces', help = 'Collect all interfaces and exit', default=False)
parser.add_option('--use-ifconfig', action='store_true',
dest='use_ifconfig', help='Use ifconfig to find a suitable external interface/address for each host', default=False)
parser.add_option("-S", "--check_with_session", action="store_true",
Expand Down Expand Up @@ -339,6 +341,14 @@ def main():
except:
logger.exception('Failed to get information via ifconfig')
sys.exit(0)
elif options.collect_interfaces:
from mpi4py import MPI
comm = MPI.COMM_WORLD # @UndefinedVariable
ips = comm.allgather(get_ip(options))
if comm.Get_rank() == 0:
print(' '.join(ips))
sys.exit(0)


if bool(options.logical_graph) == bool(options.physical_graph):
parser.error("Either a logical graph or physical graph filename must be specified")
Expand Down

0 comments on commit 1fd2065

Please sign in to comment.