Running the adjusted version of page_rank for a test graph (very small one) failed without any meaningful logs.

Start installing queries, about 1 minute …

pageRank_wt query: curl -X GET ‘http://127.0.0.1:9000/query/test_graph/pageRank_wt?[max_change=VALUE]&[max_iter=VALUE]&[damping=VALUE]&[result_attr=VALUE]&[display_edges=VALUE]’. Add -H “Authorization: Bearer TOKEN” if authentication is enabled.

[ ] 0% (0/1)

[ ] 0% (0/1) Query test_graph_pageRank_wt compilation failed!

Query installation failed!

gsql code:

CREATE QUERY pageRank_wt (FLOAT max_change=0.001, INT max_iter=25, FLOAT damping=0.85, STRING result_attr = “page_rank_score”, BOOL display_edges = FALSE) for Graph test_graph syntax V2{

```
HeapAccum<Vertex_Score>(top_k, score DESC) @@topScores;
MaxAccum<FLOAT> @@max_diff = 9999; # max score change in an iteration
SumAccum<FLOAT> @recvd_score = 0; # sum of scores each vertex receives FROM neighbors
SumAccum<FLOAT> @score = 1; # initial score for every vertex is 1.
SetAccum<EDGE> @@edgeSet; # list of all edges, if display is needed
SumAccum<FLOAT> @total_wt;
```

# Calculate the total weight for each vertex

```
Start = SELECT s
FROM Company:s -((LINK>):e) - Company:t
ACCUM s.@total_wt += e.weight;
```

# PageRank iterations

```
# Start with all vertices of specified type(s)
WHILE @@max_diff > max_change LIMIT max_iter DO
@@max_diff = 0;
V = SELECT s
FROM Start:s -((LINK>):e)- Company:t
ACCUM t.@recvd_score += s.@score * e.weight/s.@total_wt
POST-ACCUM s.@score = (1.0-damping) + damping * s.@recvd_score,
s.@recvd_score = 0,
@@max_diff += abs(s.@score - s.@score');
END; # END WHILE loop
V = SELECT s FROM Start:s
POST-ACCUM
IF result_attr != "" THEN s.setAttr(result_attr, s.@score) END;
```

}

Graph schema: Company nodes, linked directed relationship between companies

gadmin status shows all green

running a free version of TG using docker on MAC