discopop-library 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (676) hide show
  1. discopop_library-0.0.1/LICENSE +29 -0
  2. discopop_library-0.0.1/PKG-INFO +100 -0
  3. discopop_library-0.0.1/README.md +24 -0
  4. discopop_library-0.0.1/VERSION +1 -0
  5. discopop_library-0.0.1/discopop_library/Aliases/__init__.py +0 -0
  6. discopop_library-0.0.1/discopop_library/Aliases/aliases.py +9 -0
  7. discopop_library-0.0.1/discopop_library/Amdahl/__init__.py +7 -0
  8. discopop_library-0.0.1/discopop_library/Amdahl/model.py +104 -0
  9. discopop_library-0.0.1/discopop_library/Amdahl/regions.py +281 -0
  10. discopop_library-0.0.1/discopop_library/Amdahl/test_model.py +74 -0
  11. discopop_library-0.0.1/discopop_library/Amdahl/test_regions.py +204 -0
  12. discopop_library-0.0.1/discopop_library/ArgumentClasses/GeneralArguments.py +16 -0
  13. discopop_library-0.0.1/discopop_library/ArgumentClasses/__init__.py +0 -0
  14. discopop_library-0.0.1/discopop_library/BlockerResolution/BlockerResolutionArguments.py +128 -0
  15. discopop_library-0.0.1/discopop_library/BlockerResolution/__init__.py +9 -0
  16. discopop_library-0.0.1/discopop_library/BlockerResolution/__main__.py +166 -0
  17. discopop_library-0.0.1/discopop_library/BlockerResolution/answers.py +279 -0
  18. discopop_library-0.0.1/discopop_library/BlockerResolution/check.py +556 -0
  19. discopop_library-0.0.1/discopop_library/BlockerResolution/conftest.py +155 -0
  20. discopop_library-0.0.1/discopop_library/BlockerResolution/discopop_tools.py +108 -0
  21. discopop_library-0.0.1/discopop_library/BlockerResolution/facts.py +230 -0
  22. discopop_library-0.0.1/discopop_library/BlockerResolution/hotspots.py +63 -0
  23. discopop_library-0.0.1/discopop_library/BlockerResolution/mode_settings.py +71 -0
  24. discopop_library-0.0.1/discopop_library/BlockerResolution/modes.py +281 -0
  25. discopop_library-0.0.1/discopop_library/BlockerResolution/prompt_store.py +184 -0
  26. discopop_library-0.0.1/discopop_library/BlockerResolution/prompts/check.md +114 -0
  27. discopop_library-0.0.1/discopop_library/BlockerResolution/prompts/retry.md +18 -0
  28. discopop_library-0.0.1/discopop_library/BlockerResolution/prompts/review.md +94 -0
  29. discopop_library-0.0.1/discopop_library/BlockerResolution/prompts.py +147 -0
  30. discopop_library-0.0.1/discopop_library/BlockerResolution/publish.py +157 -0
  31. discopop_library-0.0.1/discopop_library/BlockerResolution/results.py +143 -0
  32. discopop_library-0.0.1/discopop_library/BlockerResolution/run.py +379 -0
  33. discopop_library-0.0.1/discopop_library/BlockerResolution/test_answers.py +113 -0
  34. discopop_library-0.0.1/discopop_library/BlockerResolution/test_check.py +580 -0
  35. discopop_library-0.0.1/discopop_library/BlockerResolution/test_discopop_tools.py +309 -0
  36. discopop_library-0.0.1/discopop_library/BlockerResolution/test_hotspots.py +280 -0
  37. discopop_library-0.0.1/discopop_library/BlockerResolution/test_mode_settings.py +53 -0
  38. discopop_library-0.0.1/discopop_library/BlockerResolution/test_prompt_store.py +88 -0
  39. discopop_library-0.0.1/discopop_library/BlockerResolution/test_publish.py +126 -0
  40. discopop_library-0.0.1/discopop_library/BlockerResolution/test_run.py +244 -0
  41. discopop_library-0.0.1/discopop_library/BlockerResolution/test_tool_calls.py +82 -0
  42. discopop_library-0.0.1/discopop_library/BlockerResolution/test_unsure.py +49 -0
  43. discopop_library-0.0.1/discopop_library/BlockerResolution/test_workspace.py +149 -0
  44. discopop_library-0.0.1/discopop_library/BlockerResolution/tool_calls.py +160 -0
  45. discopop_library-0.0.1/discopop_library/BlockerResolution/unsure.py +148 -0
  46. discopop_library-0.0.1/discopop_library/BlockerResolution/workspace.py +164 -0
  47. discopop_library-0.0.1/discopop_library/CodeGenerator/CodeGenerator.py +213 -0
  48. discopop_library-0.0.1/discopop_library/CodeGenerator/CodeGeneratorArguments.py +29 -0
  49. discopop_library-0.0.1/discopop_library/CodeGenerator/__init__.py +0 -0
  50. discopop_library-0.0.1/discopop_library/CodeGenerator/classes/ContentBuffer.py +262 -0
  51. discopop_library-0.0.1/discopop_library/CodeGenerator/classes/Enums.py +26 -0
  52. discopop_library-0.0.1/discopop_library/CodeGenerator/classes/Line.py +27 -0
  53. discopop_library-0.0.1/discopop_library/CodeGenerator/classes/Pragma.py +24 -0
  54. discopop_library-0.0.1/discopop_library/CodeGenerator/classes/UnpackedSuggestion.py +900 -0
  55. discopop_library-0.0.1/discopop_library/CodeGenerator/classes/__init__.py +0 -0
  56. discopop_library-0.0.1/discopop_library/CodeGenerator/test_do_all_pragmas.py +59 -0
  57. discopop_library-0.0.1/discopop_library/CodeGenerator/test_task_patches.py +417 -0
  58. discopop_library-0.0.1/discopop_library/Compatibility/LegacyDiscoPoP/GEPDependencyRemover/ArgumentClasses.py +39 -0
  59. discopop_library-0.0.1/discopop_library/Compatibility/LegacyDiscoPoP/GEPDependencyRemover/GEPDependencyRemover.py +42 -0
  60. discopop_library-0.0.1/discopop_library/Compatibility/LegacyDiscoPoP/GEPDependencyRemover/Types.py +9 -0
  61. discopop_library-0.0.1/discopop_library/Compatibility/LegacyDiscoPoP/GEPDependencyRemover/__init__.py +0 -0
  62. discopop_library-0.0.1/discopop_library/Compatibility/LegacyDiscoPoP/GEPDependencyRemover/__main__.py +50 -0
  63. discopop_library-0.0.1/discopop_library/Compatibility/LegacyDiscoPoP/GEPDependencyRemover/utils.py +25 -0
  64. discopop_library-0.0.1/discopop_library/Compatibility/LegacyDiscoPoP/__init__.py +0 -0
  65. discopop_library-0.0.1/discopop_library/Compatibility/__init__.py +0 -0
  66. discopop_library-0.0.1/discopop_library/ConfigProvider/ConfigProviderArguments.py +27 -0
  67. discopop_library-0.0.1/discopop_library/ConfigProvider/__init__.py +0 -0
  68. discopop_library-0.0.1/discopop_library/ConfigProvider/__main__.py +48 -0
  69. discopop_library-0.0.1/discopop_library/ConfigProvider/assets/__init__.py +0 -0
  70. discopop_library-0.0.1/discopop_library/ConfigProvider/config_provider.py +49 -0
  71. discopop_library-0.0.1/discopop_library/DependencyComparator/DependencyComparatorArguments.py +23 -0
  72. discopop_library-0.0.1/discopop_library/DependencyComparator/__init__.py +0 -0
  73. discopop_library-0.0.1/discopop_library/DependencyComparator/__main__.py +67 -0
  74. discopop_library-0.0.1/discopop_library/DependencyComparator/dependency_comparator.py +235 -0
  75. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/ArgumentClasses.py +108 -0
  76. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/Autotuner.py +553 -0
  77. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/Classes/CodeConfiguration.py +523 -0
  78. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/Classes/ExecutionResult.py +99 -0
  79. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/Classes/__init__.py +0 -0
  80. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/Classes/test_code_configuration_kept_tree.py +136 -0
  81. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/Classes/test_compile_only.py +223 -0
  82. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/Classes/test_execution_repetitions.py +171 -0
  83. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/Classes/test_execution_result.py +30 -0
  84. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/Statistics/StatisticsGraph.py +78 -0
  85. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/Statistics/__init__.py +0 -0
  86. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/Types.py +9 -0
  87. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/__init__.py +0 -0
  88. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/__main__.py +184 -0
  89. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/agent_approved.py +72 -0
  90. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/optimization/__init__.py +0 -0
  91. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/optimization/check_single_combination.py +143 -0
  92. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/optimization/coordinate_descent_combination.py +175 -0
  93. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/optimization/evolutionary_combination.py +917 -0
  94. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/optimization/greedy_combination.py +121 -0
  95. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/optimization/hotspot_guided_combination.py +858 -0
  96. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/optimization/linear_hotspot_combination.py +99 -0
  97. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/optimization/measure_only.py +109 -0
  98. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/optimization/parallel_region_combination_with_refinement.py +176 -0
  99. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/optimization/test_evolutionary_combination.py +281 -0
  100. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/optimization/test_hotspot_guided_combination.py +860 -0
  101. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/optimization/test_measure_only.py +110 -0
  102. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/output/__init__.py +0 -0
  103. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/output/bars.py +31 -0
  104. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/output/intermediate.py +59 -0
  105. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/output/progress.py +318 -0
  106. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/output/test_progress.py +143 -0
  107. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/priorities.py +48 -0
  108. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/test_agent_approved.py +100 -0
  109. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/test_main.py +29 -0
  110. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/test_outside_project.py +55 -0
  111. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/test_reference_failure.py +124 -0
  112. discopop_library-0.0.1/discopop_library/EmpiricalAutotuning/utils.py +69 -0
  113. discopop_library-0.0.1/discopop_library/FolderStructure/__init__.py +0 -0
  114. discopop_library-0.0.1/discopop_library/FolderStructure/setup.py +118 -0
  115. discopop_library-0.0.1/discopop_library/FolderStructure/teardown.py +83 -0
  116. discopop_library-0.0.1/discopop_library/GlobalLogger/__init__.py +0 -0
  117. discopop_library-0.0.1/discopop_library/GlobalLogger/setup.py +67 -0
  118. discopop_library-0.0.1/discopop_library/HostpotLoader/HotspotLoaderArguments.py +51 -0
  119. discopop_library-0.0.1/discopop_library/HostpotLoader/HotspotNodeType.py +23 -0
  120. discopop_library-0.0.1/discopop_library/HostpotLoader/HotspotType.py +48 -0
  121. discopop_library-0.0.1/discopop_library/HostpotLoader/__init__.py +0 -0
  122. discopop_library-0.0.1/discopop_library/HostpotLoader/detailed_hotspot_loader.py +115 -0
  123. discopop_library-0.0.1/discopop_library/HostpotLoader/hostpot_loader.py +57 -0
  124. discopop_library-0.0.1/discopop_library/HostpotLoader/test_HotspotType.py +35 -0
  125. discopop_library-0.0.1/discopop_library/HostpotLoader/test_detailed_hotspot_loader.py +125 -0
  126. discopop_library-0.0.1/discopop_library/HostpotLoader/test_hostpot_loader.py +104 -0
  127. discopop_library-0.0.1/discopop_library/HostpotLoader/test_utilities.py +84 -0
  128. discopop_library-0.0.1/discopop_library/HostpotLoader/utilities.py +93 -0
  129. discopop_library-0.0.1/discopop_library/JSONHandler/JSONHandler.py +32 -0
  130. discopop_library-0.0.1/discopop_library/JSONHandler/__init__.py +0 -0
  131. discopop_library-0.0.1/discopop_library/LineMapping/__init__.py +0 -0
  132. discopop_library-0.0.1/discopop_library/LineMapping/delete.py +14 -0
  133. discopop_library-0.0.1/discopop_library/LineMapping/diff_modifications.py +156 -0
  134. discopop_library-0.0.1/discopop_library/LineMapping/initialize.py +38 -0
  135. discopop_library-0.0.1/discopop_library/LineMapping/load.py +18 -0
  136. discopop_library-0.0.1/discopop_library/LineMapping/save.py +17 -0
  137. discopop_library-0.0.1/discopop_library/ParallelRegionMerger/ArgumentClasses.py +60 -0
  138. discopop_library-0.0.1/discopop_library/ParallelRegionMerger/ParallelRegionMerger.py +76 -0
  139. discopop_library-0.0.1/discopop_library/ParallelRegionMerger/Types.py +9 -0
  140. discopop_library-0.0.1/discopop_library/ParallelRegionMerger/__init__.py +0 -0
  141. discopop_library-0.0.1/discopop_library/ParallelRegionMerger/__main__.py +55 -0
  142. discopop_library-0.0.1/discopop_library/ParallelRegionMerger/classes/TaskGraph/CallEdge.py +13 -0
  143. discopop_library-0.0.1/discopop_library/ParallelRegionMerger/classes/TaskGraph/ContainsEdge.py +13 -0
  144. discopop_library-0.0.1/discopop_library/ParallelRegionMerger/classes/TaskGraph/DataflowEdge.py +17 -0
  145. discopop_library-0.0.1/discopop_library/ParallelRegionMerger/classes/TaskGraph/DoallModifierNode.py +20 -0
  146. discopop_library-0.0.1/discopop_library/ParallelRegionMerger/classes/TaskGraph/Edge.py +14 -0
  147. discopop_library-0.0.1/discopop_library/ParallelRegionMerger/classes/TaskGraph/EnterParallelNode.py +42 -0
  148. discopop_library-0.0.1/discopop_library/ParallelRegionMerger/classes/TaskGraph/ExitParallelNode.py +19 -0
  149. discopop_library-0.0.1/discopop_library/ParallelRegionMerger/classes/TaskGraph/FinalEdge.py +13 -0
  150. discopop_library-0.0.1/discopop_library/ParallelRegionMerger/classes/TaskGraph/FriendlyModifierNode.py +16 -0
  151. discopop_library-0.0.1/discopop_library/ParallelRegionMerger/classes/TaskGraph/IntermediateEdge.py +13 -0
  152. discopop_library-0.0.1/discopop_library/ParallelRegionMerger/classes/TaskGraph/ModifierEdge.py +13 -0
  153. discopop_library-0.0.1/discopop_library/ParallelRegionMerger/classes/TaskGraph/ModifierNode.py +13 -0
  154. discopop_library-0.0.1/discopop_library/ParallelRegionMerger/classes/TaskGraph/ParallelRegionConnectionEdge.py +14 -0
  155. discopop_library-0.0.1/discopop_library/ParallelRegionMerger/classes/TaskGraph/ReductionModifierNode.py +20 -0
  156. discopop_library-0.0.1/discopop_library/ParallelRegionMerger/classes/TaskGraph/SuccessorEdge.py +13 -0
  157. discopop_library-0.0.1/discopop_library/ParallelRegionMerger/classes/TaskGraph/TGFunctionNode.py +20 -0
  158. discopop_library-0.0.1/discopop_library/ParallelRegionMerger/classes/TaskGraph/TGLoopNode.py +17 -0
  159. discopop_library-0.0.1/discopop_library/ParallelRegionMerger/classes/TaskGraph/TGNode.py +14 -0
  160. discopop_library-0.0.1/discopop_library/ParallelRegionMerger/classes/TaskGraph/TaskGraph.py +679 -0
  161. discopop_library-0.0.1/discopop_library/ParallelRegionMerger/classes/TaskGraph/TaskNode.py +24 -0
  162. discopop_library-0.0.1/discopop_library/ParallelRegionMerger/classes/TaskGraph/__init__.py +0 -0
  163. discopop_library-0.0.1/discopop_library/ParallelRegionMerger/classes/__init__.py +0 -0
  164. discopop_library-0.0.1/discopop_library/ParallelRegionMerger/inflated_parallel_region_pattern.py +578 -0
  165. discopop_library-0.0.1/discopop_library/PatchApplicator/PatchApplicationResult.py +180 -0
  166. discopop_library-0.0.1/discopop_library/PatchApplicator/PatchApplicatorArguments.py +55 -0
  167. discopop_library-0.0.1/discopop_library/PatchApplicator/__init__.py +0 -0
  168. discopop_library-0.0.1/discopop_library/PatchApplicator/__main__.py +87 -0
  169. discopop_library-0.0.1/discopop_library/PatchApplicator/apply.py +192 -0
  170. discopop_library-0.0.1/discopop_library/PatchApplicator/clear.py +36 -0
  171. discopop_library-0.0.1/discopop_library/PatchApplicator/list.py +17 -0
  172. discopop_library-0.0.1/discopop_library/PatchApplicator/load.py +40 -0
  173. discopop_library-0.0.1/discopop_library/PatchApplicator/outside_project.py +139 -0
  174. discopop_library-0.0.1/discopop_library/PatchApplicator/patch_applicator.py +107 -0
  175. discopop_library-0.0.1/discopop_library/PatchApplicator/rollback.py +186 -0
  176. discopop_library-0.0.1/discopop_library/PatchApplicator/test_apply.py +231 -0
  177. discopop_library-0.0.1/discopop_library/PatchApplicator/test_outside_project.py +202 -0
  178. discopop_library-0.0.1/discopop_library/PatchGenerator/PatchGeneratorArguments.py +46 -0
  179. discopop_library-0.0.1/discopop_library/PatchGenerator/__init__.py +0 -0
  180. discopop_library-0.0.1/discopop_library/PatchGenerator/__main__.py +110 -0
  181. discopop_library-0.0.1/discopop_library/PatchGenerator/diffs.py +150 -0
  182. discopop_library-0.0.1/discopop_library/PatchGenerator/from_json_patterns.py +119 -0
  183. discopop_library-0.0.1/discopop_library/PatchGenerator/from_optimizer_output.py +99 -0
  184. discopop_library-0.0.1/discopop_library/PatchGenerator/patch_generator.py +60 -0
  185. discopop_library-0.0.1/discopop_library/PatchGenerator/test_diffs.py +153 -0
  186. discopop_library-0.0.1/discopop_library/PatchRepair/PatchRepairArguments.py +154 -0
  187. discopop_library-0.0.1/discopop_library/PatchRepair/__init__.py +7 -0
  188. discopop_library-0.0.1/discopop_library/PatchRepair/__main__.py +130 -0
  189. discopop_library-0.0.1/discopop_library/PatchRepair/backups.py +159 -0
  190. discopop_library-0.0.1/discopop_library/PatchRepair/candidates.py +162 -0
  191. discopop_library-0.0.1/discopop_library/PatchRepair/compilation.py +218 -0
  192. discopop_library-0.0.1/discopop_library/PatchRepair/diagnostics.py +173 -0
  193. discopop_library-0.0.1/discopop_library/PatchRepair/llm_backends/__init__.py +169 -0
  194. discopop_library-0.0.1/discopop_library/PatchRepair/llm_backends/base.py +435 -0
  195. discopop_library-0.0.1/discopop_library/PatchRepair/llm_backends/claude.py +211 -0
  196. discopop_library-0.0.1/discopop_library/PatchRepair/llm_backends/opencode.py +318 -0
  197. discopop_library-0.0.1/discopop_library/PatchRepair/llm_backends/test_opencode.py +55 -0
  198. discopop_library-0.0.1/discopop_library/PatchRepair/llm_config.py +374 -0
  199. discopop_library-0.0.1/discopop_library/PatchRepair/loop.py +504 -0
  200. discopop_library-0.0.1/discopop_library/PatchRepair/patching.py +500 -0
  201. discopop_library-0.0.1/discopop_library/PatchRepair/patchset.py +227 -0
  202. discopop_library-0.0.1/discopop_library/PatchRepair/prompts/context.md +42 -0
  203. discopop_library-0.0.1/discopop_library/PatchRepair/prompts/guided.md +52 -0
  204. discopop_library-0.0.1/discopop_library/PatchRepair/prompts/minimal.md +36 -0
  205. discopop_library-0.0.1/discopop_library/PatchRepair/prompts/retry.md +18 -0
  206. discopop_library-0.0.1/discopop_library/PatchRepair/prompts.py +388 -0
  207. discopop_library-0.0.1/discopop_library/PatchRepair/repair.py +255 -0
  208. discopop_library-0.0.1/discopop_library/PatchRepair/results.py +189 -0
  209. discopop_library-0.0.1/discopop_library/PatchRepair/test_budget.py +178 -0
  210. discopop_library-0.0.1/discopop_library/PatchRepair/test_diagnostics.py +137 -0
  211. discopop_library-0.0.1/discopop_library/PatchRepair/test_llm_config.py +180 -0
  212. discopop_library-0.0.1/discopop_library/PatchRepair/test_outside_project.py +53 -0
  213. discopop_library-0.0.1/discopop_library/PatchRepair/test_patching.py +291 -0
  214. discopop_library-0.0.1/discopop_library/PatchRepair/test_patchset.py +130 -0
  215. discopop_library-0.0.1/discopop_library/PatchRepair/test_prompts.py +107 -0
  216. discopop_library-0.0.1/discopop_library/PatchRepair/test_safety.py +300 -0
  217. discopop_library-0.0.1/discopop_library/PathManagement/PathManagement.py +48 -0
  218. discopop_library-0.0.1/discopop_library/PathManagement/__init__.py +0 -0
  219. discopop_library-0.0.1/discopop_library/PatternIdManagement/__init__.py +0 -0
  220. discopop_library-0.0.1/discopop_library/PatternIdManagement/unique_pattern_id.py +15 -0
  221. discopop_library-0.0.1/discopop_library/PreProcessor/PreProcessorArguments.py +22 -0
  222. discopop_library-0.0.1/discopop_library/PreProcessor/__init__.py +0 -0
  223. discopop_library-0.0.1/discopop_library/PreProcessor/__main__.py +47 -0
  224. discopop_library-0.0.1/discopop_library/PreProcessor/demangle/__init__.py +0 -0
  225. discopop_library-0.0.1/discopop_library/PreProcessor/demangle/data_xml.py +72 -0
  226. discopop_library-0.0.1/discopop_library/PreProcessor/demangle/driver.py +45 -0
  227. discopop_library-0.0.1/discopop_library/PreProcessor/demangle/dynamic_dependencies.py +111 -0
  228. discopop_library-0.0.1/discopop_library/PreProcessor/demangle/reduction.py +73 -0
  229. discopop_library-0.0.1/discopop_library/PreProcessor/demangle/static_dependencies.py +111 -0
  230. discopop_library-0.0.1/discopop_library/PreProcessor/demangle/utilities.py +24 -0
  231. discopop_library-0.0.1/discopop_library/PreProcessor/pre_processor.py +38 -0
  232. discopop_library-0.0.1/discopop_library/ProjectManager/ProjectManager.py +106 -0
  233. discopop_library-0.0.1/discopop_library/ProjectManager/ProjectManagerArguments.py +126 -0
  234. discopop_library-0.0.1/discopop_library/ProjectManager/__init__.py +0 -0
  235. discopop_library-0.0.1/discopop_library/ProjectManager/__main__.py +262 -0
  236. discopop_library-0.0.1/discopop_library/ProjectManager/assets/icon.png +0 -0
  237. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/__init__.py +0 -0
  238. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/build_sharing.py +221 -0
  239. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/building.py +732 -0
  240. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/builds.py +1036 -0
  241. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/compile_script.py +97 -0
  242. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/copy_exclusions.py +223 -0
  243. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/copying.py +275 -0
  244. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/deletion.py +29 -0
  245. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/execution.py +815 -0
  246. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/execution_time.py +187 -0
  247. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/instrumentation_checks.py +186 -0
  248. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/project_environment.py +359 -0
  249. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/repetitions.py +112 -0
  250. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/running.py +86 -0
  251. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/runs.py +559 -0
  252. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/test_build_sharing.py +119 -0
  253. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/test_builds.py +1375 -0
  254. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/test_copy_exclusions.py +214 -0
  255. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/test_execution.py +127 -0
  256. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/test_execution_build_thread_count.py +119 -0
  257. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/test_execution_callpath_pruning.py +184 -0
  258. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/test_execution_excluded_directories.py +58 -0
  259. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/test_execution_measurement.py +184 -0
  260. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/test_execution_openmp.py +157 -0
  261. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/test_execution_paths.py +108 -0
  262. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/test_execution_project_environment.py +353 -0
  263. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/test_execution_repetitions.py +341 -0
  264. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/test_execution_time.py +158 -0
  265. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/test_execution_timeout.py +48 -0
  266. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/test_instrumentation_checks.py +325 -0
  267. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/test_instrumented_directories.py +113 -0
  268. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/test_outside_patches.py +245 -0
  269. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/test_project_environment.py +243 -0
  270. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/test_repetitions.py +111 -0
  271. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/test_runs.py +486 -0
  272. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/test_tree_sync.py +255 -0
  273. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/tree_sync.py +365 -0
  274. discopop_library-0.0.1/discopop_library/ProjectManager/configurations/validation.py +171 -0
  275. discopop_library-0.0.1/discopop_library/ProjectManager/gui/ConfigManagerApp.py +603 -0
  276. discopop_library-0.0.1/discopop_library/ProjectManager/gui/ConfigurationWizard.py +241 -0
  277. discopop_library-0.0.1/discopop_library/ProjectManager/gui/__init__.py +7 -0
  278. discopop_library-0.0.1/discopop_library/ProjectManager/gui/chart_embedding.py +118 -0
  279. discopop_library-0.0.1/discopop_library/ProjectManager/gui/detail_bar.py +153 -0
  280. discopop_library-0.0.1/discopop_library/ProjectManager/gui/display.py +46 -0
  281. discopop_library-0.0.1/discopop_library/ProjectManager/gui/job_adapter.py +62 -0
  282. discopop_library-0.0.1/discopop_library/ProjectManager/gui/mixins/__init__.py +7 -0
  283. discopop_library-0.0.1/discopop_library/ProjectManager/gui/mixins/autotuning_panel.py +802 -0
  284. discopop_library-0.0.1/discopop_library/ProjectManager/gui/mixins/compilation_editor.py +523 -0
  285. discopop_library-0.0.1/discopop_library/ProjectManager/gui/mixins/config_crud.py +130 -0
  286. discopop_library-0.0.1/discopop_library/ProjectManager/gui/mixins/config_list.py +116 -0
  287. discopop_library-0.0.1/discopop_library/ProjectManager/gui/mixins/execute_panel.py +421 -0
  288. discopop_library-0.0.1/discopop_library/ProjectManager/gui/mixins/execution.py +367 -0
  289. discopop_library-0.0.1/discopop_library/ProjectManager/gui/mixins/explorer_integration.py +682 -0
  290. discopop_library-0.0.1/discopop_library/ProjectManager/gui/mixins/file_editor.py +513 -0
  291. discopop_library-0.0.1/discopop_library/ProjectManager/gui/mixins/help_dialogs.py +94 -0
  292. discopop_library-0.0.1/discopop_library/ProjectManager/gui/mixins/helpers.py +279 -0
  293. discopop_library-0.0.1/discopop_library/ProjectManager/gui/mixins/hotspot_panel.py +795 -0
  294. discopop_library-0.0.1/discopop_library/ProjectManager/gui/mixins/mixin_base.py +260 -0
  295. discopop_library-0.0.1/discopop_library/ProjectManager/gui/mixins/patch_repair_panel.py +771 -0
  296. discopop_library-0.0.1/discopop_library/ProjectManager/gui/mixins/report.py +93 -0
  297. discopop_library-0.0.1/discopop_library/ProjectManager/gui/mixins/report_panel.py +421 -0
  298. discopop_library-0.0.1/discopop_library/ProjectManager/gui/mixins/test_execution_flow.py +193 -0
  299. discopop_library-0.0.1/discopop_library/ProjectManager/gui/mixins/test_helpers.py +97 -0
  300. discopop_library-0.0.1/discopop_library/ProjectManager/gui/mixins/test_job_panels.py +285 -0
  301. discopop_library-0.0.1/discopop_library/ProjectManager/gui/mixins/test_request_snapshots.py +125 -0
  302. discopop_library-0.0.1/discopop_library/ProjectManager/gui/mixins/test_test_compilation.py +77 -0
  303. discopop_library-0.0.1/discopop_library/ProjectManager/gui/mixins/wizard_launcher.py +41 -0
  304. discopop_library-0.0.1/discopop_library/ProjectManager/gui/rounded_button.py +300 -0
  305. discopop_library-0.0.1/discopop_library/ProjectManager/gui/style.py +122 -0
  306. discopop_library-0.0.1/discopop_library/ProjectManager/gui/suggestion_browser.py +308 -0
  307. discopop_library-0.0.1/discopop_library/ProjectManager/gui/suggestion_selector.py +260 -0
  308. discopop_library-0.0.1/discopop_library/ProjectManager/gui/test_job_adapter.py +71 -0
  309. discopop_library-0.0.1/discopop_library/ProjectManager/gui/test_project_state_wiring.py +95 -0
  310. discopop_library-0.0.1/discopop_library/ProjectManager/gui/widgets.py +305 -0
  311. discopop_library-0.0.1/discopop_library/ProjectManager/gui/wizard_steps.py +351 -0
  312. discopop_library-0.0.1/discopop_library/ProjectManager/plots/__init__.py +0 -0
  313. discopop_library-0.0.1/discopop_library/ProjectManager/plots/autotuning_chart.py +379 -0
  314. discopop_library-0.0.1/discopop_library/ProjectManager/plots/data.py +311 -0
  315. discopop_library-0.0.1/discopop_library/ProjectManager/plots/demangle.py +96 -0
  316. discopop_library-0.0.1/discopop_library/ProjectManager/plots/hotspot_charts.py +359 -0
  317. discopop_library-0.0.1/discopop_library/ProjectManager/plots/hotspot_data.py +361 -0
  318. discopop_library-0.0.1/discopop_library/ProjectManager/plots/interaction.py +215 -0
  319. discopop_library-0.0.1/discopop_library/ProjectManager/plots/mode_style.py +193 -0
  320. discopop_library-0.0.1/discopop_library/ProjectManager/plots/report_charts.py +767 -0
  321. discopop_library-0.0.1/discopop_library/ProjectManager/plots/test_autotuning_chart.py +233 -0
  322. discopop_library-0.0.1/discopop_library/ProjectManager/plots/test_data.py +272 -0
  323. discopop_library-0.0.1/discopop_library/ProjectManager/plots/test_demangle.py +105 -0
  324. discopop_library-0.0.1/discopop_library/ProjectManager/plots/test_hotspot_charts.py +87 -0
  325. discopop_library-0.0.1/discopop_library/ProjectManager/plots/test_hotspot_data.py +430 -0
  326. discopop_library-0.0.1/discopop_library/ProjectManager/plots/test_interaction.py +157 -0
  327. discopop_library-0.0.1/discopop_library/ProjectManager/plots/test_mode_style.py +91 -0
  328. discopop_library-0.0.1/discopop_library/ProjectManager/plots/test_report_charts.py +295 -0
  329. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/__init__.py +19 -0
  330. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/app.py +99 -0
  331. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/build_controls.py +485 -0
  332. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/build_thread_count_section.py +84 -0
  333. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/callpath_pruning_section.py +171 -0
  334. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/chart_embedding.py +116 -0
  335. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/conftest.py +149 -0
  336. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/detail_bar.py +114 -0
  337. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/dialogs.py +184 -0
  338. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/excluded_directories.py +280 -0
  339. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/fingerprint_ignore_section.py +87 -0
  340. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/help_dialogs.py +77 -0
  341. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/included_directories.py +126 -0
  342. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/job_adapter.py +78 -0
  343. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/llm_agent_panel.py +191 -0
  344. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/llm_dialogs.py +756 -0
  345. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/llm_logic.py +313 -0
  346. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/main_window.py +694 -0
  347. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/mode_settings_dialog.py +97 -0
  348. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/openmp_section.py +97 -0
  349. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/output_pane.py +163 -0
  350. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/panel.py +94 -0
  351. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/panels/__init__.py +9 -0
  352. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/panels/autotuning_panel.py +686 -0
  353. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/panels/blocker_resolution_panel.py +894 -0
  354. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/panels/build_panel.py +368 -0
  355. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/panels/config_list_panel.py +465 -0
  356. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/panels/editor_panel.py +649 -0
  357. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/panels/execute_panel.py +634 -0
  358. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/panels/hotspot_panel.py +890 -0
  359. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/panels/patch_repair_panel.py +536 -0
  360. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/panels/pattern_detection_panel.py +603 -0
  361. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/panels/profiling_panel.py +382 -0
  362. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/panels/report_panel.py +672 -0
  363. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/panels/setup_panel.py +611 -0
  364. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/panels/test_autotuning_panel.py +442 -0
  365. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/panels/test_blocker_resolution_panel.py +1011 -0
  366. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/panels/test_build_panel.py +224 -0
  367. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/panels/test_config_list_panel.py +349 -0
  368. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/panels/test_editor_panel.py +441 -0
  369. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/panels/test_execute_panel.py +579 -0
  370. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/panels/test_hotspot_panel.py +755 -0
  371. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/panels/test_patch_repair_panel.py +687 -0
  372. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/panels/test_pattern_detection_panel.py +535 -0
  373. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/panels/test_profiling_panel.py +239 -0
  374. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/panels/test_report_panel.py +317 -0
  375. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/panels/test_setup_panel.py +463 -0
  376. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/prompt_settings_dialog.py +167 -0
  377. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/shared_build.py +156 -0
  378. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/status.py +44 -0
  379. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/suggestion_browser.py +213 -0
  380. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/suggestion_selector.py +143 -0
  381. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/suggestion_table.py +461 -0
  382. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/tabs.py +81 -0
  383. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/test_build_controls.py +258 -0
  384. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/test_build_thread_count_section.py +60 -0
  385. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/test_callpath_pruning_section.py +117 -0
  386. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/test_chart_embedding.py +49 -0
  387. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/test_components.py +332 -0
  388. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/test_excluded_directories.py +180 -0
  389. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/test_fingerprint_ignore_section.py +54 -0
  390. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/test_included_directories.py +35 -0
  391. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/test_job_adapter.py +76 -0
  392. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/test_llm_dialogs.py +665 -0
  393. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/test_llm_logic.py +251 -0
  394. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/test_main_window.py +405 -0
  395. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/test_mode_settings_dialog.py +59 -0
  396. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/test_openmp_section.py +76 -0
  397. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/test_prompt_settings_dialog.py +189 -0
  398. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/test_resizable.py +47 -0
  399. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/test_shared_widgets.py +107 -0
  400. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/test_suggestion_table.py +216 -0
  401. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/test_theme.py +139 -0
  402. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/test_toolkit_imports.py +79 -0
  403. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/test_updates.py +349 -0
  404. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/test_widgets.py +169 -0
  405. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/test_wizard.py +406 -0
  406. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/testing.py +108 -0
  407. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/theme.py +158 -0
  408. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/threads.py +28 -0
  409. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/updates.py +495 -0
  410. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/widgets.py +1690 -0
  411. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/wizard.py +559 -0
  412. discopop_library-0.0.1/discopop_library/ProjectManager/qt_gui/workflow_nav.py +347 -0
  413. discopop_library-0.0.1/discopop_library/ProjectManager/reports/__init__.py +0 -0
  414. discopop_library-0.0.1/discopop_library/ProjectManager/reports/amdahl.py +112 -0
  415. discopop_library-0.0.1/discopop_library/ProjectManager/reports/console.py +108 -0
  416. discopop_library-0.0.1/discopop_library/ProjectManager/reports/csv.py +96 -0
  417. discopop_library-0.0.1/discopop_library/ProjectManager/reports/efficiency.py +168 -0
  418. discopop_library-0.0.1/discopop_library/ProjectManager/reports/entries.py +75 -0
  419. discopop_library-0.0.1/discopop_library/ProjectManager/reports/execution_time.py +158 -0
  420. discopop_library-0.0.1/discopop_library/ProjectManager/reports/execution_time_full.py +119 -0
  421. discopop_library-0.0.1/discopop_library/ProjectManager/reports/full.py +69 -0
  422. discopop_library-0.0.1/discopop_library/ProjectManager/reports/speedup.py +164 -0
  423. discopop_library-0.0.1/discopop_library/ProjectManager/reports/test_amdahl.py +88 -0
  424. discopop_library-0.0.1/discopop_library/ProjectManager/reports/test_entries.py +71 -0
  425. discopop_library-0.0.1/discopop_library/ProjectManager/services/__init__.py +9 -0
  426. discopop_library-0.0.1/discopop_library/ProjectManager/services/autotuner_results.py +34 -0
  427. discopop_library-0.0.1/discopop_library/ProjectManager/services/blocker_resolution_view.py +907 -0
  428. discopop_library-0.0.1/discopop_library/ProjectManager/services/build_overview.py +402 -0
  429. discopop_library-0.0.1/discopop_library/ProjectManager/services/build_thread_count.py +69 -0
  430. discopop_library-0.0.1/discopop_library/ProjectManager/services/callpath_pruning.py +352 -0
  431. discopop_library-0.0.1/discopop_library/ProjectManager/services/commands.py +170 -0
  432. discopop_library-0.0.1/discopop_library/ProjectManager/services/configurations.py +209 -0
  433. discopop_library-0.0.1/discopop_library/ProjectManager/services/copy_exclude.py +62 -0
  434. discopop_library-0.0.1/discopop_library/ProjectManager/services/derived_settings.py +43 -0
  435. discopop_library-0.0.1/discopop_library/ProjectManager/services/editor_files.py +197 -0
  436. discopop_library-0.0.1/discopop_library/ProjectManager/services/excluded_directories.py +176 -0
  437. discopop_library-0.0.1/discopop_library/ProjectManager/services/execution_run.py +684 -0
  438. discopop_library-0.0.1/discopop_library/ProjectManager/services/explorer_state.py +84 -0
  439. discopop_library-0.0.1/discopop_library/ProjectManager/services/fingerprint_ignore.py +128 -0
  440. discopop_library-0.0.1/discopop_library/ProjectManager/services/help_texts.py +257 -0
  441. discopop_library-0.0.1/discopop_library/ProjectManager/services/hotspot_build.py +72 -0
  442. discopop_library-0.0.1/discopop_library/ProjectManager/services/hotspot_import.py +183 -0
  443. discopop_library-0.0.1/discopop_library/ProjectManager/services/hotspot_session.py +593 -0
  444. discopop_library-0.0.1/discopop_library/ProjectManager/services/hotspot_view.py +349 -0
  445. discopop_library-0.0.1/discopop_library/ProjectManager/services/included_directories.py +111 -0
  446. discopop_library-0.0.1/discopop_library/ProjectManager/services/incremental_script.py +200 -0
  447. discopop_library-0.0.1/discopop_library/ProjectManager/services/jobs.py +336 -0
  448. discopop_library-0.0.1/discopop_library/ProjectManager/services/llm_connection_view.py +101 -0
  449. discopop_library-0.0.1/discopop_library/ProjectManager/services/measurement_queue.py +88 -0
  450. discopop_library-0.0.1/discopop_library/ProjectManager/services/modes.py +39 -0
  451. discopop_library-0.0.1/discopop_library/ProjectManager/services/openmp_handling.py +207 -0
  452. discopop_library-0.0.1/discopop_library/ProjectManager/services/outside_patches.py +44 -0
  453. discopop_library-0.0.1/discopop_library/ProjectManager/services/patch_repair_view.py +230 -0
  454. discopop_library-0.0.1/discopop_library/ProjectManager/services/patches.py +58 -0
  455. discopop_library-0.0.1/discopop_library/ProjectManager/services/project_state.py +92 -0
  456. discopop_library-0.0.1/discopop_library/ProjectManager/services/reports.py +95 -0
  457. discopop_library-0.0.1/discopop_library/ProjectManager/services/requests.py +95 -0
  458. discopop_library-0.0.1/discopop_library/ProjectManager/services/selections.py +92 -0
  459. discopop_library-0.0.1/discopop_library/ProjectManager/services/suggestions.py +508 -0
  460. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_autotuner_results.py +38 -0
  461. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_blocker_resolution_view.py +488 -0
  462. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_build_overview.py +35 -0
  463. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_build_thread_count.py +80 -0
  464. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_callpath_pruning.py +204 -0
  465. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_commands.py +198 -0
  466. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_configurations.py +151 -0
  467. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_copy_exclude.py +31 -0
  468. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_derived_settings.py +76 -0
  469. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_excluded_directories.py +106 -0
  470. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_execution_run.py +69 -0
  471. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_explorer_state.py +52 -0
  472. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_fingerprint_ignore.py +80 -0
  473. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_help_texts.py +18 -0
  474. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_hotspot_build.py +48 -0
  475. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_hotspot_session.py +128 -0
  476. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_hotspot_view.py +140 -0
  477. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_included_directories.py +74 -0
  478. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_incremental_script.py +105 -0
  479. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_jobs.py +267 -0
  480. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_measurement_queue.py +39 -0
  481. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_modes_and_reports.py +97 -0
  482. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_openmp_handling.py +87 -0
  483. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_outside_patches.py +36 -0
  484. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_patches.py +44 -0
  485. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_project_state.py +63 -0
  486. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_selections_and_text.py +52 -0
  487. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_suggestions.py +329 -0
  488. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_vscode.py +61 -0
  489. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_wizard.py +71 -0
  490. discopop_library-0.0.1/discopop_library/ProjectManager/services/test_workflow_status.py +315 -0
  491. discopop_library-0.0.1/discopop_library/ProjectManager/services/text.py +27 -0
  492. discopop_library-0.0.1/discopop_library/ProjectManager/services/vscode.py +59 -0
  493. discopop_library-0.0.1/discopop_library/ProjectManager/services/wizard.py +144 -0
  494. discopop_library-0.0.1/discopop_library/ProjectManager/services/workflow_status.py +312 -0
  495. discopop_library-0.0.1/discopop_library/ProjectManager/test_portable_glyphs.py +78 -0
  496. discopop_library-0.0.1/discopop_library/ProjectManager/utilities/CLI/__init__.py +0 -0
  497. discopop_library-0.0.1/discopop_library/ProjectManager/utilities/CLI/builds.py +75 -0
  498. discopop_library-0.0.1/discopop_library/ProjectManager/utilities/CLI/listConfiguration.py +482 -0
  499. discopop_library-0.0.1/discopop_library/ProjectManager/utilities/CLI/runs.py +93 -0
  500. discopop_library-0.0.1/discopop_library/ProjectManager/utilities/__init__.py +0 -0
  501. discopop_library-0.0.1/discopop_library/ProjectManager/utilities/deriveSettingsFiles.py +32 -0
  502. discopop_library-0.0.1/discopop_library/ProjectManager/utilities/initializeDirectories.py +29 -0
  503. discopop_library-0.0.1/discopop_library/ProjectManager/utilities/initializeFiles.py +76 -0
  504. discopop_library-0.0.1/discopop_library/ProjectManager/utilities/reset.py +41 -0
  505. discopop_library-0.0.1/discopop_library/ProjectManager/utilities/scriptFiles.py +23 -0
  506. discopop_library-0.0.1/discopop_library/ProjectManager/utilities/test_initializeFiles.py +32 -0
  507. discopop_library-0.0.1/discopop_library/SanityChecker/ArgumentClasses.py +52 -0
  508. discopop_library-0.0.1/discopop_library/SanityChecker/Classes/CodeConfiguration.py +155 -0
  509. discopop_library-0.0.1/discopop_library/SanityChecker/Classes/ExecutionResult.py +32 -0
  510. discopop_library-0.0.1/discopop_library/SanityChecker/Classes/__init__.py +0 -0
  511. discopop_library-0.0.1/discopop_library/SanityChecker/SanityChecker.py +166 -0
  512. discopop_library-0.0.1/discopop_library/SanityChecker/Types.py +15 -0
  513. discopop_library-0.0.1/discopop_library/SanityChecker/__init__.py +0 -0
  514. discopop_library-0.0.1/discopop_library/SanityChecker/__main__.py +62 -0
  515. discopop_library-0.0.1/discopop_library/SanityChecker/utils.py +25 -0
  516. discopop_library-0.0.1/discopop_library/StatusReporting/__init__.py +0 -0
  517. discopop_library-0.0.1/discopop_library/StatusReporting/console.py +266 -0
  518. discopop_library-0.0.1/discopop_library/StatusReporting/test_console.py +118 -0
  519. discopop_library-0.0.1/discopop_library/Viewer/ViewerArguments.py +27 -0
  520. discopop_library-0.0.1/discopop_library/Viewer/__init__.py +0 -0
  521. discopop_library-0.0.1/discopop_library/Viewer/__main__.py +51 -0
  522. discopop_library-0.0.1/discopop_library/Viewer/suggestions_view.py +61 -0
  523. discopop_library-0.0.1/discopop_library/Viewer/viewer.py +23 -0
  524. discopop_library-0.0.1/discopop_library/__init__.py +0 -0
  525. discopop_library-0.0.1/discopop_library/discopop_optimizer/CostModels/CostModel.py +257 -0
  526. discopop_library-0.0.1/discopop_library/discopop_optimizer/CostModels/DataTransfer/DataTransferCosts.py +43 -0
  527. discopop_library-0.0.1/discopop_library/discopop_optimizer/CostModels/DataTransfer/__init__.py +0 -0
  528. discopop_library-0.0.1/discopop_library/discopop_optimizer/CostModels/__init__.py +0 -0
  529. discopop_library-0.0.1/discopop_library/discopop_optimizer/CostModels/utilities.py +423 -0
  530. discopop_library-0.0.1/discopop_library/discopop_optimizer/DataTransfers/DataTransfers.py +359 -0
  531. discopop_library-0.0.1/discopop_library/discopop_optimizer/DataTransfers/NewDataTransfers.py +513 -0
  532. discopop_library-0.0.1/discopop_library/discopop_optimizer/DataTransfers/__init__.py +0 -0
  533. discopop_library-0.0.1/discopop_library/discopop_optimizer/DataTransfers/calculate_configuration_data_movement.py +57 -0
  534. discopop_library-0.0.1/discopop_library/discopop_optimizer/DataTransfers/prepare_force_branch_end_data_movement.py +103 -0
  535. discopop_library-0.0.1/discopop_library/discopop_optimizer/DataTransfers/prepare_forced_data_movement.py +24 -0
  536. discopop_library-0.0.1/discopop_library/discopop_optimizer/DataTransfers/prepare_forced_data_movement_prior_to_call.py +91 -0
  537. discopop_library-0.0.1/discopop_library/discopop_optimizer/Microbench/DelaunayInterpolatedMicrobench.py +106 -0
  538. discopop_library-0.0.1/discopop_library/discopop_optimizer/Microbench/ExtrapInterpolatedMicrobench.py +96 -0
  539. discopop_library-0.0.1/discopop_library/discopop_optimizer/Microbench/Microbench.py +113 -0
  540. discopop_library-0.0.1/discopop_library/discopop_optimizer/Microbench/MicrobenchParser.py +49 -0
  541. discopop_library-0.0.1/discopop_library/discopop_optimizer/Microbench/MixedMicrobench.py +71 -0
  542. discopop_library-0.0.1/discopop_library/discopop_optimizer/Microbench/PureDataMicrobench.py +218 -0
  543. discopop_library-0.0.1/discopop_library/discopop_optimizer/Microbench/__init__.py +0 -0
  544. discopop_library-0.0.1/discopop_library/discopop_optimizer/Microbench/utils.py +59 -0
  545. discopop_library-0.0.1/discopop_library/discopop_optimizer/OptimizationGraph.py +214 -0
  546. discopop_library-0.0.1/discopop_library/discopop_optimizer/OptimizerArguments.py +54 -0
  547. discopop_library-0.0.1/discopop_library/discopop_optimizer/PETParser/DataAccesses/CalculateUpdates.py +7 -0
  548. discopop_library-0.0.1/discopop_library/discopop_optimizer/PETParser/DataAccesses/FromCUs.py +71 -0
  549. discopop_library-0.0.1/discopop_library/discopop_optimizer/PETParser/DataAccesses/__init__.py +0 -0
  550. discopop_library-0.0.1/discopop_library/discopop_optimizer/PETParser/PETParser.py +1514 -0
  551. discopop_library-0.0.1/discopop_library/discopop_optimizer/PETParser/__init__.py +0 -0
  552. discopop_library-0.0.1/discopop_library/discopop_optimizer/UpdateOptimization/AddRangesToUpdates.py +103 -0
  553. discopop_library-0.0.1/discopop_library/discopop_optimizer/UpdateOptimization/LoopInitializationUpdates.py +63 -0
  554. discopop_library-0.0.1/discopop_library/discopop_optimizer/UpdateOptimization/RemoveDuplicatedUpdates.py +164 -0
  555. discopop_library-0.0.1/discopop_library/discopop_optimizer/UpdateOptimization/RemoveLoopIndexUpdates.py +71 -0
  556. discopop_library-0.0.1/discopop_library/discopop_optimizer/UpdateOptimization/RemoveSameDeviceUpdates.py +37 -0
  557. discopop_library-0.0.1/discopop_library/discopop_optimizer/UpdateOptimization/__init__.py +0 -0
  558. discopop_library-0.0.1/discopop_library/discopop_optimizer/UpdateOptimization/main.py +74 -0
  559. discopop_library-0.0.1/discopop_library/discopop_optimizer/Variables/Experiment.py +140 -0
  560. discopop_library-0.0.1/discopop_library/discopop_optimizer/Variables/ExperimentUtils.py +242 -0
  561. discopop_library-0.0.1/discopop_library/discopop_optimizer/Variables/__init__.py +0 -0
  562. discopop_library-0.0.1/discopop_library/discopop_optimizer/__init__.py +0 -0
  563. discopop_library-0.0.1/discopop_library/discopop_optimizer/__main__.py +112 -0
  564. discopop_library-0.0.1/discopop_library/discopop_optimizer/bindings/__init__.py +0 -0
  565. discopop_library-0.0.1/discopop_library/discopop_optimizer/bindings/utilities.py +31 -0
  566. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/__init__.py +0 -0
  567. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/context/ContextObject.py +256 -0
  568. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/context/ContextObjectUtils.py +56 -0
  569. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/context/Update.py +129 -0
  570. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/context/__init__.py +0 -0
  571. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/edges/CallEdge.py +12 -0
  572. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/edges/ChildEdge.py +12 -0
  573. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/edges/DataFlowEdge.py +17 -0
  574. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/edges/GenericEdge.py +17 -0
  575. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/edges/MutuallyExclusiveEdge.py +20 -0
  576. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/edges/OptionEdge.py +20 -0
  577. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/edges/RequirementEdge.py +20 -0
  578. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/edges/SuccessorEdge.py +16 -0
  579. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/edges/TemporaryEdge.py +16 -0
  580. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/edges/__init__.py +0 -0
  581. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/enums/Distributions.py +14 -0
  582. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/enums/__init__.py +0 -0
  583. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/nodes/ContextMerge.py +49 -0
  584. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/nodes/ContextNode.py +33 -0
  585. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/nodes/ContextRestore.py +45 -0
  586. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/nodes/ContextSave.py +36 -0
  587. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/nodes/ContextSnapshot.py +40 -0
  588. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/nodes/ContextSnapshotPop.py +35 -0
  589. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/nodes/DeviceSwitch.py +41 -0
  590. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/nodes/FunctionReturn.py +18 -0
  591. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/nodes/FunctionRoot.py +77 -0
  592. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/nodes/GenericNode.py +107 -0
  593. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/nodes/Loop.py +138 -0
  594. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/nodes/SynchronizationTrigger.py +41 -0
  595. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/nodes/Workload.py +152 -0
  596. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/nodes/__init__.py +0 -0
  597. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/system/Network.py +62 -0
  598. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/system/System.py +188 -0
  599. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/system/__init__.py +0 -0
  600. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/system/devices/CPU.py +30 -0
  601. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/system/devices/Device.py +101 -0
  602. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/system/devices/DeviceTypeEnum.py +14 -0
  603. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/system/devices/GPU.py +37 -0
  604. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/system/devices/__init__.py +0 -0
  605. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/system/system_utils.py +77 -0
  606. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/types/Aliases.py +10 -0
  607. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/types/DataAccessType.py +61 -0
  608. discopop_library-0.0.1/discopop_library/discopop_optimizer/classes/types/__init__.py +0 -0
  609. discopop_library-0.0.1/discopop_library/discopop_optimizer/gui/__init__.py +0 -0
  610. discopop_library-0.0.1/discopop_library/discopop_optimizer/gui/plotting/CostModels.py +425 -0
  611. discopop_library-0.0.1/discopop_library/discopop_optimizer/gui/plotting/__init__.py +0 -0
  612. discopop_library-0.0.1/discopop_library/discopop_optimizer/gui/presentation/ChoiceDetails.py +87 -0
  613. discopop_library-0.0.1/discopop_library/discopop_optimizer/gui/presentation/OptionTable.py +312 -0
  614. discopop_library-0.0.1/discopop_library/discopop_optimizer/gui/presentation/__init__.py +0 -0
  615. discopop_library-0.0.1/discopop_library/discopop_optimizer/gui/queries/ValueTableQuery.py +174 -0
  616. discopop_library-0.0.1/discopop_library/discopop_optimizer/gui/queries/__init__.py +0 -0
  617. discopop_library-0.0.1/discopop_library/discopop_optimizer/gui/widgets/ScrollableFrame.py +49 -0
  618. discopop_library-0.0.1/discopop_library/discopop_optimizer/gui/widgets/ScrollableText.py +46 -0
  619. discopop_library-0.0.1/discopop_library/discopop_optimizer/gui/widgets/__init__.py +0 -0
  620. discopop_library-0.0.1/discopop_library/discopop_optimizer/interactive/__init__.py +0 -0
  621. discopop_library-0.0.1/discopop_library/discopop_optimizer/interactive/interactive_optimizer.py +195 -0
  622. discopop_library-0.0.1/discopop_library/discopop_optimizer/optimization/__init__.py +0 -0
  623. discopop_library-0.0.1/discopop_library/discopop_optimizer/optimization/evaluate.py +126 -0
  624. discopop_library-0.0.1/discopop_library/discopop_optimizer/optimization/evaluate_all_decision_combinations.py +208 -0
  625. discopop_library-0.0.1/discopop_library/discopop_optimizer/optimization/evolutionary_algorithm.py +515 -0
  626. discopop_library-0.0.1/discopop_library/discopop_optimizer/optimization/greedy.py +245 -0
  627. discopop_library-0.0.1/discopop_library/discopop_optimizer/optimization/validation.py +149 -0
  628. discopop_library-0.0.1/discopop_library/discopop_optimizer/optimizer.py +294 -0
  629. discopop_library-0.0.1/discopop_library/discopop_optimizer/scheduling/__init__.py +0 -0
  630. discopop_library-0.0.1/discopop_library/discopop_optimizer/scheduling/workload_delta.py +251 -0
  631. discopop_library-0.0.1/discopop_library/discopop_optimizer/suggestions/__init__.py +0 -0
  632. discopop_library-0.0.1/discopop_library/discopop_optimizer/suggestions/importers/__init__.py +0 -0
  633. discopop_library-0.0.1/discopop_library/discopop_optimizer/suggestions/importers/do_all.py +246 -0
  634. discopop_library-0.0.1/discopop_library/discopop_optimizer/suggestions/importers/main.py +36 -0
  635. discopop_library-0.0.1/discopop_library/discopop_optimizer/suggestions/importers/reduction.py +173 -0
  636. discopop_library-0.0.1/discopop_library/discopop_optimizer/suggestions/optimizers/__init__.py +0 -0
  637. discopop_library-0.0.1/discopop_library/discopop_optimizer/suggestions/optimizers/loop_collapse.py +299 -0
  638. discopop_library-0.0.1/discopop_library/discopop_optimizer/suggestions/optimizers/main.py +17 -0
  639. discopop_library-0.0.1/discopop_library/discopop_optimizer/utilities/MOGUtilities.py +739 -0
  640. discopop_library-0.0.1/discopop_library/discopop_optimizer/utilities/__init__.py +0 -0
  641. discopop_library-0.0.1/discopop_library/discopop_optimizer/utilities/insert_device_switch_nodes.py +127 -0
  642. discopop_library-0.0.1/discopop_library/discopop_optimizer/utilities/optimization/GlobalOptimization/RandomSamples.py +110 -0
  643. discopop_library-0.0.1/discopop_library/discopop_optimizer/utilities/optimization/GlobalOptimization/__init__.py +0 -0
  644. discopop_library-0.0.1/discopop_library/discopop_optimizer/utilities/optimization/LocalOptimization/TopDown.py +182 -0
  645. discopop_library-0.0.1/discopop_library/discopop_optimizer/utilities/optimization/LocalOptimization/__init__.py +0 -0
  646. discopop_library-0.0.1/discopop_library/discopop_optimizer/utilities/optimization/__init__.py +0 -0
  647. discopop_library-0.0.1/discopop_library/discopop_optimizer/utilities/simple_utilities.py +20 -0
  648. discopop_library-0.0.1/discopop_library/discopop_optimizer/utilities/visualization/__init__.py +0 -0
  649. discopop_library-0.0.1/discopop_library/discopop_optimizer/utilities/visualization/plotting.py +190 -0
  650. discopop_library-0.0.1/discopop_library/discopop_optimizer/utilities/visualization/update_graph.py +206 -0
  651. discopop_library-0.0.1/discopop_library/global_data/__init__.py +0 -0
  652. discopop_library-0.0.1/discopop_library/global_data/version/VERSION +1 -0
  653. discopop_library-0.0.1/discopop_library/global_data/version/__init__.py +0 -0
  654. discopop_library-0.0.1/discopop_library/global_data/version/utils.py +17 -0
  655. discopop_library-0.0.1/discopop_library/py.typed +0 -0
  656. discopop_library-0.0.1/discopop_library/result_classes/DetectionResult.py +51 -0
  657. discopop_library-0.0.1/discopop_library/result_classes/MergedPattern.py +19 -0
  658. discopop_library-0.0.1/discopop_library/result_classes/OptimizerOutputPattern.py +78 -0
  659. discopop_library-0.0.1/discopop_library/result_classes/PatternStorage.py +49 -0
  660. discopop_library-0.0.1/discopop_library/result_classes/__init__.py +0 -0
  661. discopop_library-0.0.1/discopop_library/result_classes/loading.py +185 -0
  662. discopop_library-0.0.1/discopop_library/result_classes/test_loading.py +216 -0
  663. discopop_library-0.0.1/discopop_library/scripts/dp-fmap +28 -0
  664. discopop_library-0.0.1/discopop_library/tools/__init__.py +0 -0
  665. discopop_library-0.0.1/discopop_library/tools/update_notifications/__init__.py +0 -0
  666. discopop_library-0.0.1/discopop_library/tools/update_notifications/test_update_notifier.py +350 -0
  667. discopop_library-0.0.1/discopop_library/tools/update_notifications/update_notifier.py +419 -0
  668. discopop_library-0.0.1/discopop_library.egg-info/PKG-INFO +100 -0
  669. discopop_library-0.0.1/discopop_library.egg-info/SOURCES.txt +674 -0
  670. discopop_library-0.0.1/discopop_library.egg-info/dependency_links.txt +1 -0
  671. discopop_library-0.0.1/discopop_library.egg-info/entry_points.txt +15 -0
  672. discopop_library-0.0.1/discopop_library.egg-info/requires.txt +31 -0
  673. discopop_library-0.0.1/discopop_library.egg-info/top_level.txt +1 -0
  674. discopop_library-0.0.1/discopop_library.egg-info/zip-safe +1 -0
  675. discopop_library-0.0.1/pyproject.toml +98 -0
  676. discopop_library-0.0.1/setup.cfg +4 -0
