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
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ if(use_rdma)
add_definitions(-DPHY_RDMA)
message("PROJECT_SOURCE_DIR: ${PROJECT_SOURCE_DIR}")
endif()

if(DEFINED ENV{SIM_LOG_DIR})
add_definitions(-DSIM_LOG_DIR="$ENV{SIM_LOG_DIR}")
endif()
set(CMAKE_BUILD_TYPE Debug)
add_executable(SimAI_phynet ${SOURCES} ${HEADERS})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
#ifdef PHY_RDMA
#include "astra-sim/system/SimAiFlowModelRdma.hh"
#endif
#define RESULT_PATH "/etc/astra-sim/results/ncclFlowModel_"
#ifndef SIM_LOG_DIR
#define SIM_LOG_DIR "/etc/astra-sim"
#endif
#define RESULT_PATH SIM_LOG_DIR "/results/ncclFlowModel_"

using namespace std;

Expand Down
5 changes: 4 additions & 1 deletion astra-sim-alibabacloud/astra-sim/system/MockNcclLog.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
#include <cstdarg>
#include <thread>

#define LOG_PATH "/etc/astra-sim/"
#ifndef SIM_LOG_DIR
#define SIM_LOG_DIR "/etc/astra-sim"
#endif
#define LOG_PATH SIM_LOG_DIR "/"

enum class NcclLogLevel { DEBUG, INFO, WARNING,ERROR};

Expand Down
8 changes: 4 additions & 4 deletions astra-sim-alibabacloud/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ 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
Comment thread
marcodamico marked this conversation as resolved.
export SIM_LOG_DIR

# Functions
function cleanup_build {
Expand Down Expand Up @@ -43,8 +44,7 @@ function compile {
mkdir -p "${SIM_LOG_DIR}"/config/
mkdir -p "${SIM_LOG_DIR}"/topo/
mkdir -p "${SIM_LOG_DIR}"/results/
local option="$1"
cd "${BUILD_DIR}" || exit
local option="$1"
case "$option" in
"ns3")
cd "${NS3_BUILD_DIR}"
Expand All @@ -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="${SIM_LOG_DIR:-"${SCRIPT_DIR:?}"/../../log}"
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