public override void ConfigurationHandler(ConfigurationMessageReader request) { // graph loading graph_name = request.graph_name; input_vertex_path = request.input_vertex_path; input_edge_path = request.input_edge_path; l_output_path = request.l_output_path; directed = request.directed; weighted = request.weighted; // execuing e_job_id = request.e_job_id; e_log_path = request.e_log_path; algorithm = request.algorithm; source_vertex = request.source_vertex; maxIteration = request.maxIteration; damping_factor = request.damping_factor; input_path = request.input_path; e_output_path = request.e_output_path; home_dir = request.home_dir; num_machines = request.num_machines; num_threads = request.num_threads; // termination t_job_id = request.t_job_id; t_log_path = request.t_log_path; Console.WriteLine("##################################"); Console.WriteLine("SENT CONFIGURATION PACKET:"); showConfiguration(); Console.WriteLine("##################################"); }
public override void LoadGraphHandler(ConfigurationMessageReader request) { consumerThread = new Thread(new ThreadStart(LoadConsumerThread)); consumerThread.Start(); if (Global.MyServerID == 0) { for (int i = 1; i < Global.ServerCount; i++) { communicationThread = new Thread(new ParameterizedThreadStart(CommunicationThread)); communicationThread.Start(i); } } Console.WriteLine("NAME:" + this.input_vertex_path); int myID = Global.MyServerID; loader[myID] = new ParallelBenchmarkGraphLoader(); Console.WriteLine("Started Load"); loader[myID].setPath(this.input_edge_path); loader[myID].vpath = this.input_vertex_path; loader[myID].hasWeight = this.weighted; loader[myID].directed = directed; loader[myID].loadVertices(); loader[myID].LoadGraph(); ranLoader = true; //loader.dumpLoadCells(); }
public override void RunHandler(ConfigurationMessageReader request) { Console.WriteLine("Started Run"); int mapped_node; if (ranLoader == false) { Console.WriteLine("Loader not run before"); } else { benchmarkAlgorithm.setMaxNode(loader[Global.MyServerID].getMaxNode()); benchmarkAlgorithm.mapping1 = loader[Global.MyServerID].mapping1; benchmarkAlgorithm.mapping2 = loader[Global.MyServerID].mapping2; //benchmarkAlgorithm.mapping1_array = loader.mapping1_array; benchmarkAlgorithm.graph_name = graph_name; benchmarkAlgorithm.e_log_path = e_log_path; benchmarkAlgorithm.setOutputPath(e_output_path); mapped_node = (int)loader[Global.MyServerID].mapping2[this.source_vertex]; Console.WriteLine("Start at {0}", mapped_node); SimpleGraphNode rootNode = Global.CloudStorage.LoadSimpleGraphNode(mapped_node); benchmarkAlgorithm.all_starts = loader[Global.MyServerID].all_starts; benchmarkAlgorithm.BFSLocal(rootNode); ranLoader = true; /** * //Distributed Try with Message Sorter * for(int i = 0; i < Global.ServerCount; i++){ * FinishCommunicator fc = new FinishCommunicator(); * fc.Finished = false; * fc.LastLoad = false; * long fcid = i; * //Console.WriteLine("CREATE COMMUNICATION CELL:" + fcid); * Global.CloudStorage.SaveFinishCommunicator(Int64.MaxValue-fcid, fc); * } **/ //StartBFS(mapped_node); } /** * Thread.Sleep(1000); * while(msgQueue.Count > 0){ * Thread.Sleep(10); * } * Console.WriteLine("FinishedServer0");**/ }
public override void SynPingHandler(ConfigurationMessageReader request) { Console.WriteLine("Received Graph: {0}", request.graph_name); LoadGraphHandler(request); RunHandler(request); }
public override void DeleteGraphHandler(ConfigurationMessageReader request) { //Console.WriteLine(Global.GetTotalMemoryUsage()); Global.CloudStorage.ResetStorage(); }
public override void TerminateHandler(ConfigurationMessageReader request) { // The platform forcibly stops the benchmark job and clean up the environment, given that the time-out has been reached. }
public override void FinalizeHandler(ConfigurationMessageReader request) { // The platform reports the benchmark information and makes the environment ready for the next benchmark run. }
public override void SetupHandler(ConfigurationMessageReader request) { }
public override void PrepareHandler(ConfigurationMessageReader request) { // The platform requests computation resources from the cluster environment and makes the background applications ready. }