@@ -889,73 +889,73 @@ BOOST_AUTO_TEST_CASE(KlImprover_incremental_update_test) {
889889 CheckEqualAffinityTable (affinity, kl_6.GetAffinityTable (), nodes_to_check);
890890};
891891
892- BOOST_AUTO_TEST_CASE (kl_total_comm_large_test_graphs) {
893- std::vector<std::string> filenames_graph = LargeSpaaGraphs ();
894- using graph = ComputationalDagEdgeIdxVectorImplDefIntT;
892+ // BOOST_AUTO_TEST_CASE(kl_total_comm_large_test_graphs) {
893+ // std::vector<std::string> filenames_graph = LargeSpaaGraphs();
894+ // using graph = ComputationalDagEdgeIdxVectorImplDefIntT;
895895
896- // Getting root git directory
897- std::filesystem::path cwd = std::filesystem::current_path ();
898- std::cout << cwd << std::endl;
899- while ((!cwd.empty ()) && (cwd.filename () != " OneStopParallel" )) {
900- cwd = cwd.parent_path ();
901- std::cout << cwd << std::endl;
902- }
896+ // // Getting root git directory
897+ // std::filesystem::path cwd = std::filesystem::current_path();
898+ // std::cout << cwd << std::endl;
899+ // while ((!cwd.empty()) && (cwd.filename() != "OneStopParallel")) {
900+ // cwd = cwd.parent_path();
901+ // std::cout << cwd << std::endl;
902+ // }
903903
904- for (auto &filename_graph : filenames_graph) {
905- GreedyBspScheduler<ComputationalDagEdgeIdxVectorImplDefIntT> test_scheduler;
906- BspInstance<graph> instance;
907- bool status_graph
908- = file_reader::ReadComputationalDagHyperdagFormatDB ((cwd / filename_graph).string (), instance.GetComputationalDag ());
904+ // for (auto &filename_graph : filenames_graph) {
905+ // GreedyBspScheduler<ComputationalDagEdgeIdxVectorImplDefIntT> test_scheduler;
906+ // BspInstance<graph> instance;
907+ // bool status_graph
908+ // = file_reader::ReadComputationalDagHyperdagFormatDB((cwd / filename_graph).string(), instance.GetComputationalDag());
909909
910- instance.GetArchitecture ().SetSynchronisationCosts (500 );
911- instance.GetArchitecture ().SetCommunicationCosts (5 );
912- instance.GetArchitecture ().SetNumberOfProcessors (4 );
910+ // instance.GetArchitecture().SetSynchronisationCosts(500);
911+ // instance.GetArchitecture().SetCommunicationCosts(5);
912+ // instance.GetArchitecture().SetNumberOfProcessors(4);
913913
914- std::vector<std::vector<int >> send_cost = {
915- {0 , 1 , 4 , 4 },
916- {1 , 0 , 4 , 4 },
917- {4 , 4 , 0 , 1 },
918- {4 , 4 , 1 , 0 }
919- };
914+ // std::vector<std::vector<int>> send_cost = {
915+ // {0, 1, 4, 4},
916+ // {1, 0, 4, 4},
917+ // {4, 4, 0, 1},
918+ // {4, 4, 1, 0}
919+ // };
920920
921- instance.GetArchitecture ().SetSendCosts (send_cost);
921+ // instance.GetArchitecture().SetSendCosts(send_cost);
922922
923- if (!status_graph) {
924- std::cout << " Reading files failed." << std::endl;
925- BOOST_CHECK (false );
926- }
923+ // if (!status_graph) {
924+ // std::cout << "Reading files failed." << std::endl;
925+ // BOOST_CHECK(false);
926+ // }
927927
928- AddMemWeights (instance.GetComputationalDag ());
928+ // AddMemWeights(instance.GetComputationalDag());
929929
930- BspSchedule<graph> schedule (instance);
931- const auto result = test_scheduler.ComputeSchedule (schedule);
930+ // BspSchedule<graph> schedule(instance);
931+ // const auto result = test_scheduler.ComputeSchedule(schedule);
932932
933- schedule.UpdateNumberOfSupersteps ();
933+ // schedule.UpdateNumberOfSupersteps();
934934
935- std::cout << " initial scedule with costs: " << TotalCommunicationCost<graph>()(schedule) << " and "
936- << schedule.NumberOfSupersteps () << " number of supersteps" << std::endl;
935+ // std::cout << "initial scedule with costs: " << TotalCommunicationCost<graph>()(schedule) << " and "
936+ // << schedule.NumberOfSupersteps() << " number of supersteps" << std::endl;
937937
938- BspSchedule<graph> schedule_2 (schedule);
938+ // BspSchedule<graph> schedule_2(schedule);
939939
940- BOOST_CHECK_EQUAL (ReturnStatus::OSP_SUCCESS, result);
941- BOOST_CHECK_EQUAL (&schedule.GetInstance (), &instance);
942- BOOST_CHECK (schedule.SatisfiesPrecedenceConstraints ());
940+ // BOOST_CHECK_EQUAL(ReturnStatus::OSP_SUCCESS, result);
941+ // BOOST_CHECK_EQUAL(&schedule.GetInstance(), &instance);
942+ // BOOST_CHECK(schedule.SatisfiesPrecedenceConstraints());
943943
944- KlTotalCommImprover<graph, NoLocalSearchMemoryConstraint, 1 , true > kl;
944+ // KlTotalCommImprover<graph, NoLocalSearchMemoryConstraint, 1, true> kl;
945945
946- auto start_time = std::chrono::high_resolution_clock::now ();
947- auto status = kl.ImproveSchedule (schedule);
948- auto finish_time = std::chrono::high_resolution_clock::now ();
946+ // auto start_time = std::chrono::high_resolution_clock::now();
947+ // auto status = kl.ImproveSchedule(schedule);
948+ // auto finish_time = std::chrono::high_resolution_clock::now();
949949
950- auto duration = std::chrono::duration_cast<std::chrono::seconds>(finish_time - start_time).count ();
950+ // auto duration = std::chrono::duration_cast<std::chrono::seconds>(finish_time - start_time).count();
951951
952- std::cout << " kl new finished in " << duration << " seconds, costs: " << TotalCommunicationCost<graph>()(schedule)
953- << " with " << schedule.NumberOfSupersteps () << " number of supersteps" << std::endl;
952+ // std::cout << "kl new finished in " << duration << " seconds, costs: " << TotalCommunicationCost<graph>()(schedule)
953+ // << " with " << schedule.NumberOfSupersteps() << " number of supersteps" << std::endl;
954954
955- BOOST_CHECK (status == ReturnStatus::OSP_SUCCESS || status == ReturnStatus::BEST_FOUND);
956- BOOST_CHECK_EQUAL (schedule.SatisfiesPrecedenceConstraints (), true );
957- }
958- }
955+ // BOOST_CHECK(status == ReturnStatus::OSP_SUCCESS || status == ReturnStatus::BEST_FOUND);
956+ // BOOST_CHECK_EQUAL(schedule.SatisfiesPrecedenceConstraints(), true);
957+ // }
958+ // }
959959
960960// BOOST_AUTO_TEST_CASE(kl_total_comm_large_test_graphs_mt) {
961961// std::vector<std::string> filenames_graph = LargeSpaaGraphs();
@@ -999,7 +999,8 @@ BOOST_AUTO_TEST_CASE(kl_total_comm_large_test_graphs) {
999999
10001000// schedule.UpdateNumberOfSupersteps();
10011001
1002- // std::cout << "initial scedule with costs: " << schedule.computeTotalCosts() << " and " << schedule.NumberOfSupersteps()
1002+ // std::cout << "initial scedule with costs: " << TotalCommunicationCost<graph>()(schedule)<< " and " <<
1003+ // schedule.NumberOfSupersteps()
10031004// << " number of supersteps"<< std::endl;
10041005
10051006// BspSchedule<graph> schedule_2(schedule);
@@ -1008,37 +1009,19 @@ BOOST_AUTO_TEST_CASE(kl_total_comm_large_test_graphs) {
10081009// BOOST_CHECK_EQUAL(&schedule.GetInstance(), &instance);
10091010// BOOST_CHECK(schedule.SatisfiesPrecedenceConstraints());
10101011
1011- // using MtImprover = KlImproverMt<graph,
1012- // KlMaxBspCommCostFunction<graph, double, NoLocalSearchMemoryConstraint, EagerCommCostPolicy, 1>,
1013- // NoLocalSearchMemoryConstraint, 1, double>;
1014-
1015- // KlTotalCommImprover_mt<graph,NoLocalSearchMemoryConstraint,1,true> kl;
1012+ // KlTotalCommImproverMt<graph,NoLocalSearchMemoryConstraint,1,true> kl;
10161013
10171014// auto start_time = std::chrono::high_resolution_clock::now();
10181015// auto status = kl.ImproveSchedule(schedule);
10191016// auto finish_time = std::chrono::high_resolution_clock::now();
10201017
10211018// auto duration = std::chrono::duration_cast<std::chrono::seconds>(finish_time - start_time).count();
10221019
1023- // std::cout << "kl new finished in " << duration << " seconds, costs: " << schedule.computeTotalCosts() << " with " <<
1024- // schedule.NumberOfSupersteps() << " number of supersteps"<< std::endl;
1020+ // std::cout << "kl new finished in " << duration << " seconds, costs: " << TotalCommunicationCost<graph>()(schedule) << "
1021+ // with " << schedule.NumberOfSupersteps() << " number of supersteps"<< std::endl;
10251022
10261023// BOOST_CHECK(status == ReturnStatus::OSP_SUCCESS || status == ReturnStatus::BEST_FOUND);
10271024// BOOST_CHECK_EQUAL(schedule.SatisfiesPrecedenceConstraints(), true);
10281025
1029- // // kl_total_comm_test<graph> kl_old;
1030-
1031- // // start_time = std::chrono::high_resolution_clock::now();
1032- // // status = kl_old.improve_schedule_test_2(schedule_2);
1033- // // finish_time = std::chrono::high_resolution_clock::now();
1034-
1035- // // duration = std::chrono::duration_cast<std::chrono::seconds>(finish_time - start_time).count();
1036-
1037- // // std::cout << "kl old finished in " << duration << " seconds, costs: " << schedule_2.computeTotalCosts() << " with "
1038- // << schedule_2.NumberOfSupersteps() << " number of supersteps"<< std::endl;
1039-
1040- // // BOOST_CHECK(status == ReturnStatus::OSP_SUCCESS || status == ReturnStatus::BEST_FOUND);
1041- // // BOOST_CHECK_EQUAL(schedule_2.SatisfiesPrecedenceConstraints(), true);
1042-
10431026// }
10441027// }
0 commit comments