Skip to content
Draft
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
18 changes: 18 additions & 0 deletions htsim/sim/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,24 @@ set(SOURCE_FILES
add_library(htsim STATIC ${SOURCE_FILES})
target_include_directories(htsim PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) # Needed for header-only libraries (e.g., loggertypes.h).

# find_package(Boost REQUIRED COMPONENTS stacktrace_basic)
# target_link_libraries(htsim PRIVATE Boost::stacktrace_basic)
# target_compile_definitions(htsim PRIVATE BOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED)

# JsonCpp support
set(JSONCPP_WITH_CMAKE_PACKAGE ON)
set(JSONCPP_CXX_STANDARD 23)

FetchContent_Declare(
jsoncpp
GIT_REPOSITORY https://github.com/open-source-parsers/jsoncpp.git
GIT_TAG 1.9.6
)

FetchContent_MakeAvailable(jsoncpp)
# find_package(JsonCpp CONFIG REQUIRED)
target_link_libraries(htsim PRIVATE jsoncpp_lib)

# Add subdirectories
add_subdirectory(datacenter)

Expand Down
3 changes: 1 addition & 2 deletions htsim/sim/atlahs_htsim_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ void AtlahsHtsimApi::Send(const SendEvent &event, graph_node_properties elem) {
}
auto per_flow_mp = mp_factory();

UecSrc *uecSrc = new UecSrc(traffic_logger, *_eventlist, std::move(per_flow_mp), *uec_nics.at(from), 1);

UecSrc *uecSrc = new UecSrc(traffic_logger, *_eventlist, std::move(per_flow_mp), *uec_nics.at(from), 1, false, tag);
// setFlowsize is the correct method name
uecSrc->setFlowsize(size);
uecSrc->initNscc(cwnd_b, base_rtt_bw_two_points);
Expand Down
4 changes: 4 additions & 0 deletions htsim/sim/datacenter/main_uec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,10 @@ int main(int argc, char **argv) {
FatTreeSwitch::set_strategy(FatTreeSwitch::RR);
}
i++;
} else if (!strcmp(argv[i], "-pcm_cc_config_file")) {
UecSrc::pcm_cc_config_filename = argv[i+1];
cout << "PCM configuration file: "<< UecSrc::pcm_cc_config_filename << endl;
i++;
} else {
cout << "Unknown parameter " << argv[i] << endl;
exit_error(argv[0]);
Expand Down
Loading