Skip to content

Commit ecce101

Browse files
refactor: run mdprep.sh once before mdrun retry loop
mdprep.sh is idempotent (skips when production checkpoint exists), so there's no reason to re-run it on every SIGABRT/SIGSEGV restart. Only mdrun.sh needs to be retried.
1 parent a3e0411 commit ecce101

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

scripts/gromacs/mdrun/mdrun.sbatch

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,15 @@ export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}
3333

3434
# If the checkpoint file for production exists, will skip the pre-processing step
3535
# and continue from the checkpoint file
36+
bash mdprep.sh
37+
3638
attempt=0
3739
max_restarts=3
3840

3941
while true; do
4042
attempt=$((attempt + 1))
4143
status=0
42-
bash mdprep.sh && bash mdrun.sh || status=$?
44+
bash mdrun.sh || status=$?
4345

4446
if [[ $status -eq 0 ]]; then
4547
exit 0

0 commit comments

Comments
 (0)