Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions astra-sim-alibabacloud/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SCRIPT_DIR=$(dirname "$(realpath $0)")
NS3_BUILD_DIR="${SCRIPT_DIR:?}"/build/astra_ns3
SIMAI_PHY_BUILD_DIR="${SCRIPT_DIR:?}"/build/simai_phy
SIMAI_ANALYTICAL_BUILD_DIR="${SCRIPT_DIR:?}"/build/simai_analytical
SIM_LOG_DIR=/etc/astra-sim
SIM_LOG_DIR="${SCRIPT_DIR:?}"/log
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This updates SIM_LOG_DIR to a writable repo-local path and the script creates directories under it, but parts of the simulator still appear to hardcode /etc/astra-sim for logs/results (e.g., MockNcclLog.h and SimAiMain.cc). If the goal is to avoid sudo requirements beyond just the build step, consider wiring SIM_LOG_DIR through to runtime (env/config/compile-time define) and aligning those hardcoded paths with this setting.

Suggested change
SIM_LOG_DIR="${SCRIPT_DIR:?}"/log
SIM_LOG_DIR="${SCRIPT_DIR:?}"/log
export SIM_LOG_DIR

Copilot uses AI. Check for mistakes.

# Functions
function cleanup_build {
Expand Down Expand Up @@ -71,4 +71,4 @@ case "$1" in
printf -- "-c|--compile mode supported ns3/phy/analytical (example:./build.sh -c ns3)\n"
printf -- "-l|--clean (example:./build.sh -l ns3)\n"
printf -- "-lr|--clean-result mode (example:./build.sh -lr ns3)\n"
esac
esac
4 changes: 2 additions & 2 deletions astra-sim-alibabacloud/build/astra_ns3/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ASTRA_SIM_DIR="${SCRIPT_DIR:?}"/../../astra-sim
INPUT_DIR="${SCRIPT_DIR:?}"/../../inputs
NS3_DIR="${SCRIPT_DIR:?}"/../../extern/network_backend/ns3-interface
NS3_APPLICATION="${NS3_DIR:?}"/simulation/src/applications/
SIM_LOG_DIR=/etc/astra-sim
SIM_LOG_DIR="${SCRIPT_DIR:?}"/log
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SIM_LOG_DIR is now set relative to this sub-build script ("${SCRIPT_DIR}"/log), which differs from the top-level astra-sim-alibabacloud/build.sh log directory (repo-root/log). Even though SIM_LOG_DIR is currently unused here, this mismatch can cause confusion or inconsistent behavior if the commented-out copy-to-log logic is re-enabled; consider pointing both scripts at the same repo-level log directory (e.g., by computing it relative to the repo root) or passing it in from the parent script.

Copilot uses AI. Check for mistakes.
BUILD_DIR="${SCRIPT_DIR:?}"/build/
RESULT_DIR="${SCRIPT_DIR:?}"/result/
BINARY="${BUILD_DIR}"/gem5.opt
Expand Down Expand Up @@ -91,4 +91,4 @@ case "$1" in
compile;;
-h|--help|*)
printf "Prints help message";;
esac
esac
Loading