Skip to content

Commit 07a39f3

Browse files
authored
Merge pull request #405 from njzjz/mpi
fix MPI execute error
2 parents 908347b + 9b858ea commit 07a39f3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dpgen/generator/run.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ def run_train (iter_index,
454454
command = "{ if [ ! -f model.ckpt.index ]; then %s --init-model old/model.ckpt; else %s --restart model.ckpt; fi }" % (command, command)
455455
else:
456456
command = "{ if [ ! -f model.ckpt.index ]; then %s; else %s --restart model.ckpt; fi }" % (command, command)
457+
command = "/bin/sh -c '%s'" % command
457458
commands.append(command)
458459
command = '%s freeze' % train_command
459460
commands.append(command)
@@ -1014,6 +1015,7 @@ def run_model_devi (iter_index,
10141015
all_task = glob.glob(os.path.join(work_path, "task.*"))
10151016
all_task.sort()
10161017
command = "{ if [ ! -f dpgen.restart.10000 ]; then %s -i input.lammps -v restart 0; else %s -i input.lammps -v restart 1; fi }" % (lmp_exec, lmp_exec)
1018+
command = "/bin/sh -c '%s'" % command
10171019
commands = [command]
10181020

10191021
fp = open (os.path.join(work_path, 'cur_job.json'), 'r')

0 commit comments

Comments
 (0)