@@ -0,0 +1,29 @@
1
+ Copyright © 2015-2020 Technische Universitaet Darmstadt, Darmstadt, Germany
2
+ Copyright © 2018-2020 Iowa State University, Ames, USA
3
+ Copyright © 2012-2015 German Research School for Simulation Sciences GmbH, Juelich/Aachen, Germany
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the names of the copyright holders nor the names of their
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,100 @@
1
+ Metadata-Version: 2.4
2
+ Name: discopop-library
3
+ Version: 0.0.1
4
+ Summary: DiscoPoP Library: shared utilities and tools for the DiscoPoP parallelization framework.
5
+ Author-email: TU Darmstadt and Iowa State University <discopop@lists.parallel.informatik.tu-darmstadt.de>
6
+ License: Copyright © 2015-2020 Technische Universitaet Darmstadt, Darmstadt, Germany
7
+ Copyright © 2018-2020 Iowa State University, Ames, USA
8
+ Copyright © 2012-2015 German Research School for Simulation Sciences GmbH, Juelich/Aachen, Germany
9
+ All rights reserved.
10
+
11
+ Redistribution and use in source and binary forms, with or without
12
+ modification, are permitted provided that the following conditions are met:
13
+
14
+ 1. Redistributions of source code must retain the above copyright notice, this
15
+ list of conditions and the following disclaimer.
16
+
17
+ 2. Redistributions in binary form must reproduce the above copyright notice,
18
+ this list of conditions and the following disclaimer in the documentation
19
+ and/or other materials provided with the distribution.
20
+
21
+ 3. Neither the names of the copyright holders nor the names of their
22
+ contributors may be used to endorse or promote products derived from
23
+ this software without specific prior written permission.
24
+
25
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
28
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
29
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
31
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
33
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35
+
36
+ Project-URL: Homepage, https://www.discopop.tu-darmstadt.de/
37
+ Classifier: Development Status :: 4 - Beta
38
+ Classifier: Environment :: Console
39
+ Classifier: Intended Audience :: Developers
40
+ Classifier: Operating System :: OS Independent
41
+ Classifier: Programming Language :: Python :: 3
42
+ Classifier: Topic :: Software Development
43
+ Requires-Python: >=3.11
44
+ Description-Content-Type: text/markdown
45
+ License-File: LICENSE
46
+ Requires-Dist: discopop-hotspot-detection>=0.0.1
47
+ Requires-Dist: extrap
48
+ Requires-Dist: filelock
49
+ Requires-Dist: jsonpickle
50
+ Requires-Dist: jsons
51
+ Requires-Dist: matplotlib
52
+ Requires-Dist: networkx
53
+ Requires-Dist: numpy
54
+ Requires-Dist: packaging
55
+ Requires-Dist: plotille
56
+ Requires-Dist: pydot
57
+ Requires-Dist: PySide6-Essentials
58
+ Requires-Dist: requests
59
+ Requires-Dist: scipy
60
+ Requires-Dist: sympy
61
+ Requires-Dist: sympy_plot_backends
62
+ Requires-Dist: tabulate
63
+ Requires-Dist: termcolor
64
+ Requires-Dist: tqdm
65
+ Requires-Dist: ttkthemes
66
+ Provides-Extra: dev
67
+ Requires-Dist: mypy; extra == "dev"
68
+ Requires-Dist: black; extra == "dev"
69
+ Requires-Dist: data-science-types; extra == "dev"
70
+ Requires-Dist: pre-commit; extra == "dev"
71
+ Provides-Extra: ci
72
+ Requires-Dist: mypy; extra == "ci"
73
+ Requires-Dist: black; extra == "ci"
74
+ Requires-Dist: data-science-types; extra == "ci"
75
+ Dynamic: license-file
76
+
77
+ <!--
78
+ /*
79
+ * This file is part of the DiscoPoP software (http://www.discopop.tu-darmstadt.de)
80
+ *
81
+ * Copyright (c) 2020, Technische Universitaet Darmstadt, Germany
82
+ *
83
+ * This software may be modified and distributed under the terms of
84
+ * the 3-Clause BSD License. See the LICENSE file in the package base
85
+ * directory for details.
86
+ *
87
+ */
88
+ -->
89
+
90
+ # DiscoPoP Library
91
+ The library (`discopop-library`) holds the tools around the explorer: the project manager with the graphical user interface, the patch generator, applicator and repair, the empirical autotuner, the optimizer and several helper tools. It also provides shared utilities for the other packages.
92
+
93
+ Console scripts: `discopop_gui` (the graphical user interface), `discopop_project_manager` (alias `discopop`), `discopop_patch_generator`, `discopop_patch_applicator`, `discopop_patch_repair`, `discopop_auto_tuner`, `discopop_optimizer`, `discopop_config_provider`, `discopop_sanity_checker`, `discopop_preprocessor`, `discopop_dependency_comparator` and `discopop_parallel_region_merger`.
94
+
95
+ It is installed as part of `pip install discopop` and depends on `discopop-hotspot-detection`. The unit tests are colocated with the source and run with `python -m pytest library/discopop_library`.
96
+
97
+ Documentation: [Manual](https://tuda-hpclab.github.io/discopop/manual/) and [Tools](https://tuda-hpclab.github.io/discopop/Tools).
98
+
99
+ ## License
100
+ © DiscoPoP is available under the terms of the BSD-3-Clause license, as specified in the LICENSE file.
@@ -0,0 +1,24 @@
1
+ <!--
2
+ /*
3
+ * This file is part of the DiscoPoP software (http://www.discopop.tu-darmstadt.de)
4
+ *
5
+ * Copyright (c) 2020, Technische Universitaet Darmstadt, Germany
6
+ *
7
+ * This software may be modified and distributed under the terms of
8
+ * the 3-Clause BSD License. See the LICENSE file in the package base
9
+ * directory for details.
10
+ *
11
+ */
12
+ -->
13
+
14
+ # DiscoPoP Library
15
+ The library (`discopop-library`) holds the tools around the explorer: the project manager with the graphical user interface, the patch generator, applicator and repair, the empirical autotuner, the optimizer and several helper tools. It also provides shared utilities for the other packages.
16
+
17
+ Console scripts: `discopop_gui` (the graphical user interface), `discopop_project_manager` (alias `discopop`), `discopop_patch_generator`, `discopop_patch_applicator`, `discopop_patch_repair`, `discopop_auto_tuner`, `discopop_optimizer`, `discopop_config_provider`, `discopop_sanity_checker`, `discopop_preprocessor`, `discopop_dependency_comparator` and `discopop_parallel_region_merger`.
18
+
19
+ It is installed as part of `pip install discopop` and depends on `discopop-hotspot-detection`. The unit tests are colocated with the source and run with `python -m pytest library/discopop_library`.
20
+
21
+ Documentation: [Manual](https://tuda-hpclab.github.io/discopop/manual/) and [Tools](https://tuda-hpclab.github.io/discopop/Tools).
22
+
23
+ ## License
24
+ © DiscoPoP is available under the terms of the BSD-3-Clause license, as specified in the LICENSE file.
@@ -0,0 +1 @@
1
+ 0.0.1
@@ -0,0 +1,9 @@
1
+ # This file is part of the DiscoPoP software (http://www.discopop.tu-darmstadt.de)
2
+ #
3
+ # Copyright (c) 2020, Technische Universitaet Darmstadt, Germany
4
+ #
5
+ # This software may be modified and distributed under the terms of
6
+ # the 3-Clause BSD License. See the LICENSE file in the package base
7
+ # directory for details.
8
+
9
+ PatternID = int
@@ -0,0 +1,7 @@
1
+ # This file is part of the DiscoPoP software (http://www.discopop.tu-darmstadt.de)
2
+ #
3
+ # Copyright (c) 2020, Technische Universitaet Darmstadt, Germany
4
+ #
5
+ # This software may be modified and distributed under the terms of
6
+ # the 3-Clause BSD License. See the LICENSE file in the package base
7
+ # directory for details.
@@ -0,0 +1,104 @@
1
+ # This file is part of the DiscoPoP software (http://www.discopop.tu-darmstadt.de)
2
+ #
3
+ # Copyright (c) 2020, Technische Universitaet Darmstadt, Germany
4
+ #
5
+ # This software may be modified and distributed under the terms of
6
+ # the 3-Clause BSD License. See the LICENSE file in the package base
7
+ # directory for details.
8
+
9
+ """Amdahl ceilings for a set of applied parallelization suggestions.
10
+
11
+ For a set of suggestions, ``p`` is the fraction of the sequential runtime spent in the
12
+ regions those suggestions parallelize. Amdahl's law then bounds the achievable speedup:
13
+
14
+ * ``amdahl_ceiling(p, n) = 1 / ((1 - p) + p / n)`` for ``n`` threads, and
15
+ * ``amdahl_limit(p) = 1 / (1 - p)`` for an unlimited number of threads.
16
+
17
+ ``p`` is an *estimate*: region runtimes come from the instrumented hotspot-detection
18
+ runs (``Hotspots.json``), not from the measured program. Every function returns None
19
+ rather than a guess when an input is unknown, so a consumer can leave the point out.
20
+ """
21
+
22
+ import math
23
+ from dataclasses import dataclass
24
+ from typing import Dict, Iterable, List, Optional, Tuple
25
+
26
+
27
+ @dataclass(frozen=True)
28
+ class SuggestionExtent:
29
+ """The source range one suggestion parallelizes (from the detection result, without runtimes)."""
30
+
31
+ suggestion_id: int
32
+ file_id: int
33
+ start_line: int
34
+ end_line: int
35
+
36
+
37
+ @dataclass(frozen=True)
38
+ class SuggestionRegion:
39
+ """The source range one suggestion parallelizes and its share of the program's runtime."""
40
+
41
+ suggestion_id: int
42
+ file_id: int
43
+ start_line: int
44
+ end_line: int
45
+ # region runtime / whole-program runtime, None if no hotspot region matched
46
+ time_share: Optional[float]
47
+
48
+
49
+ def parallel_fraction(suggestion_ids: Iterable[int], regions: Dict[int, SuggestionRegion]) -> Optional[float]:
50
+ """Fraction of the sequential runtime covered by the suggestions, or None if unknown.
51
+
52
+ A suggestion whose region is nested inside another selected suggestion's region (same
53
+ file, contained line range) is already covered by it and is counted once. The empty
54
+ set covers nothing: p = 0.
55
+ """
56
+ selected: List[SuggestionRegion] = []
57
+ for suggestion_id in suggestion_ids:
58
+ region = regions.get(int(suggestion_id))
59
+ if region is None or region.time_share is None:
60
+ return None
61
+ selected.append(region)
62
+ # outermost first; identical ranges keep one representative
63
+ selected.sort(key=lambda r: (r.file_id, r.start_line, -r.end_line, r.suggestion_id))
64
+ kept: List[SuggestionRegion] = []
65
+ for region in selected:
66
+ if any(
67
+ k.file_id == region.file_id and k.start_line <= region.start_line and region.end_line <= k.end_line
68
+ for k in kept
69
+ ):
70
+ continue
71
+ kept.append(region)
72
+ total = sum(r.time_share for r in kept if r.time_share is not None)
73
+ return max(0.0, min(1.0, total))
74
+
75
+
76
+ def amdahl_ceiling(p: Optional[float], threads: int) -> Optional[float]:
77
+ """Speedup bound for parallel fraction ``p`` on ``threads`` threads (None if unknown)."""
78
+ if p is None or threads < 1:
79
+ return None
80
+ return 1.0 / ((1.0 - p) + p / threads)
81
+
82
+
83
+ def amdahl_limit(p: Optional[float]) -> Optional[float]:
84
+ """Speedup bound for an unlimited number of threads; ``math.inf`` if p == 1, None if unknown."""
85
+ if p is None:
86
+ return None
87
+ if p >= 1.0:
88
+ return math.inf
89
+ return 1.0 / (1.0 - p)
90
+
91
+
92
+ def finite_or_none(value: Optional[float]) -> Optional[float]:
93
+ """Rounded value for JSON: None and infinity (not valid JSON) both become None."""
94
+ if value is None or math.isinf(value) or math.isnan(value):
95
+ return None
96
+ return round(value, 4)
97
+
98
+
99
+ def ceilings(
100
+ suggestion_ids: Iterable[int], threads: int, regions: Dict[int, SuggestionRegion]
101
+ ) -> Tuple[Optional[float], Optional[float], Optional[float]]:
102
+ """(parallel fraction, ceiling at ``threads``, ceiling at unlimited threads)."""
103
+ p = parallel_fraction(suggestion_ids, regions)
104
+ return p, amdahl_ceiling(p, threads), amdahl_limit(p)
@@ -0,0 +1,281 @@
1
+ # This file is part of the DiscoPoP software (http://www.discopop.tu-darmstadt.de)
2
+ #
3
+ # Copyright (c) 2020, Technische Universitaet Darmstadt, Germany
4
+ #
5
+ # This software may be modified and distributed under the terms of
6
+ # the 3-Clause BSD License. See the LICENSE file in the package base
7
+ # directory for details.
8
+
9
+ """Maps suggestions to the share of the program's runtime they parallelize.
10
+
11
+ Two inputs: the *extents* of the suggestions (file, first and last line, a loop's suggestion extended to the end
12
+ of the loop) and the region runtimes of ``hotspot_detection/Hotspots.json``.
13
+
14
+ The extents come from the explorer's detection result. Decoding ``detection_result_dump.json`` takes minutes and
15
+ many times its size in memory (gigabytes for a large program), so the explorer also writes the extents into the
16
+ small ``suggestion_extents.json`` next to the dump. It records the size and modification time of the dump it was
17
+ made from, which tell whether it is current. Readers that must stay responsive (the GUI) only use that file
18
+ (:func:`load_regions` without ``allow_decode``); a detection result of an older explorer is extracted once, in a
19
+ process of its own: ``python -m discopop_library.Amdahl.regions --extract-extents <.discopop>``.
20
+
21
+ The runtimes are read on every call, so new hotspot measurements never require the dump.
22
+ """
23
+
24
+ import argparse
25
+ import json
26
+ import os
27
+ import sys
28
+ from typing import Any, Dict, List, Optional, Sequence, Tuple
29
+
30
+ from discopop_library.Amdahl.model import SuggestionExtent, SuggestionRegion
31
+ from discopop_library.HostpotLoader.detailed_hotspot_loader import (
32
+ HotspotRegionInfo,
33
+ hotspots_json_path,
34
+ load_detailed_hotspots,
35
+ )
36
+ from discopop_library.HostpotLoader.HotspotNodeType import HotspotNodeType
37
+
38
+ EXTENTS_NAME = "suggestion_extents.json"
39
+ EXTENTS_FORMAT = 1
40
+ DUMP_NAME = "detection_result_dump.json"
41
+
42
+ EXTRACT_COMMAND_HINT = "python -m discopop_library.Amdahl.regions --extract-extents <.discopop directory>"
43
+
44
+
45
+ def dump_path_of(dot_dp: str) -> str:
46
+ """The detection result dump the explorer writes by default."""
47
+ return os.path.join(dot_dp, "explorer", DUMP_NAME)
48
+
49
+
50
+ def extents_path_of(dump_path: str) -> str:
51
+ """The extents file belonging to the dump ``dump_path`` (next to it)."""
52
+ return os.path.join(os.path.dirname(os.path.abspath(dump_path)), EXTENTS_NAME)
53
+
54
+
55
+ # ── the regions ──────────────────────────────────────────────────────────────
56
+
57
+
58
+ def program_runtime(hotspots: Sequence[HotspotRegionInfo]) -> Optional[float]:
59
+ """Runtime of the whole program: ``main``'s longest run, else the longest region."""
60
+ mains = [h.max_val for h in hotspots if h.node_type == HotspotNodeType.FUNCTION and h.name == "main"]
61
+ candidates = mains if mains else [h.max_val for h in hotspots]
62
+ best = max(candidates, default=0.0)
63
+ return best if best > 0 else None
64
+
65
+
66
+ def _hotspot_at(hotspots: Sequence[HotspotRegionInfo], file_id: int, line: int) -> Optional[HotspotRegionInfo]:
67
+ matches = [h for h in hotspots if h.file_id == file_id and h.start_line == line]
68
+ if not matches:
69
+ return None
70
+ # prefer loops (suggestions mostly sit on loops), then the longest-running entry
71
+ matches.sort(key=lambda h: (h.node_type != HotspotNodeType.LOOP, -h.max_val))
72
+ return matches[0]
73
+
74
+
75
+ def suggestion_extents(detection_result: Any) -> Dict[int, SuggestionExtent]:
76
+ """The source range of every suggestion of ``detection_result``: a suggestion on a loop reaches to the end of
77
+ the longest loop starting at its first line."""
78
+ # imported here: the library must not import the explorer when it is loaded
79
+ from discopop_explorer.classes.PEGraph.LoopNode import LoopNode
80
+ from discopop_explorer.functions.PEGraph.queries.nodes import all_nodes
81
+
82
+ loops: Dict[str, Any] = {}
83
+ pet = getattr(detection_result, "pet", None)
84
+ if pet is not None:
85
+ for node in all_nodes(pet, LoopNode):
86
+ key = str(node.start_position())
87
+ previous = loops.get(key)
88
+ if previous is None or _span(node) > _span(previous):
89
+ loops[key] = node
90
+
91
+ result: Dict[int, SuggestionExtent] = {}
92
+ for pattern_type in sorted(detection_result.patterns.__dict__):
93
+ for pattern in detection_result.patterns.__dict__[pattern_type]:
94
+ try:
95
+ file_id = int(str(pattern.start_line).split(":")[0])
96
+ start = int(str(pattern.start_line).split(":")[1])
97
+ end = int(str(pattern.end_line).split(":")[1])
98
+ except (IndexError, ValueError):
99
+ continue
100
+ loop = loops.get(str(pattern.start_line))
101
+ if loop is not None:
102
+ end = max(end, int(str(loop.end_position()).split(":")[1]))
103
+ result[int(pattern.pattern_id)] = SuggestionExtent(int(pattern.pattern_id), file_id, start, end)
104
+ return result
105
+
106
+
107
+ def regions_from_extents(
108
+ extents: Dict[int, SuggestionExtent], hotspots: Sequence[HotspotRegionInfo]
109
+ ) -> Dict[int, SuggestionRegion]:
110
+ """Region and runtime share of every suggestion of ``extents``; the share is None if no hotspot region starts
111
+ where the suggestion does (or there are no hotspot results)."""
112
+ total = program_runtime(hotspots)
113
+ result: Dict[int, SuggestionRegion] = {}
114
+ for suggestion_id, extent in extents.items():
115
+ hotspot = _hotspot_at(hotspots, extent.file_id, extent.start_line)
116
+ share = None
117
+ if hotspot is not None and total is not None:
118
+ share = min(1.0, hotspot.max_val / total)
119
+ result[suggestion_id] = SuggestionRegion(
120
+ suggestion_id, extent.file_id, extent.start_line, extent.end_line, share
121
+ )
122
+ return result
123
+
124
+
125
+ def build_regions(detection_result: Any, hotspots: Sequence[HotspotRegionInfo]) -> Dict[int, SuggestionRegion]:
126
+ """Region and runtime share of every suggestion of ``detection_result``."""
127
+ return regions_from_extents(suggestion_extents(detection_result), hotspots)
128
+
129
+
130
+ def _span(node: Any) -> int:
131
+ return int(str(node.end_position()).split(":")[1]) - int(str(node.start_position()).split(":")[1])
132
+
133
+
134
+ # ── the extents file ─────────────────────────────────────────────────────────
135
+
136
+
137
+ def _file_identity(path: str) -> Optional[Tuple[int, int]]:
138
+ """``(size, mtime_ns)`` of ``path``; None if it does not exist."""
139
+ try:
140
+ stat = os.stat(path)
141
+ except OSError:
142
+ return None
143
+ return (stat.st_size, stat.st_mtime_ns)
144
+
145
+
146
+ def write_suggestion_extents(dump_path: str, extents: Dict[int, SuggestionExtent]) -> str:
147
+ """Write ``extents`` (made from the dump ``dump_path``, which must exist) next to the dump; returns the path.
148
+
149
+ The file records the size and modification time of the dump: it is current only as long as they match.
150
+ """
151
+ identity = _file_identity(dump_path)
152
+ if identity is None:
153
+ raise FileNotFoundError(dump_path)
154
+ path = extents_path_of(dump_path)
155
+ content = {
156
+ "format": EXTENTS_FORMAT,
157
+ "dump": {"size": identity[0], "mtime_ns": identity[1]},
158
+ "extents": {str(k): [e.file_id, e.start_line, e.end_line] for k, e in sorted(extents.items())},
159
+ }
160
+ temporary = path + ".tmp"
161
+ with open(temporary, "w") as f:
162
+ json.dump(content, f)
163
+ os.replace(temporary, path)
164
+ return path
165
+
166
+
167
+ def read_suggestion_extents(dump_path: str) -> Optional[Dict[int, SuggestionExtent]]:
168
+ """The extents belonging to the dump ``dump_path``; None if there is no extents file, it is unreadable, or it
169
+ was made from another dump (or another version of it)."""
170
+ identity = _file_identity(dump_path)
171
+ if identity is None:
172
+ return None
173
+ try:
174
+ with open(extents_path_of(dump_path), "r") as f:
175
+ content = json.load(f)
176
+ if content.get("format") != EXTENTS_FORMAT:
177
+ return None
178
+ dump = content["dump"]
179
+ if (int(dump["size"]), int(dump["mtime_ns"])) != identity:
180
+ return None
181
+ return {
182
+ int(k): SuggestionExtent(int(k), int(v[0]), int(v[1]), int(v[2])) for k, v in content["extents"].items()
183
+ }
184
+ except (OSError, ValueError, TypeError, KeyError, IndexError, AttributeError):
185
+ return None
186
+
187
+
188
+ def needs_extraction(dot_dp: str) -> bool:
189
+ """Whether there is a detection result dump without current extents (it was written by an older explorer)."""
190
+ dump_path = dump_path_of(dot_dp)
191
+ return os.path.exists(dump_path) and read_suggestion_extents(dump_path) is None
192
+
193
+
194
+ def extract_suggestion_extents(dot_dp: str) -> Dict[int, SuggestionExtent]:
195
+ """Decode the detection result dump of ``dot_dp`` and write its extents file. Slow and memory hungry (the
196
+ detection result is decoded, without the callpath tree of the PET, which the extents do not need, see
197
+ ``result_classes/loading.py``; the tree of the PET fails on any use): run it in a process of its own, never in the
198
+ GUI."""
199
+ from discopop_library.result_classes.loading import load_detection_result
200
+
201
+ dump_path = dump_path_of(dot_dp)
202
+ detection_result = load_detection_result(dump_path)
203
+ extents = suggestion_extents(detection_result)
204
+ write_suggestion_extents(dump_path, extents)
205
+ return extents
206
+
207
+
208
+ # ── loading ──────────────────────────────────────────────────────────────────
209
+
210
+ # the parsed Hotspots.json of the last call, by (path, size, mtime_ns)
211
+ _hotspots_cache: Dict[Tuple[str, int, int], List[HotspotRegionInfo]] = {}
212
+
213
+
214
+ def _hotspots_of(dot_dp: str) -> List[HotspotRegionInfo]:
215
+ path = os.path.abspath(hotspots_json_path(dot_dp))
216
+ identity = _file_identity(path)
217
+ if identity is None:
218
+ return []
219
+ key = (path, identity[0], identity[1])
220
+ cached = _hotspots_cache.get(key)
221
+ if cached is None:
222
+ cached = load_detailed_hotspots(dot_dp)
223
+ _hotspots_cache.clear()
224
+ _hotspots_cache[key] = cached
225
+ return cached
226
+
227
+
228
+ def regions_stamp(dot_dp: str) -> Tuple[Optional[Tuple[int, int]], ...]:
229
+ """Changes whenever :func:`load_regions` may return something else (the dump, its extents file, the hotspot
230
+ results): a key for callers that cache what they derive from the regions."""
231
+ dump_path = dump_path_of(dot_dp)
232
+ return (
233
+ _file_identity(dump_path),
234
+ _file_identity(extents_path_of(dump_path)),
235
+ _file_identity(hotspots_json_path(dot_dp)),
236
+ )
237
+
238
+
239
+ def load_regions(dot_dp: str, allow_decode: bool = False) -> Dict[int, SuggestionRegion]:
240
+ """Suggestion regions of a ``.discopop`` folder.
241
+
242
+ Returns an empty dict when there is no explorer result, and regions without a ``time_share`` when there is no
243
+ hotspot result: callers then get no ceiling. Without current extents (a detection result of an older
244
+ explorer), the result is empty too, unless ``allow_decode``: then the dump is decoded once and its extents are
245
+ written (slow, memory hungry: not in the GUI process, see :func:`needs_extraction`).
246
+ """
247
+ dump_path = dump_path_of(dot_dp)
248
+ if not os.path.exists(dump_path):
249
+ return {}
250
+ extents = read_suggestion_extents(dump_path)
251
+ if extents is None:
252
+ if not allow_decode:
253
+ return {}
254
+ extents = extract_suggestion_extents(dot_dp)
255
+ return regions_from_extents(extents, _hotspots_of(dot_dp))
256
+
257
+
258
+ def main(argv: Optional[Sequence[str]] = None) -> int:
259
+ parser = argparse.ArgumentParser(
260
+ prog="python -m discopop_library.Amdahl.regions",
261
+ description="Write the suggestion extents (needed for the Amdahl ceilings) of an existing detection result.",
262
+ )
263
+ parser.add_argument(
264
+ "--extract-extents",
265
+ metavar="DOT_DISCOPOP",
266
+ required=True,
267
+ help="the .discopop directory whose explorer/" + DUMP_NAME + " is decoded",
268
+ )
269
+ arguments = parser.parse_args(argv)
270
+ dot_dp = arguments.extract_extents
271
+ if not os.path.exists(dump_path_of(dot_dp)):
272
+ print("No detection result: " + dump_path_of(dot_dp) + " does not exist.", file=sys.stderr)
273
+ return 1
274
+ print("Decoding " + dump_path_of(dot_dp) + " ...", flush=True)
275
+ extents = extract_suggestion_extents(dot_dp)
276
+ print("Wrote the extents of " + str(len(extents)) + " suggestions to " + extents_path_of(dump_path_of(dot_dp)))
277
+ return 0
278
+
279
+
280
+ if __name__ == "__main__":
281
+ sys.exit(main())
@@ -0,0 +1,74 @@
1
+ # This file is part of the DiscoPoP software (http://www.discopop.tu-darmstadt.de)
2
+ #
3
+ # Copyright (c) 2020, Technische Universitaet Darmstadt, Germany
4
+ #
5
+ # This software may be modified and distributed under the terms of
6
+ # the 3-Clause BSD License. See the LICENSE file in the package base
7
+ # directory for details.
8
+
9
+ import math
10
+ from typing import Optional, cast
11
+
12
+ from discopop_library.Amdahl.model import (
13
+ SuggestionRegion,
14
+ amdahl_ceiling,
15
+ amdahl_limit,
16
+ ceilings,
17
+ finite_or_none,
18
+ parallel_fraction,
19
+ )
20
+
21
+
22
+ def _r(i: int, f: int, s: int, e: int, share: Optional[float]) -> SuggestionRegion:
23
+ return SuggestionRegion(i, f, s, e, share)
24
+
25
+
26
+ def test_ceiling_and_limit() -> None:
27
+ assert amdahl_ceiling(0.5, 2) == 1 / (0.5 + 0.25)
28
+ assert amdahl_ceiling(0.0, 16) == 1.0
29
+ assert amdahl_ceiling(None, 4) is None
30
+ assert amdahl_ceiling(0.9, 0) is None
31
+ assert amdahl_limit(0.75) == 4.0
32
+ assert amdahl_limit(1.0) == math.inf
33
+ assert amdahl_limit(None) is None
34
+
35
+
36
+ def test_ceiling_never_exceeds_thread_count_or_limit() -> None:
37
+ for p in (0.1, 0.5, 0.99):
38
+ assert cast(float, amdahl_ceiling(p, 8)) <= 8
39
+ assert cast(float, amdahl_ceiling(p, 8)) < cast(float, amdahl_limit(p))
40
+
41
+
42
+ def test_nested_suggestions_counted_once() -> None:
43
+ regions = {1: _r(1, 1, 10, 50, 0.6), 2: _r(2, 1, 20, 30, 0.5), 3: _r(3, 1, 60, 70, 0.1)}
44
+ assert math.isclose(cast(float, parallel_fraction([1, 2, 3], regions)), 0.7)
45
+ assert math.isclose(cast(float, parallel_fraction([2, 3], regions)), 0.6)
46
+
47
+
48
+ def test_same_lines_in_other_file_not_nested() -> None:
49
+ regions = {1: _r(1, 1, 10, 50, 0.3), 2: _r(2, 2, 20, 30, 0.2)}
50
+ assert math.isclose(cast(float, parallel_fraction([1, 2], regions)), 0.5)
51
+
52
+
53
+ def test_identical_ranges_counted_once() -> None:
54
+ regions = {1: _r(1, 1, 10, 50, 0.3), 2: _r(2, 1, 10, 50, 0.3)}
55
+ assert math.isclose(cast(float, parallel_fraction([1, 2], regions)), 0.3)
56
+
57
+
58
+ def test_unknown_inputs_give_none() -> None:
59
+ regions = {1: _r(1, 1, 10, 50, None)}
60
+ assert parallel_fraction([1], regions) is None
61
+ assert parallel_fraction([99], regions) is None
62
+ assert parallel_fraction([], regions) == 0.0
63
+ assert ceilings([99], 4, regions) == (None, None, None)
64
+
65
+
66
+ def test_fraction_clamped_to_one() -> None:
67
+ regions = {1: _r(1, 1, 1, 5, 0.8), 2: _r(2, 1, 6, 9, 0.8)}
68
+ assert parallel_fraction([1, 2], regions) == 1.0
69
+
70
+
71
+ def test_finite_or_none() -> None:
72
+ assert finite_or_none(math.inf) is None
73
+ assert finite_or_none(None) is None
74
+ assert finite_or_none(1.23456) == 1.2346