diff --git a/microbench/fresh_setup/mb5_launch.sh b/microbench/fresh_setup/mb5_launch.sh index 03edfd2..45bb988 100755 --- a/microbench/fresh_setup/mb5_launch.sh +++ b/microbench/fresh_setup/mb5_launch.sh @@ -95,16 +95,20 @@ launch_vllm() { local idx="$1" gpu="$2" port="$3" role="$4" bp="$5" local cfg="{\"kv_connector\":\"MooncakeConnector\",\"kv_role\":\"${role}\"}" local master=$((BASE_MASTER+idx)) - local env_bp_arg="" - if [ -n "${bp}" ] && [ "${bp}" != "-" ]; then - env_bp_arg="VLLM_MOONCAKE_BOOTSTRAP_PORT=${bp}" + # Bootstrap port: always set (vllm only consumes it for producer/kv_both + # modes; kv_consumer mode just ignores it). Use a placeholder if the + # caller didn't supply one — bash one-shot env-prefix with a dynamic + # variable is fragile, so we always export a literal. + local bp_use="${bp}" + if [ -z "${bp_use}" ] || [ "${bp_use}" = "-" ]; then + bp_use="9999" fi echo "[mb5] launching idx=${idx} gpu=${gpu} port=${port} role=${role} bp=${bp:-none}" PYTHONHASHSEED=42 \ MB5_LOG_DIR="${SNAPSHOT_DIR}" \ CUDA_VISIBLE_DEVICES="${gpu}" \ MASTER_PORT="${master}" \ - ${env_bp_arg} \ + VLLM_MOONCAKE_BOOTSTRAP_PORT="${bp_use}" \ nohup vllm serve "${MODEL}" \ --host 0.0.0.0 --port "${port}" \ --tensor-parallel-size 1 \ diff --git a/microbench/fresh_setup/mb5_run.sh b/microbench/fresh_setup/mb5_run.sh index 8e32d39..2efe783 100755 --- a/microbench/fresh_setup/mb5_run.sh +++ b/microbench/fresh_setup/mb5_run.sh @@ -71,19 +71,23 @@ run_one() { local t0 t0=$(date +%s.%N) if ! PYTHONPATH="${FRESH_ROOT}" python -m replayer \ - --endpoint-url "${endpoints}" \ - --trace-path "${TRACE}" \ - --output-path "${replay_out}" \ - --model-name "${MODEL_NAME}" \ + --endpoint "${endpoints}" \ + --trace "${TRACE}" \ + --output "${replay_out}" \ + --model "${MODEL_NAME}" \ ${REQUEST_LIMIT_ARG} \ > "${OUT_ROOT}/${config}_rep${rep}_replay.log" 2>&1; then - local t1=$(date +%s.%N) - echo "[mb5-run] REPLAY FAILED after $(echo "$t1 - $t0" | bc) s; see ${OUT_ROOT}/${config}_rep${rep}_replay.log" + local t1 + t1=$(date +%s.%N) + local wall=$(python -c "print(${t1} - ${t0})") + echo "[mb5-run] REPLAY FAILED after ${wall} s; see ${OUT_ROOT}/${config}_rep${rep}_replay.log" bash "${LAUNCH}" stop > /dev/null 2>&1 || true return 1 fi - local t1=$(date +%s.%N) - local wall_clock_s=$(echo "$t1 - $t0" | bc) + local t1 + t1=$(date +%s.%N) + local wall_clock_s + wall_clock_s=$(python -c "print(${t1} - ${t0})") echo "[mb5-run] replay done in ${wall_clock_s}s" echo "${wall_clock_s}" > "${rundir}/wall_clock_s.txt"