Skip to content

Commit

Permalink
fix dispatcher bugs in autotest run (#568)
Browse files Browse the repository at this point in the history
* fix typo in github actions release to conda

* Get from_poscar_path only when from_poscar is true (#537)

Change-Id: I17774bee345634e4e72bd783e8112eefaaf9f0d3

Co-authored-by: Zhengju Sha <[email protected]>

* fix dispatcher bugs in autotest run

Change-Id: I0e48ec74d0a0d0d6c26988c6e8c28428a362b5d9

Co-authored-by: Han Wang <[email protected]>
Co-authored-by: felix5572 <[email protected]>
Co-authored-by: Zhengju Sha <[email protected]>
  • Loading branch information
4 people authored Oct 11, 2021
1 parent eacf7bc commit cb67774
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- 'v*'

jobs:
publish-conda:
conda-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
58 changes: 29 additions & 29 deletions dpgen/auto_test/common_equi.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,35 +159,35 @@ def run_equi(confs,
disp = make_dispatcher(machine, resources, work_path, [run_tasks[ii]], group_size)
print("%s --> Runing... "%(work_path))

api_version = mdata.get('api_version', '0.9')
if LooseVersion(api_version) < LooseVersion('1.0'):
warnings.warn(f"the dpdispatcher will be updated to new version."
f"And the interface may be changed. Please check the documents for more details")
disp.run_jobs(resources,
command,
work_path,
[run_tasks[ii]],
group_size,
forward_common_files,
forward_files,
backward_files,
outlog='outlog',
errlog='errlog')
elif LooseVersion(api_version) >= LooseVersion('1.0'):
submission = make_submission(
mdata_machine=machine,
mdata_resource=resources,
commands=[command],
work_path=work_path,
run_tasks=run_tasks,
group_size=group_size,
forward_common_files=forward_common_files,
forward_files=forward_files,
backward_files=backward_files,
outlog = 'outlog',
errlog = 'errlog'
)
submission.run_submission()
api_version = mdata.get('api_version', '0.9')
if LooseVersion(api_version) < LooseVersion('1.0'):
warnings.warn(f"the dpdispatcher will be updated to new version."
f"And the interface may be changed. Please check the documents for more details")
disp.run_jobs(resources,
command,
work_path,
[run_tasks[ii]],
group_size,
forward_common_files,
forward_files,
backward_files,
outlog='outlog',
errlog='errlog')
elif LooseVersion(api_version) >= LooseVersion('1.0'):
submission = make_submission(
mdata_machine=machine,
mdata_resource=resources,
commands=[command],
work_path=work_path,
run_tasks=run_tasks,
group_size=group_size,
forward_common_files=forward_common_files,
forward_files=forward_files,
backward_files=backward_files,
outlog = 'outlog',
errlog = 'errlog'
)
submission.run_submission()


def post_equi(confs, inter_param):
Expand Down
2 changes: 1 addition & 1 deletion dpgen/data/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ def out_dir_name(jdata) :
from_poscar = False
if 'from_poscar' in jdata :
from_poscar = jdata['from_poscar']
from_poscar_path = jdata['from_poscar_path']

if from_poscar:
from_poscar_path = jdata['from_poscar_path']
poscar_name = os.path.basename(from_poscar_path)
cell_str = "%02d" % (super_cell[0])
for ii in range(1,len(super_cell)) :
Expand Down

0 comments on commit cb67774

Please sign in to comment.