Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

train_inst2vec.py fails on specific file during vocabulary building #11

Closed
Zacharias030 opened this issue Aug 15, 2019 · 11 comments
Closed

Comments

@Zacharias030
Copy link
Collaborator

Workaround: delete ncc/data/shoc/sho/ProgressBar.ll from the dataset before preprocessing.

The file is ncc/data/shoc/sho/ProgressBar.ll and the problem seems to be that this file has only a single LLVM IR instruction that goes into the XFG and later we end up with an empty graph and a call to
build_H_dictionary(D, skip_window, folder, filename, dictionary, stmts_cut_off)
that fails at nx.adjacency_matrix(D).

The xfg has 2 nodes: a root_node and the one mentioned above, so IMHO the dual-xfg should still contain a single node, which it doesn't and that is causing the problem.

@Zacharias030
Copy link
Collaborator Author

Zacharias030 commented Aug 15, 2019

The file, remaining line is @_ZN11ProgressBar7barDoneE = local_unnamed_addr constant [81 x i8] c"================================================================================\00", align 16, !dbg !0

source_filename = "ProgressBar.cpp"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@_ZN11ProgressBar7barDoneE = local_unnamed_addr constant [81 x i8] c"================================================================================\00", align 16, !dbg !0

!llvm.dbg.cu = !{!2}
!llvm.module.flags = !{!326, !327, !328}
!llvm.ident = !{!329}

