Skip to content

Commit

Permalink
Incorporating start_dfms_cluster as "dlg cluster"
Browse files Browse the repository at this point in the history
This was a long due change. Now that start_dfms_cluster is in better
shape we can more easily incorporate it into our dlg tool, and offer it
more widely. In time the module will probably change name (it's the only
"dfms" reference we still have in the code), but "dlg cluster" will
remain.

Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
  • Loading branch information
rtobar committed Jul 8, 2019
1 parent 11d9d79 commit b15df03
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dlg/deploy/pawsey/start_dfms_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,8 @@ def get_remote(opts):
else: # == 'slurm'
return remotes.SlurmRemote(opts, my_ip)

def main():
def run(parser, args):

parser = argparse.ArgumentParser()
parser.add_argument("-l", "--log_dir",
help="Log directory (required)")
# if this parameter is present, it means we want to get monitored
Expand Down Expand Up @@ -308,7 +307,7 @@ def main():
parser.add_argument('-r', '--remote-mechanism', help='The mechanism used by this script to coordinate remote processes',
choices=['mpi', 'slurm', 'lfs'], default='mpi')

options = parser.parse_args()
options = parser.parse_args(args)

if options.check_interfaces:
print("From netifaces: %s" % get_ip_via_netifaces())
Expand Down Expand Up @@ -388,4 +387,5 @@ def main():
utils.wait_or_kill(proc, 1e8, period=5)

if __name__ == '__main__':
main()
print('WARNING: Prefer the dlg cluster command instead')
run(argparse.ArgumentParser(), sys.argv)
1 change: 1 addition & 0 deletions dlg/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ def wrapped(*args, **kwargs):
cmdwrap('proxy', 'A reverse proxy to be used in restricted environments to contact the Drop Managers')('dlg.deploy.pawsey.dfms_proxy:run')
cmdwrap('monitor', 'A proxy to be used in conjunction with the dlg proxy in restricted environments')('dlg.deploy.pawsey.dfms_monitor:run')
cmdwrap('lgweb', 'A Web server for the Logical Graph Editor')('dlg.dropmake.web.lg_web:run')
cmdwrap('cluster', 'Starts a DALiuGE cluster in HPC environments')('dlg.deploy.pawsey.start_dfms_cluster:run')

@cmdwrap('version', 'Reports the DALiuGE version and exits')
def version(parser, args):
Expand Down

0 comments on commit b15df03

Please sign in to comment.