pgl 在docker中构建graph报segment fault
Created by: xiuechen
报错信息:
W0720 03:52:59.207820 3586 init.cc:216] Warning: PaddlePaddle catches a failure signal, it may not work properly W0720 03:52:59.207885 3586 init.cc:218] You could check whether you killed PaddlePaddle thread/process accidentally or report the case to PaddlePaddle W0720 03:52:59.207908 3586 init.cc:221] The detail failure signal is:
W0720 03:52:59.207937 3586 init.cc:224] *** Aborted at 1595217179 (unix time) try "date -d @1595217179" if you are using GNU date *** W0720 03:52:59.209323 3586 init.cc:224] PC: @ 0x0 (unknown) W0720 03:52:59.209501 3586 init.cc:224] *** SIGSEGV (@0x0) received by PID 3586 (TID 0x7f213102e740) from PID 0; stack trace: *** W0720 03:52:59.210655 3586 init.cc:224] @ 0x7f2130840630 (unknown) W0720 03:52:59.211284 3586 init.cc:224] @ 0x7f2104830b62 (unknown) W0720 03:52:59.211845 3586 init.cc:224] @ 0x7f210483390d (unknown) W0720 03:52:59.213013 3586 init.cc:224] @ 0x7f2130b32300 PyEval_EvalFrameEx W0720 03:52:59.214179 3586 init.cc:224] @ 0x7f2130b3464d PyEval_EvalCodeEx W0720 03:52:59.215322 3586 init.cc:224] @ 0x7f2130abe07d (unknown) W0720 03:52:59.216428 3586 init.cc:224] @ 0x7f2130a99073 PyObject_Call W0720 03:52:59.217643 3586 init.cc:224] @ 0x7f2130aa8065 (unknown) W0720 03:52:59.218773 3586 init.cc:224] @ 0x7f2130a99073 PyObject_Call W0720 03:52:59.219944 3586 init.cc:224] @ 0x7f2130af0097 (unknown) W0720 03:52:59.221132 3586 init.cc:224] @ 0x7f2130aeedaf (unknown) W0720 03:52:59.222276 3586 init.cc:224] @ 0x7f2130a99073 PyObject_Call W0720 03:52:59.223424 3586 init.cc:224] @ 0x7f2130b2d846 PyEval_EvalFrameEx W0720 03:52:59.224547 3586 init.cc:224] @ 0x7f2130b3464d PyEval_EvalCodeEx W0720 03:52:59.225683 3586 init.cc:224] @ 0x7f2130abdf88 (unknown) W0720 03:52:59.226790 3586 init.cc:224] @ 0x7f2130a99073 PyObject_Call W0720 03:52:59.227934 3586 init.cc:224] @ 0x7f2130a99155 (unknown) W0720 03:52:59.229049 3586 init.cc:224] @ 0x7f2130a9923e PyObject_CallFunction W0720 03:52:59.230197 3586 init.cc:224] @ 0x7f2130ad5561 _PyObject_GenericGetAttrWithDict W0720 03:52:59.231338 3586 init.cc:224] @ 0x7f2130b2f800 PyEval_EvalFrameEx W0720 03:52:59.232473 3586 init.cc:224] @ 0x7f2130b3464d PyEval_EvalCodeEx W0720 03:52:59.233608 3586 init.cc:224] @ 0x7f2130b31b4c PyEval_EvalFrameEx W0720 03:52:59.234735 3586 init.cc:224] @ 0x7f2130b3464d PyEval_EvalCodeEx W0720 03:52:59.235885 3586 init.cc:224] @ 0x7f2130abe07d (unknown) W0720 03:52:59.236999 3586 init.cc:224] @ 0x7f2130a99073 PyObject_Call W0720 03:52:59.238148 3586 init.cc:224] @ 0x7f2130aa8065 (unknown) W0720 03:52:59.239271 3586 init.cc:224] @ 0x7f2130a99073 PyObject_Call W0720 03:52:59.240423 3586 init.cc:224] @ 0x7f2130af0097 (unknown) W0720 03:52:59.241578 3586 init.cc:224] @ 0x7f2130aeedaf (unknown) W0720 03:52:59.242700 3586 init.cc:224] @ 0x7f2130a99073 PyObject_Call W0720 03:52:59.243827 3586 init.cc:224] @ 0x7f2130b2d846 PyEval_EvalFrameEx W0720 03:52:59.244946 3586 init.cc:224] @ 0x7f2130b3464d PyEval_EvalCodeEx Segmentation fault
测试代码: import pgl from pgl import graph # import pgl module import numpy as np
edge_list=[] node_list=[] filename="./testnode.txt" #filename="./edgelist.txt" try: fp=open(filename,"r") print("%s open succesfully"%filename) done=False while not done: aline=fp.readline(); if aline!="": a=long(aline.strip("\n").strip("(").strip(")").split(",")[0]) b=long(aline.strip("\n").strip("(").strip(")").split(",")[1]) edge_list.append((a,b)) node_list.append(a) node_list.append(b) else: done=True fp.close() except IOError: print("%s open failed"%filename)
print type(list) print(edge_list) print(node_list) news_nodes = []
for id in node_list: if id not in news_nodes: news_nodes.append(id) num_node=len(news_nodes) print("%d nodes"%num_node) print(news_nodes)
#num_node=359625121 d = 8 feature = np.random.randn(num_node, d).astype("float32") edge_feature = np.random.randn(len(edge_list), d).astype("float32")
g = graph.Graph(num_nodes = num_node,edges = edge_list,node_feat = {'feature':feature},edge_feat ={'edge_feature': edge_feature})
读入的文件内容: (-4649263633069986650,-5524713781035048896) (1271252742248293960,5257009004707542774) (-7235151214169208912,-801785351457387666) (3878525930642985553,-4845667399646036208) (3787724060214927072,2498311633260070737) (-1926501030799233262,-2531193103782375080) (5379329040149508336,-1753726466388496271) (-2731878471209782768,7141705257445771183) (208737387650153426,-4842986495434924796) (6859451388928841912,-1849683348999068048) (-5297793359529213911,-730495328556966270) (-8990674550612404115,5475799282437796300) (8281941951883016219,2817935382386340348) (-3531905366784664905,8330449695852382521)
我的paddle版本是: PaddlePaddle 1.8.3, compiled with with_avx: ON with_gpu: OFF with_mkl: ON with_mkldnn: ON with_python: ON
python版本2.7.5