Skip to content

Commit

Permalink
remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zhihuidu committed Feb 18, 2023
1 parent 3aa0919 commit 8e05f3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 36 deletions.
34 changes: 2 additions & 32 deletions client/arkouda_graph/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ def graph_query(graph: Graph, component: str) -> pdarray:
if attr < 0:
assert graph.weighted > 0
'''
#args = "{} {}".format(graph.name,component)
args = {"GraphName":graph.name,"Component":component}
repMsg = generic_msg(cmd=cmd, args=args)

Expand Down Expand Up @@ -375,8 +374,6 @@ def graph_file_tonde(Ne: int, Nv: int, Ncol: int, directed: int, filename: str,s
RuntimeError
"""
cmd = "segmentedGraphToNDE"
#args = "{} {} {} {} {} {} {} {} {} {}".format(Ne, Nv, Ncol, directed, filename,skipline, \
# RemapFlag, DegreeSortFlag, RCMFlag, WriteFlag)
args = {"NumOfEdges":Ne, "NumOfVertices":Nv, "NumOfColumns":Ncol,\
"Directed":directed, "FileName":filename,"SkipLines":skipline, \
"RemapFlag":RemapFlag, "DegreeSortFlag":DegreeSortFlag,\
Expand Down Expand Up @@ -425,8 +422,6 @@ def graph_file_read(Ne: int, Nv: int, Ncol: int, directed: int, filename: str,\
RuntimeError
"""
cmd = "segmentedGraphFile"
#args = "{} {} {} {} {} {} {} {} {} {}".format(Ne, Nv, Ncol, directed, filename, \
# RemapFlag, DegreeSortFlag, RCMFlag, WriteFlag,BuildAlignedArray)
args = {"NumOfEdges":Ne, "NumOfVertices":Nv, "NumOfColumns":Ncol,\
"Directed":directed, "FileName":filename, \
"RemapFlag":RemapFlag, "DegreeSortFlag":DegreeSortFlag,\
Expand Down Expand Up @@ -469,8 +464,6 @@ def graph_file_read_mtx(Ne: int, Nv: int, Ncol: int, directed: int, filename: st
RuntimeError
"""
cmd = "segmentedGraphFileMtx"
#args = "{} {} {} {} {} {} {} {} {} {}".format(Ne, Nv, Ncol, directed, filename, \
# RemapFlag, DegreeSortFlag, RCMFlag, WriteFlag,BuildAlignedArray)
args = {"NumOfEdges":Ne, "NumOfVertices":Nv, "NumOfColumns":Ncol,\
"Directed":directed, "FileName":filename, \
"RemapFlag":RemapFlag, "DegreeSortFlag":DegreeSortFlag,\
Expand Down Expand Up @@ -501,11 +494,9 @@ def rmat_gen(lgNv: int, Ne_per_v: int, p: float, directed: int, weighted: int) -
"""
cmd = "segmentedRMAT"
RCMFlag = 1
#args = "{} {} {} {} {} {}".format(lgNv, Ne_per_v, p, directed, weighted, RCMFlag)
args = {"LogNumOfVertices":lgNv, "NumOfEdgesPerV":Ne_per_v,"SP":p,\
"Directed":directed,"Weighted": weighted,\
"RCMFlag":RCMFlag}
#msg = "segmentedRMAT {} {} {} {} {}".format(lgNv, Ne_per_v, p, directed, weighted)
repMsg = generic_msg(cmd=cmd, args=args)

return Graph(*(cast(str, repMsg).split('+')))
Expand Down Expand Up @@ -533,9 +524,6 @@ def graph_bfs(graph: Graph, root: int, rcm_flag:int) -> pdarray:
"""
cmd = "segmentedGraphBFS"
DefaultRatio = -0.9
#args = "{} {} {} {} {} {} {} {}".format(
# rcm_flag, graph.n_vertices, graph.n_edges,
# graph.directed, graph.weighted, graph.name, root, DefaultRatio)
args = {"RCMFlag":rcm_flag,"NumOfVertices":graph.n_vertices,"NumOfEdges":graph.n_edges,\
"Directed":graph.directed,"Weighted": graph.weighted,\
"GraphName":graph.name,"Root":root,"Ratio":DefaultRatio}
Expand Down Expand Up @@ -563,8 +551,6 @@ def graph_cc(graph: Graph) -> pdarray:
RuntimeError
"""
cmd = "segmentedGraphCC"
#args = "{} {} {} {} {}".format( graph.n_vertices, graph.n_edges, graph.directed, graph.weighted,
# graph.name)
args = {"NumOfVertices":graph.n_vertices,"NumOfEdges":graph.n_edges,\
"Directed":graph.directed,"Weighted":graph.weighted,\
"GraphName":graph.name}
Expand Down Expand Up @@ -604,7 +590,6 @@ def stream_file_read(Ne:int, Nv:int,Ncol:int,directed:int, filename: str,\
RuntimeError
"""
cmd = "segmentedStreamFile"
#args="{} {} {} {} {} {}".format(Ne, Nv, Ncol,directed, filename,factor);
args = { "NumOfEdges":Ne, "NumOfVertices":Nv, \
"NumOfColumns":Ncol, "Directed":directed,\
"FileName":filename,"Factor":factor}
Expand Down Expand Up @@ -636,8 +621,6 @@ def graph_triangle (graph: Graph, vertexArray:str ) -> pdarray:
RuntimeError
"""
cmd="segmentedGraphTri"
#args = "{} {} {} {} {}".format( graph.n_vertices,graph.n_edges,\
# graph.directed,graph.weighted, graph.name)
args = {"NumOfVertices":graph.n_vertices,"NumOfEdges":graph.n_edges,\
"Directed":graph.directed,"Weighted": graph.weighted,\
"GraphName":graph.name,"VertexArray":vertexArray}
Expand Down Expand Up @@ -665,10 +648,6 @@ def graph_ktruss(graph: Graph,kTrussValue:int) -> pdarray:
RuntimeError
"""
cmd="segmentedTruss"
#args = "{} {} {} {} {} {}".format( kTrussValue,\
# graph.n_vertices,graph.n_edges,\
# graph.directed,graph.weighted,\
# graph.name)
args = {"KValue":kTrussValue,"NumOfVertices":graph.n_vertices,"NumOfEdges":graph.n_edges,\
"Directed":graph.directed,"Weighted": graph.weighted,\
"GraphName":graph.name}
Expand All @@ -681,7 +660,6 @@ def graph_ktruss(graph: Graph,kTrussValue:int) -> pdarray:
def stream_tri_cnt(Ne:int, Nv:int,Ncol:int,directed:int, filename: str,\
factor:int) -> pdarray:
cmd = "segmentedStreamTri"
#args="{} {} {} {} {} {}".format(Ne, Nv, Ncol,directed, filename,factor);
args = { "NumOfEdges":graph.n_edges, "NumOfVertices":graph.n_vertices,\
"NumOfColumns":Ncol, "Directed":directed, "FileName": filename,\
"Factor":factor}
Expand Down Expand Up @@ -722,7 +700,6 @@ def streamPL_tri_cnt(Ne:int, Nv:int,Ncol:int,directed:int, filename: str,\
RuntimeError
"""
cmd = "segmentedPLStreamTri"
#args="{} {} {} {} {} {} {}".format(Ne, Nv, Ncol,directed, filename,factor,case);
args = { "NumOfEdges":Ne, "NumOfVertices":Nv,\
"NumOfColumns":Ncol, "Directed":directed, "FileName": filename,\
"Factor":factor,"Case":case}
Expand All @@ -748,8 +725,6 @@ def graph_tri_ctr (graph: Graph) -> pdarray:
RuntimeError
"""
cmd="segmentedGraphTriCtr"
#args = "{} {} {} {} {}".format( graph.n_vertices,graph.n_edges,\
# graph.directed,graph.weighted, graph.name)

args = {"NumOfVertices":graph.n_vertices,"NumOfEdges":graph.n_edges,\
"Directed":graph.directed,"Weighted": graph.weighted,\
Expand All @@ -776,8 +751,6 @@ def graph_jaccard_coefficient(graph: Graph) -> pdarray:
RuntimeError
"""
cmd="segmentedGraphJaccard"
#args = "{} {} {} {} {}".format( graph.n_vertices,graph.n_edges,\
# graph.directed,graph.weighted, graph.name)
args = {"NumOfVertices":graph.n_vertices,"NumOfEdges":graph.n_edges,\
"Directed":graph.directed,"Weighted": graph.weighted,\
"GraphName":graph.name}
Expand All @@ -804,8 +777,6 @@ def graph_jaccard_hash(graph: Graph) -> pdarray:
RuntimeError
"""
cmd="segmentedGraphJaccardHash"
#args = "{} {} {} {} {}".format( graph.n_vertices,graph.n_edges,\
# graph.directed,graph.weighted, graph.name)
args = {"NumOfVertices":graph.n_vertices,"NumOfEdges":graph.n_edges,\
"Directed":graph.directed,"Weighted": graph.weighted,\
"GraphName":graph.name}
Expand All @@ -816,10 +787,9 @@ def graph_jaccard_hash(graph: Graph) -> pdarray:


@typechecked
def graph_add_property(graph:Graph, propertyname:str,array:pdarray) -> None:
def graph_add_property(graph:Graph, propertyname:str,array:pdarray) -> Graph:
cmd="segmentedGraphProperty"
args = { "GraphName":graph.name, "Property":propertyname, "Data":array }
repMsg = generic_msg(cmd=cmd,args=args)
#return Graph(*(cast(str, repMsg).split('+')))
return None
return Graph(*(cast(str, repMsg).split('+')))

6 changes: 2 additions & 4 deletions server/GraphMsg.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -4781,8 +4781,6 @@ module GraphMsg {
var gEntry:borrowed GraphSymEntry = getGraphSymEntry(graphEntryName, st);
var ag = gEntry.graph;

var retMsg:string="success";

var ProEntry = st.lookup(ArrayName): borrowed SymEntry(int);
var ProAry=toSymEntry(ProEntry,int).a;
select PropertyName {
Expand Down Expand Up @@ -4824,8 +4822,8 @@ module GraphMsg {

outMsg= "graph property add takes "+timer.elapsed():string;
smLogger.debug(getModuleName(),getRoutineName(),getLineNumber(),outMsg);
smLogger.debug(getModuleName(),getRoutineName(),getLineNumber(),retMsg);
return new MsgTuple(retMsg, MsgType.NORMAL);
smLogger.debug(getModuleName(),getRoutineName(),getLineNumber(),repMsg);
return new MsgTuple(repMsg, MsgType.NORMAL);
}


Expand Down

0 comments on commit 8e05f3b

Please sign in to comment.