Skip to content

Commit

Permalink
util: parallel_sim.sh: support gz and zstd suffix checkpoints
Browse files Browse the repository at this point in the history
Change-Id: I8315594f40e3b152368fd382057d67eb40be1642
  • Loading branch information
jensen-yan committed Jul 29, 2024
1 parent 13142f9 commit 1a93940
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions util/xs_scripts/parallel_sim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,15 @@ function prepare_env() {
all_args=("$@")
task=${all_args[0]}
task_path=${all_args[1]}
suffix="zstd"
checkpoint=$(find -L $cpt_dir -wholename "*${task_path}*${suffix}" | head -n 1)
# 同时匹配 gz zstd 后缀
suffixes=("gz" "zstd")
checkpoint=""
for suffix in "${suffixes[@]}"; do
checkpoint=$(find -L $cpt_dir -wholename "*${task_path}*${suffixes}" | head -n 1)
if [ -n "$checkpoint" ]; then
break
fi
done
echo $checkpoint

export work_dir=$full_work_dir/$task
Expand Down

0 comments on commit 1a93940

Please sign in to comment.