!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
!1 = distinct !DIGlobalVariable(name: "barDone", linkageName: "_ZN11ProgressBar7barDoneE", scope: !2, file: !3, line: 5, type: !254, isLocal: false, isDefinition: true, declaration: !257)
!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 6.0.0 (https://github.com/flang-compiler/flang-driver.git ff464b402e7de78568f65cb0f9ea5f940f5b58f1) (https://github.com/flang-compiler/llvm.git 4f97b00a89865ab8998aa88b5708822cba21380b)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, imports: !6)
!3 = !DIFile(filename: "ProgressBar.cpp", directory: "/home/shoshijak/Documents/smt2vec/data/shoc/src/common")
!4 = !{}
!5 = !{!0}
!6 = !{!7, !15, !19, !26, !30, !35, !37, !46, !50, !54, !69, !73, !77, !81, !85, !90, !94, !98, !102, !106, !114, !118, !122, !124, !128, !132, !137, !143, !147, !151, !153, !161, !165, !173, !175, !179, !183, !187, !191, !196, !201, !206, !207, !208, !209, !211, !212, !213, !214, !215, !216, !217, !219, !220, !221, !222, !223, !224, !225, !230, !231, !232, !233, !234, !235, !236, !237, !238, !239, !240, !241, !242, !243, !244, !245, !246, !247, !248, !249, !250, !251, !252, !253}
!7 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !9, file: !14, line: 52)
!8 = !DINamespace(name: "std", scope: null)
!9 = !DISubprogram(name: "abs", scope: !10, file: !10, line: 774, type: !11, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!10 = !DIFile(filename: "/usr/include/stdlib.h", directory: "/home/shoshijak/Documents/smt2vec/data/shoc/src/common")
!11 = !DISubroutineType(types: !12)
!12 = !{!13, !13}
!13 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
!14 = !DIFile(filename: "/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0/bits/std_abs.h", directory: "/home/shoshijak/Documents/smt2vec/data/shoc/src/common")
!15 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !16, file: !18, line: 124)
!16 = !DIDerivedType(tag: DW_TAG_typedef, name: "div_t", file: !10, line: 101, baseType: !17)
!17 = !DICompositeType(tag: DW_TAG_structure_type, file: !10, line: 97, flags: DIFlagFwdDecl, identifier: "_ZTS5div_t")
!18 = !DIFile(filename: "/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0/cstdlib", directory: "/home/shoshijak/Documents/smt2vec/data/shoc/src/common")
!19 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !20, file: !18, line: 125)
!20 = !DIDerivedType(tag: DW_TAG_typedef, name: "ldiv_t", file: !10, line: 109, baseType: !21)
!21 = distinct !DICompositeType(tag: DW_TAG_structure_type, file: !10, line: 105, size: 128, elements: !22, identifier: "_ZTS6ldiv_t")
!22 = !{!23, !25}
!23 = !DIDerivedType(tag: DW_TAG_member, name: "quot", scope: !21, file: !10, line: 107, baseType: !24, size: 64)
!24 = !DIBasicType(name: "long int", size: 64, encoding: DW_ATE_signed)
!25 = !DIDerivedType(tag: DW_TAG_member, name: "rem", scope: !21, file: !10, line: 108, baseType: !24, size: 64, offset: 64)
!26 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !27, file: !18, line: 127)
!27 = !DISubprogram(name: "abort", scope: !10, file: !10, line: 515, type: !28, isLocal: false, isDefinition: false, flags: DIFlagPrototyped | DIFlagNoReturn, isOptimized: true)
!28 = !DISubroutineType(types: !29)
!29 = !{null}
!30 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !31, file: !18, line: 128)
!31 = !DISubprogram(name: "atexit", scope: !10, file: !10, line: 519, type: !32, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!32 = !DISubroutineType(types: !33)
!33 = !{!13, !34}
!34 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !28, size: 64)
!35 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !36, file: !18, line: 131)
!36 = !DISubprogram(name: "at_quick_exit", scope: !10, file: !10, line: 524, type: !32, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!37 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !38, file: !18, line: 134)
!38 = !DISubprogram(name: "atof", scope: !39, file: !39, line: 26, type: !40, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!39 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/stdlib-float.h", directory: "/home/shoshijak/Documents/smt2vec/data/shoc/src/common")
!40 = !DISubroutineType(types: !41)
!41 = !{!42, !43}
!42 = !DIBasicType(name: "double", size: 64, encoding: DW_ATE_float)
!43 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !44, size: 64)
!44 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !45)
!45 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)
!46 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !47, file: !18, line: 135)
!47 = !DISubprogram(name: "atoi", scope: !10, file: !10, line: 278, type: !48, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!48 = !DISubroutineType(types: !49)
!49 = !{!13, !43}
!50 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !51, file: !18, line: 136)
!51 = !DISubprogram(name: "atol", scope: !10, file: !10, line: 283, type: !52, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!52 = !DISubroutineType(types: !53)
!53 = !{!24, !43}
!54 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !55, file: !18, line: 137)
!55 = !DISubprogram(name: "bsearch", scope: !56, file: !56, line: 20, type: !57, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!56 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h", directory: "/home/shoshijak/Documents/smt2vec/data/shoc/src/common")
!57 = !DISubroutineType(types: !58)
!58 = !{!59, !60, !60, !62, !62, !65}
!59 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
!60 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !61, size: 64)
!61 = !DIDerivedType(tag: DW_TAG_const_type, baseType: null)
!62 = !DIDerivedType(tag: DW_TAG_typedef, name: "size_t", file: !63, line: 62, baseType: !64)
!63 = !DIFile(filename: "/usr/local/lib/clang/6.0.0/include/stddef.h", directory: "/home/shoshijak/Documents/smt2vec/data/shoc/src/common")
!64 = !DIBasicType(name: "long unsigned int", size: 64, encoding: DW_ATE_unsigned)
!65 = !DIDerivedType(tag: DW_TAG_typedef, name: "__compar_fn_t", file: !10, line: 741, baseType: !66)
!66 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !67, size: 64)
!67 = !DISubroutineType(types: !68)
!68 = !{!13, !60, !60}
!69 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !70, file: !18, line: 138)
!70 = !DISubprogram(name: "calloc", scope: !10, file: !10, line: 468, type: !71, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!71 = !DISubroutineType(types: !72)
!72 = !{!59, !62, !62}
!73 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !74, file: !18, line: 139)
!74 = !DISubprogram(name: "div", scope: !10, file: !10, line: 788, type: !75, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!75 = !DISubroutineType(types: !76)
!76 = !{!16, !13, !13}
!77 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !78, file: !18, line: 140)
!78 = !DISubprogram(name: "exit", scope: !10, file: !10, line: 543, type: !79, isLocal: false, isDefinition: false, flags: DIFlagPrototyped | DIFlagNoReturn, isOptimized: true)
!79 = !DISubroutineType(types: !80)
!80 = !{null, !13}
!81 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !82, file: !18, line: 141)
!82 = !DISubprogram(name: "free", scope: !10, file: !10, line: 483, type: !83, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!83 = !DISubroutineType(types: !84)
!84 = !{null, !59}
!85 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !86, file: !18, line: 142)
!86 = !DISubprogram(name: "getenv", scope: !10, file: !10, line: 564, type: !87, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!87 = !DISubroutineType(types: !88)
!88 = !{!89, !43}
!89 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !45, size: 64)
!90 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !91, file: !18, line: 143)
!91 = !DISubprogram(name: "labs", scope: !10, file: !10, line: 775, type: !92, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!92 = !DISubroutineType(types: !93)
!93 = !{!24, !24}
!94 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !95, file: !18, line: 144)
!95 = !DISubprogram(name: "ldiv", scope: !10, file: !10, line: 790, type: !96, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!96 = !DISubroutineType(types: !97)
!97 = !{!20, !24, !24}
!98 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !99, file: !18, line: 145)
!99 = !DISubprogram(name: "malloc", scope: !10, file: !10, line: 466, type: !100, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!100 = !DISubroutineType(types: !101)
!101 = !{!59, !62}
!102 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !103, file: !18, line: 147)
!103 = !DISubprogram(name: "mblen", scope: !10, file: !10, line: 862, type: !104, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!104 = !DISubroutineType(types: !105)
!105 = !{!13, !43, !62}
!106 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !107, file: !18, line: 148)
!107 = !DISubprogram(name: "mbstowcs", scope: !10, file: !10, line: 873, type: !108, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!108 = !DISubroutineType(types: !109)
!109 = !{!62, !110, !113, !62}
!110 = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !111)
!111 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !112, size: 64)
!112 = !DIBasicType(name: "wchar_t", size: 32, encoding: DW_ATE_signed)
!113 = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !43)
!114 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !115, file: !18, line: 149)
!115 = !DISubprogram(name: "mbtowc", scope: !10, file: !10, line: 865, type: !116, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!116 = !DISubroutineType(types: !117)
!117 = !{!13, !110, !113, !62}
!118 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !119, file: !18, line: 151)
!119 = !DISubprogram(name: "qsort", scope: !10, file: !10, line: 764, type: !120, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!120 = !DISubroutineType(types: !121)
!121 = !{null, !59, !62, !62, !65}
!122 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !123, file: !18, line: 154)
!123 = !DISubprogram(name: "quick_exit", scope: !10, file: !10, line: 549, type: !79, isLocal: false, isDefinition: false, flags: DIFlagPrototyped | DIFlagNoReturn, isOptimized: true)
!124 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !125, file: !18, line: 157)
!125 = !DISubprogram(name: "rand", scope: !10, file: !10, line: 374, type: !126, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!126 = !DISubroutineType(types: !127)
!127 = !{!13}
!128 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !129, file: !18, line: 158)
!129 = !DISubprogram(name: "realloc", scope: !10, file: !10, line: 480, type: !130, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!130 = !DISubroutineType(types: !131)
!131 = !{!59, !59, !62}
!132 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !133, file: !18, line: 159)
!133 = !DISubprogram(name: "srand", scope: !10, file: !10, line: 376, type: !134, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!134 = !DISubroutineType(types: !135)
!135 = !{null, !136}
!136 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned)
!137 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !138, file: !18, line: 160)
!138 = !DISubprogram(name: "strtod", scope: !10, file: !10, line: 164, type: !139, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!139 = !DISubroutineType(types: !140)
!140 = !{!42, !113, !141}
!141 = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !142)
!142 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !89, size: 64)
!143 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !144, file: !18, line: 161)
!144 = !DISubprogram(name: "strtol", scope: !10, file: !10, line: 183, type: !145, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!145 = !DISubroutineType(types: !146)
!146 = !{!24, !113, !141, !13}
!147 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !148, file: !18, line: 162)
!148 = !DISubprogram(name: "strtoul", scope: !10, file: !10, line: 187, type: !149, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!149 = !DISubroutineType(types: !150)
!150 = !{!64, !113, !141, !13}
!151 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !152, file: !18, line: 163)
!152 = !DISubprogram(name: "system", scope: !10, file: !10, line: 716, type: !48, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!153 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !154, file: !18, line: 165)
!154 = !DISubprogram(name: "wcstombs", scope: !10, file: !10, line: 876, type: !155, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!155 = !DISubroutineType(types: !156)
!156 = !{!62, !157, !158, !62}
!157 = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !89)
!158 = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !159)
!159 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !160, size: 64)
!160 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !112)
!161 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !162, file: !18, line: 166)
!162 = !DISubprogram(name: "wctomb", scope: !10, file: !10, line: 869, type: !163, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!163 = !DISubroutineType(types: !164)
!164 = !{!13, !89, !112}
!165 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !166, entity: !167, file: !18, line: 194)
!166 = !DINamespace(name: "__gnu_cxx", scope: null)
!167 = !DIDerivedType(tag: DW_TAG_typedef, name: "lldiv_t", file: !10, line: 121, baseType: !168)
!168 = distinct !DICompositeType(tag: DW_TAG_structure_type, file: !10, line: 117, size: 128, elements: !169, identifier: "_ZTS7lldiv_t")
!169 = !{!170, !172}
!170 = !DIDerivedType(tag: DW_TAG_member, name: "quot", scope: !168, file: !10, line: 119, baseType: !171, size: 64)
!171 = !DIBasicType(name: "long long int", size: 64, encoding: DW_ATE_signed)
!172 = !DIDerivedType(tag: DW_TAG_member, name: "rem", scope: !168, file: !10, line: 120, baseType: !171, size: 64, offset: 64)
!173 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !166, entity: !174, file: !18, line: 200)
!174 = !DISubprogram(name: "_Exit", scope: !10, file: !10, line: 557, type: !79, isLocal: false, isDefinition: false, flags: DIFlagPrototyped | DIFlagNoReturn, isOptimized: true)
!175 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !166, entity: !176, file: !18, line: 204)
!176 = !DISubprogram(name: "llabs", scope: !10, file: !10, line: 779, type: !177, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!177 = !DISubroutineType(types: !178)
!178 = !{!171, !171}
!179 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !166, entity: !180, file: !18, line: 210)
!180 = !DISubprogram(name: "lldiv", scope: !10, file: !10, line: 796, type: !181, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!181 = !DISubroutineType(types: !182)
!182 = !{!167, !171, !171}
!183 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !166, entity: !184, file: !18, line: 221)
!184 = !DISubprogram(name: "atoll", scope: !10, file: !10, line: 292, type: !185, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!185 = !DISubroutineType(types: !186)
!186 = !{!171, !43}
!187 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !166, entity: !188, file: !18, line: 222)
!188 = !DISubprogram(name: "strtoll", scope: !10, file: !10, line: 209, type: !189, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!189 = !DISubroutineType(types: !190)
!190 = !{!171, !113, !141, !13}
!191 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !166, entity: !192, file: !18, line: 223)
!192 = !DISubprogram(name: "strtoull", scope: !10, file: !10, line: 214, type: !193, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!193 = !DISubroutineType(types: !194)
!194 = !{!195, !113, !141, !13}
!195 = !DIBasicType(name: "long long unsigned int", size: 64, encoding: DW_ATE_unsigned)
!196 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !166, entity: !197, file: !18, line: 225)
!197 = !DISubprogram(name: "strtof", scope: !10, file: !10, line: 172, type: !198, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!198 = !DISubroutineType(types: !199)
!199 = !{!200, !113, !141}
!200 = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float)
!201 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !166, entity: !202, file: !18, line: 226)
!202 = !DISubprogram(name: "strtold", scope: !10, file: !10, line: 175, type: !203, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!203 = !DISubroutineType(types: !204)
!204 = !{!205, !113, !141}
!205 = !DIBasicType(name: "long double", size: 128, encoding: DW_ATE_float)
!206 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !167, file: !18, line: 234)
!207 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !174, file: !18, line: 236)
!208 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !176, file: !18, line: 238)
!209 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !210, file: !18, line: 239)
!210 = !DISubprogram(name: "div", linkageName: "_ZN9__gnu_cxx3divExx", scope: !166, file: !18, line: 207, type: !181, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!211 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !180, file: !18, line: 240)
!212 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !184, file: !18, line: 242)
!213 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !197, file: !18, line: 243)
!214 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !188, file: !18, line: 244)
!215 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !192, file: !18, line: 245)
!216 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !202, file: !18, line: 246)
!217 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !27, file: !218, line: 38)
!218 = !DIFile(filename: "/usr/lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0/stdlib.h", directory: "/home/shoshijak/Documents/smt2vec/data/shoc/src/common")
!219 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !31, file: !218, line: 39)
!220 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !78, file: !218, line: 40)
!221 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !36, file: !218, line: 43)
!222 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !123, file: !218, line: 46)
!223 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !16, file: !218, line: 51)
!224 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !20, file: !218, line: 52)
!225 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !226, file: !218, line: 54)
!226 = !DISubprogram(name: "abs", linkageName: "_ZSt3absg", scope: !8, file: !14, line: 102, type: !227, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: true)
!227 = !DISubroutineType(types: !228)
!228 = !{!229, !229}
!229 = !DIBasicType(name: "__float128", size: 128, encoding: DW_ATE_float)
!230 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !38, file: !218, line: 55)
!231 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !47, file: !218, line: 56)
!232 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !51, file: !218, line: 57)
!233 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !55, file: !218, line: 58)
!234 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !70, file: !218, line: 59)
!235 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !210, file: !218, line: 60)
!236 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !82, file: !218, line: 61)
!237 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !86, file: !218, line: 62)
!238 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !91, file: !218, line: 63)
!239 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !95, file: !218, line: 64)
!240 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !99, file: !218, line: 65)
!241 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !103, file: !218, line: 67)
!242 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !107, file: !218, line: 68)
!243 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !115, file: !218, line: 69)
!244 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !119, file: !218, line: 71)
!245 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !125, file: !218, line: 72)
!246 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !129, file: !218, line: 73)
!247 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !133, file: !218, line: 74)
!248 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !138, file: !218, line: 75)
!249 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !144, file: !218, line: 76)
!250 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !148, file: !218, line: 77)
!251 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !152, file: !218, line: 78)
!252 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !154, file: !218, line: 80)
!253 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !162, file: !218, line: 81)
!254 = !DICompositeType(tag: DW_TAG_array_type, baseType: !44, size: 648, elements: !255)
!255 = !{!256}
!256 = !DISubrange(count: 81)
!257 = !DIDerivedType(tag: DW_TAG_member, name: "barDone", scope: !259, file: !258, line: 29, baseType: !254, flags: DIFlagStaticMember)
!258 = !DIFile(filename: "./ProgressBar.h", directory: "/home/shoshijak/Documents/smt2vec/data/shoc/src/common")
!259 = distinct !DICompositeType(tag: DW_TAG_class_type, name: "ProgressBar", file: !258, line: 24, size: 192, elements: !260, identifier: "_ZTS11ProgressBar")
!260 = !{!261, !262, !257, !263, !264, !265, !269, !270, !271, !272}
!261 = !DIDerivedType(tag: DW_TAG_member, name: "itersDone", scope: !259, file: !258, line: 27, baseType: !13, size: 32)
!262 = !DIDerivedType(tag: DW_TAG_member, name: "totalIters", scope: !259, file: !258, line: 28, baseType: !13, size: 32, offset: 32)
!263 = !DIDerivedType(tag: DW_TAG_member, name: "rTotal", scope: !259, file: !258, line: 30, baseType: !42, size: 64, offset: 64)
!264 = !DIDerivedType(tag: DW_TAG_member, name: "percDone", scope: !259, file: !258, line: 31, baseType: !42, size: 64, offset: 128)
!265 = !DISubprogram(name: "ProgressBar", scope: !259, file: !258, line: 38, type: !266, isLocal: false, isDefinition: false, scopeLine: 38, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: true)
!266 = !DISubroutineType(types: !267)
!267 = !{null, !268, !13}
!268 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !259, size: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
!269 = !DISubprogram(name: "setTotalIters", linkageName: "_ZN11ProgressBar13setTotalItersEi", scope: !259, file: !258, line: 58, type: !266, isLocal: false, isDefinition: false, scopeLine: 58, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: true)
!270 = !DISubprogram(name: "setItersDone", linkageName: "_ZN11ProgressBar12setItersDoneEi", scope: !259, file: !258, line: 74, type: !266, isLocal: false, isDefinition: false, scopeLine: 74, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: true)
!271 = !DISubprogram(name: "addItersDone", linkageName: "_ZN11ProgressBar12addItersDoneEi", scope: !259, file: !258, line: 86, type: !266, isLocal: false, isDefinition: false, scopeLine: 86, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: true)
!272 = !DISubprogram(name: "Show", linkageName: "_ZN11ProgressBar4ShowEP8_IO_FILE", scope: !259, file: !258, line: 98, type: !273, isLocal: false, isDefinition: false, scopeLine: 98, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: true)
!273 = !DISubroutineType(types: !274)
!274 = !{null, !268, !275}
!275 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !276, size: 64)
!276 = !DIDerivedType(tag: DW_TAG_typedef, name: "FILE", file: !277, line: 48, baseType: !278)
!277 = !DIFile(filename: "/usr/include/stdio.h", directory: "/home/shoshijak/Documents/smt2vec/data/shoc/src/common")
!278 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_IO_FILE", file: !279, line: 241, size: 1728, elements: !280, identifier: "_ZTS8_IO_FILE")
!279 = !DIFile(filename: "/usr/include/libio.h", directory: "/home/shoshijak/Documents/smt2vec/data/shoc/src/common")
!280 = !{!281, !282, !283, !284, !285, !286, !287, !288, !289, !290, !291, !292, !293, !296, !298, !299, !300, !303, !305, !307, !311, !314, !316, !317, !318, !319, !320, !321, !322}
!281 = !DIDerivedType(tag: DW_TAG_member, name: "_flags", scope: !278, file: !279, line: 242, baseType: !13, size: 32)
!282 = !DIDerivedType(tag: DW_TAG_member, name: "_IO_read_ptr", scope: !278, file: !279, line: 247, baseType: !89, size: 64, offset: 64)
!283 = !DIDerivedType(tag: DW_TAG_member, name: "_IO_read_end", scope: !278, file: !279, line: 248, baseType: !89, size: 64, offset: 128)
!284 = !DIDerivedType(tag: DW_TAG_member, name: "_IO_read_base", scope: !278, file: !279, line: 249, baseType: !89, size: 64, offset: 192)
!285 = !DIDerivedType(tag: DW_TAG_member, name: "_IO_write_base", scope: !278, file: !279, line: 250, baseType: !89, size: 64, offset: 256)
!286 = !DIDerivedType(tag: DW_TAG_member, name: "_IO_write_ptr", scope: !278, file: !279, line: 251, baseType: !89, size: 64, offset: 320)
!287 = !DIDerivedType(tag: DW_TAG_member, name: "_IO_write_end", scope: !278, file: !279, line: 252, baseType: !89, size: 64, offset: 384)
!288 = !DIDerivedType(tag: DW_TAG_member, name: "_IO_buf_base", scope: !278, file: !279, line: 253, baseType: !89, size: 64, offset: 448)
!289 = !DIDerivedType(tag: DW_TAG_member, name: "_IO_buf_end", scope: !278, file: !279, line: 254, baseType: !89, size: 64, offset: 512)
!290 = !DIDerivedType(tag: DW_TAG_member, name: "_IO_save_base", scope: !278, file: !279, line: 256, baseType: !89, size: 64, offset: 576)
!291 = !DIDerivedType(tag: DW_TAG_member, name: "_IO_backup_base", scope: !278, file: !279, line: 257, baseType: !89, size: 64, offset: 640)
!292 = !DIDerivedType(tag: DW_TAG_member, name: "_IO_save_end", scope: !278, file: !279, line: 258, baseType: !89, size: 64, offset: 704)
!293 = !DIDerivedType(tag: DW_TAG_member, name: "_markers", scope: !278, file: !279, line: 260, baseType: !294, size: 64, offset: 768)
!294 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !295, size: 64)
!295 = !DICompositeType(tag: DW_TAG_structure_type, name: "_IO_marker", file: !279, line: 156, flags: DIFlagFwdDecl, identifier: "_ZTS10_IO_marker")
!296 = !DIDerivedType(tag: DW_TAG_member, name: "_chain", scope: !278, file: !279, line: 262, baseType: !297, size: 64, offset: 832)
!297 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !278, size: 64)
!298 = !DIDerivedType(tag: DW_TAG_member, name: "_fileno", scope: !278, file: !279, line: 264, baseType: !13, size: 32, offset: 896)
!299 = !DIDerivedType(tag: DW_TAG_member, name: "_flags2", scope: !278, file: !279, line: 268, baseType: !13, size: 32, offset: 928)
!300 = !DIDerivedType(tag: DW_TAG_member, name: "_old_offset", scope: !278, file: !279, line: 270, baseType: !301, size: 64, offset: 960)
!301 = !DIDerivedType(tag: DW_TAG_typedef, name: "__off_t", file: !302, line: 131, baseType: !24)
!302 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/types.h", directory: "/home/shoshijak/Documents/smt2vec/data/shoc/src/common")
!303 = !DIDerivedType(tag: DW_TAG_member, name: "_cur_column", scope: !278, file: !279, line: 274, baseType: !304, size: 16, offset: 1024)
!304 = !DIBasicType(name: "unsigned short", size: 16, encoding: DW_ATE_unsigned)
!305 = !DIDerivedType(tag: DW_TAG_member, name: "_vtable_offset", scope: !278, file: !279, line: 275, baseType: !306, size: 8, offset: 1040)
!306 = !DIBasicType(name: "signed char", size: 8, encoding: DW_ATE_signed_char)
!307 = !DIDerivedType(tag: DW_TAG_member, name: "_shortbuf", scope: !278, file: !279, line: 276, baseType: !308, size: 8, offset: 1048)
!308 = !DICompositeType(tag: DW_TAG_array_type, baseType: !45, size: 8, elements: !309)
!309 = !{!310}
!310 = !DISubrange(count: 1)
!311 = !DIDerivedType(tag: DW_TAG_member, name: "_lock", scope: !278, file: !279, line: 280, baseType: !312, size: 64, offset: 1088)
!312 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !313, size: 64)
!313 = !DIDerivedType(tag: DW_TAG_typedef, name: "_IO_lock_t", file: !279, line: 150, baseType: null)
!314 = !DIDerivedType(tag: DW_TAG_member, name: "_offset", scope: !278, file: !279, line: 289, baseType: !315, size: 64, offset: 1152)
!315 = !DIDerivedType(tag: DW_TAG_typedef, name: "__off64_t", file: !302, line: 132, baseType: !24)
!316 = !DIDerivedType(tag: DW_TAG_member, name: "__pad1", scope: !278, file: !279, line: 297, baseType: !59, size: 64, offset: 1216)
!317 = !DIDerivedType(tag: DW_TAG_member, name: "__pad2", scope: !278, file: !279, line: 298, baseType: !59, size: 64, offset: 1280)
!318 = !DIDerivedType(tag: DW_TAG_member, name: "__pad3", scope: !278, file: !279, line: 299, baseType: !59, size: 64, offset: 1344)
!319 = !DIDerivedType(tag: DW_TAG_member, name: "__pad4", scope: !278, file: !279, line: 300, baseType: !59, size: 64, offset: 1408)
!320 = !DIDerivedType(tag: DW_TAG_member, name: "__pad5", scope: !278, file: !279, line: 302, baseType: !62, size: 64, offset: 1472)
!321 = !DIDerivedType(tag: DW_TAG_member, name: "_mode", scope: !278, file: !279, line: 303, baseType: !13, size: 32, offset: 1536)
!322 = !DIDerivedType(tag: DW_TAG_member, name: "_unused2", scope: !278, file: !279, line: 305, baseType: !323, size: 160, offset: 1568)
!323 = !DICompositeType(tag: DW_TAG_array_type, baseType: !45, size: 160, elements: !324)
!324 = !{!325}
!325 = !DISubrange(count: 20)
!326 = !{i32 2, !"Dwarf Version", i32 4}
!327 = !{i32 2, !"Debug Info Version", i32 3}
!328 = !{i32 1, !"wchar_size", i32 4}
!329 = !{!"clang version 6.0.0 (https://github.com/flang-compiler/flang-driver.git ff464b402e7de78568f65cb0f9ea5f940f5b58f1) (https://github.com/flang-compiler/llvm.git 4f97b00a89865ab8998aa88b5708822cba21380b)"}```

@xoltar
Copy link

xoltar commented Dec 11, 2019

Removing this file didn't solve the problem for me, perhaps a memory of this file is stored somewhere else (other than in the *_preprocessing folder?)

@xoltar
Copy link

xoltar commented Dec 17, 2019

With a fresh checkout, I got this error in a different place:

Build H_dic from: data/amd_app_sdk/amd_preprocessed/xfg_dual/SobolPrimitives.p ( 40 / 60 )
Traceback (most recent call last):
  File "train_inst2vec.py", line 74, in <module>
    app.run(main)
  File "/home/bkeller/anaconda3/envs/ncc-base/lib/python3.6/site-packages/absl/app.py", line 299, in run
    _run_main(main, args)
  File "/home/bkeller/anaconda3/envs/ncc-base/lib/python3.6/site-packages/absl/app.py", line 250, in _run_main
    sys.exit(main(argv))
  File "train_inst2vec.py", line 57, in main
    i2v_vocab.construct_vocabulary(data_folder, data_folders)
  File "/media/scratch/src/ncc_baseline/inst2vec/inst2vec_vocabulary.py", line 634, in construct_vocabulary
    H_dic = build_H_dictionary(D, context_width, folder_mat, base_filename, dictionary, stmts_cut_off)
  File "/media/scratch/src/ncc_baseline/inst2vec/inst2vec_vocabulary.py", line 333, in build_H_dictionary
    A1 = nx.adjacency_matrix(D)
  File "/home/bkeller/anaconda3/envs/ncc-base/lib/python3.6/site-packages/networkx/linalg/graphmatrix.py", line 162, in adjacency_matrix
    return nx.to_scipy_sparse_matrix(G, nodelist=nodelist, weight=weight)
  File "/home/bkeller/anaconda3/envs/ncc-base/lib/python3.6/site-packages/networkx/convert_matrix.py", line 764, in to_scipy_sparse_matrix
    raise nx.NetworkXError("Graph has no nodes or edges")
networkx.exception.NetworkXError: Graph has no nodes or edges

@tbennun
Copy link
Collaborator

tbennun commented Feb 26, 2020

@Zacharias030 Is this fixed?

@Marvinmw
Copy link

Marvinmw commented May 3, 2020

With a fresh checkout, I got this error in a different place:

Build H_dic from: data/amd_app_sdk/amd_preprocessed/xfg_dual/SobolPrimitives.p ( 40 / 60 )
Traceback (most recent call last):
  File "train_inst2vec.py", line 74, in <module>
    app.run(main)
  File "/home/bkeller/anaconda3/envs/ncc-base/lib/python3.6/site-packages/absl/app.py", line 299, in run
    _run_main(main, args)
  File "/home/bkeller/anaconda3/envs/ncc-base/lib/python3.6/site-packages/absl/app.py", line 250, in _run_main
    sys.exit(main(argv))
  File "train_inst2vec.py", line 57, in main
    i2v_vocab.construct_vocabulary(data_folder, data_folders)
  File "/media/scratch/src/ncc_baseline/inst2vec/inst2vec_vocabulary.py", line 634, in construct_vocabulary
    H_dic = build_H_dictionary(D, context_width, folder_mat, base_filename, dictionary, stmts_cut_off)
  File "/media/scratch/src/ncc_baseline/inst2vec/inst2vec_vocabulary.py", line 333, in build_H_dictionary
    A1 = nx.adjacency_matrix(D)
  File "/home/bkeller/anaconda3/envs/ncc-base/lib/python3.6/site-packages/networkx/linalg/graphmatrix.py", line 162, in adjacency_matrix
    return nx.to_scipy_sparse_matrix(G, nodelist=nodelist, weight=weight)
  File "/home/bkeller/anaconda3/envs/ncc-base/lib/python3.6/site-packages/networkx/convert_matrix.py", line 764, in to_scipy_sparse_matrix
    raise nx.NetworkXError("Graph has no nodes or edges")
networkx.exception.NetworkXError: Graph has no nodes or edges

hi do you solve the problem?

@island255
Copy link
Contributor

With a fresh checkout, I got this error in a different place:

Build H_dic from: data/amd_app_sdk/amd_preprocessed/xfg_dual/SobolPrimitives.p ( 40 / 60 )
Traceback (most recent call last):
  File "train_inst2vec.py", line 74, in <module>
    app.run(main)
  File "/home/bkeller/anaconda3/envs/ncc-base/lib/python3.6/site-packages/absl/app.py", line 299, in run
    _run_main(main, args)
  File "/home/bkeller/anaconda3/envs/ncc-base/lib/python3.6/site-packages/absl/app.py", line 250, in _run_main
    sys.exit(main(argv))
  File "train_inst2vec.py", line 57, in main
    i2v_vocab.construct_vocabulary(data_folder, data_folders)
  File "/media/scratch/src/ncc_baseline/inst2vec/inst2vec_vocabulary.py", line 634, in construct_vocabulary
    H_dic = build_H_dictionary(D, context_width, folder_mat, base_filename, dictionary, stmts_cut_off)
  File "/media/scratch/src/ncc_baseline/inst2vec/inst2vec_vocabulary.py", line 333, in build_H_dictionary
    A1 = nx.adjacency_matrix(D)
  File "/home/bkeller/anaconda3/envs/ncc-base/lib/python3.6/site-packages/networkx/linalg/graphmatrix.py", line 162, in adjacency_matrix
    return nx.to_scipy_sparse_matrix(G, nodelist=nodelist, weight=weight)
  File "/home/bkeller/anaconda3/envs/ncc-base/lib/python3.6/site-packages/networkx/convert_matrix.py", line 764, in to_scipy_sparse_matrix
    raise nx.NetworkXError("Graph has no nodes or edges")
networkx.exception.NetworkXError: Graph has no nodes or edges

I met this problem, too. And removing all SobolPrimitives.* files even with "data_preprocessed_pickle" in the folder of "amd_preprocessed" seems to doesn't work. Do you have any solutions?

@island255
Copy link
Contributor

With a fresh checkout, I got this error in a different place:

Build H_dic from: data/amd_app_sdk/amd_preprocessed/xfg_dual/SobolPrimitives.p ( 40 / 60 )
Traceback (most recent call last):
  File "train_inst2vec.py", line 74, in <module>
    app.run(main)
  File "/home/bkeller/anaconda3/envs/ncc-base/lib/python3.6/site-packages/absl/app.py", line 299, in run
    _run_main(main, args)
  File "/home/bkeller/anaconda3/envs/ncc-base/lib/python3.6/site-packages/absl/app.py", line 250, in _run_main
    sys.exit(main(argv))
  File "train_inst2vec.py", line 57, in main
    i2v_vocab.construct_vocabulary(data_folder, data_folders)
  File "/media/scratch/src/ncc_baseline/inst2vec/inst2vec_vocabulary.py", line 634, in construct_vocabulary
    H_dic = build_H_dictionary(D, context_width, folder_mat, base_filename, dictionary, stmts_cut_off)
  File "/media/scratch/src/ncc_baseline/inst2vec/inst2vec_vocabulary.py", line 333, in build_H_dictionary
    A1 = nx.adjacency_matrix(D)
  File "/home/bkeller/anaconda3/envs/ncc-base/lib/python3.6/site-packages/networkx/linalg/graphmatrix.py", line 162, in adjacency_matrix
    return nx.to_scipy_sparse_matrix(G, nodelist=nodelist, weight=weight)
  File "/home/bkeller/anaconda3/envs/ncc-base/lib/python3.6/site-packages/networkx/convert_matrix.py", line 764, in to_scipy_sparse_matrix
    raise nx.NetworkXError("Graph has no nodes or edges")
networkx.exception.NetworkXError: Graph has no nodes or edges

I try to solve this problem by adding few lines in inst2vec_vocabulary.py at line 632:

            #add exception for zero-nodes graph                      
            nodelist = list(D.nodes())
            if len(nodelist)==0:
                continue

it seems to have worked, but I don't know whether it will have influence in the next several steps.

@tbennun
Copy link
Collaborator

tbennun commented Jun 7, 2020

@island255 interesting, thanks. It looks like something that would work around this issue, but I'm wondering which files create empty graphs.

tbennun added a commit that referenced this issue Jun 7, 2020
Co-authored-by: island255 <island255@users.noreply.github.com>
@tbennun
Copy link
Collaborator

tbennun commented Jun 7, 2020

@island255 @Marvinmw can you please check if PR #25 works for you?

@island255
Copy link
Contributor

@island255 @Marvinmw can you please check if PR #25 works for you?

Sure, it works.

tbennun added a commit that referenced this issue Jul 3, 2020
Skip empty dual graphs (Fixes Issue #11)
@tbennun
Copy link
Collaborator

tbennun commented Jul 3, 2020

Closing the issue since the problem is fixed. Please write here if I should reopen it.

@tbennun tbennun closed this as completed Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants