Skip to content

Commit d67aa7f

Browse files
authored
Merge pull request #346 from Cloudac7/jump
supporting rev_mat parameters when using sys_rev_mat(#328) and other fix
2 parents e68519e + 81523ef commit d67aa7f

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

dpgen/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
SHORT_CMD="dpgen"
99
dlog = logging.getLogger(__name__)
1010
dlog.setLevel(logging.INFO)
11-
dlogf = logging.FileHandler(os.getcwd()+os.sep+SHORT_CMD+'.log')
11+
dlogf = logging.FileHandler(os.getcwd()+os.sep+SHORT_CMD+'.log', delay=True)
1212
dlogf_formatter=logging.Formatter('%(asctime)s - %(levelname)s : %(message)s')
1313
#dlogf_formatter=logging.Formatter('%(asctime)s - %(name)s - [%(filename)s:%(funcName)s - %(lineno)d ] - %(levelname)s \n %(message)s')
1414
dlogf.setFormatter(dlogf_formatter)

dpgen/dispatcher/LSF.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def sub_script_head(self, res):
108108
if res['node_cpu']:
109109
ret += '#BSUB -R span[ptile=%d]\n' % res['node_cpu']
110110
if res.get('new_lsf_gpu', False):
111-
# supportted in LSF >= 10.1.0 SP6
111+
# supported in LSF >= 10.1.0 SP6
112112
# ref: https://www.ibm.com/support/knowledgecenter/en/SSWRJV_10.1.0/lsf_resource_sharing/use_gpu_res_reqs.html
113113
ret += '#BSUB -n %d\n#BSUB -gpu "num=%d:mode=shared:j_exclusive=yes"\n' % (
114114
res['numb_gpu'], res['task_per_node'])

dpgen/dispatcher/Slurm.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ def sub_script_head(self, res):
8181
ret += "#SBATCH -t %s\n" % res['time_limit']
8282
if res['mem_limit'] > 0 :
8383
ret += "#SBATCH --mem=%dG \n" % res['mem_limit']
84+
if len(res['job_name']) > 0:
85+
ret += '#SBATCH --job-name=%s\n' % res['job_name']
8486
if len(res['account']) > 0 :
8587
ret += "#SBATCH --account=%s \n" % res['account']
8688
if len(res['partition']) > 0 :

dpgen/generator/run.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,8 +869,10 @@ def _make_model_devi_revmat(iter_index, jdata, mdata, conf_systems):
869869
shutil.copyfile(plm_templ, 'input.plumed')
870870
with open('input.plumed') as fp:
871871
plm_lines = fp.readlines()
872+
# allow using the same list as lmp
873+
# user should not use the same key name for plm
872874
plm_lines = revise_by_keys(
873-
plm_lines, total_rev_keys[total_num_lmp:], total_rev_item[total_num_lmp:]
875+
plm_lines, total_rev_keys, total_rev_item
874876
)
875877
with open('input.plumed', 'w') as fp:
876878
fp.write(''.join(plm_lines))

0 commit comments

Comments
 (0)