MCPcopy Create free account
hub / github.com/alibaba/GraphScope / RunCTXSSSP

Function RunCTXSSSP

analytical_engine/test/run_string_oid.cc:38–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36 gs::ArrowProjectedFragment<std::string, uint64_t, double, int64_t>;
37
38void RunCTXSSSP(std::shared_ptr<ProjectedFragmentType> fragment,
39 const grape::CommSpec& comm_spec,
40 const std::string& out_prefix) {
41 using AppType = grape::SSSP<ProjectedFragmentType>;
42 auto app = std::make_shared<AppType>();
43 auto worker = AppType::CreateWorker(app, fragment);
44 auto spec = grape::DefaultParallelEngineSpec();
45 worker->Init(comm_spec, spec);
46 MPI_Barrier(comm_spec.comm());
47 worker->Query("v4");
48
49 auto ctx = worker->GetContext();
50
51 worker->Finalize();
52
53 std::ofstream ostream;
54 std::string output_path =
55 grape::GetResultFilename(out_prefix, fragment->fid());
56 LOG(INFO) << "to write to: " << output_path;
57 ostream.open(output_path);
58 ctx->Output(ostream);
59 ostream.close();
60}
61
62void Run(vineyard::Client& client, const grape::CommSpec& comm_spec,
63 vineyard::ObjectID id) {

Callers 1

RunFunction · 0.70

Calls 9

InitMethod · 0.65
fidMethod · 0.65
OutputMethod · 0.65
closeMethod · 0.65
CreateWorkerFunction · 0.50
QueryMethod · 0.45
GetContextMethod · 0.45
FinalizeMethod · 0.45
openMethod · 0.45

Tested by

no test coverage detected