Skip to content

Commit

Permalink
will convert local_root's './' to abspath to avoid hash conflict in n…
Browse files Browse the repository at this point in the history
…ew dpdispatcher (deepmodeling#582)
  • Loading branch information
felix5572 authored and Cloudac7 committed Dec 1, 2021
1 parent 3907a54 commit 8288b4c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions dpgen/dispatcher/Dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,11 +346,17 @@ def make_dispatcher(mdata, mdata_resource=None, work_path=None, run_tasks=None,
def make_submission(mdata_machine, mdata_resources, commands, work_path, run_tasks, group_size,
forward_common_files, forward_files, backward_files, outlog, errlog):

machine = Machine.load_from_dict(mdata_machine)
resources = Resources.load_from_dict(mdata_resources)

if mdata_machine['local_root'] != './':
raise RuntimeError(f"local_root must be './' in dpgen's machine.json.")

abs_local_root = os.path.abspath('./')

abs_mdata_machine = mdata_machine.copy()
abs_mdata_machine['local_root'] = abs_local_root

machine = Machine.load_from_dict(abs_mdata_machine)
resources = Resources.load_from_dict(mdata_resources)


command = "&&".join(commands)

Expand Down

0 comments on commit 8288b4c

Please sign in to comment.