diff --git a/examples/ab5.jl b/examples/ab5.jl new file mode 100644 index 0000000..f84da02 --- /dev/null +++ b/examples/ab5.jl @@ -0,0 +1,34 @@ +using MetagraphOptimization +using BenchmarkTools + +println("Getting machine info") +@time machine = get_machine_info() + +println("Making model") +@time model = ABCModel() + +println("Making process") +process_str = "AB->ABBBBB" +@time process = parse_process(process_str, model) + +println("Parsing DAG") +@time graph = parse_dag("input/$process_str.txt", model) + +println("Generating input data") +@time input_data = [gen_process_input(process) for _ in 1:1000] + +include("profiling_utilities.jl") +println("Reducing graph") +@time reduce_all!(graph) + +println("Generating compute function") +@time compute_func = get_compute_function(graph, process, machine) + +println("First run, single argument") +@time compute_func(input_data[1]) + +println("\nBenchmarking function, 1 input") +display(@benchmark compute_func($(input_data[1]))) + +println("\nBenchmarking function, 1000 inputs") +display(@benchmark compute_func.($input_data)) diff --git a/examples/ab7.jl b/examples/ab7.jl new file mode 100644 index 0000000..506d9fb --- /dev/null +++ b/examples/ab7.jl @@ -0,0 +1,34 @@ +using MetagraphOptimization +using BenchmarkTools + +println("Getting machine info") +@time machine = get_machine_info() + +println("Making model") +@time model = ABCModel() + +println("Making process") +process_str = "AB->ABBBBBBB" +@time process = parse_process(process_str, model) + +println("Parsing DAG") +@time graph = parse_dag("input/$process_str.txt", model) + +println("Generating input data") +@time input_data = [gen_process_input(process) for _ in 1:1000] + +include("profiling_utilities.jl") +println("Reducing graph") +@time reduce_all!(graph) + +println("Generating compute function") +@time compute_func = get_compute_function(graph, process, machine) + +println("First run, single argument") +@time compute_func(input_data[1]) + +println("\nBenchmarking function, 1 input") +display(@benchmark compute_func($(input_data[1]))) + +println("\nBenchmarking function, 1000 inputs") +display(@benchmark compute_func.($input_data)) diff --git a/notebooks/abc_model_large.ipynb b/notebooks/abc_model_large.ipynb index c4d0b99..00734f4 100644 --- a/notebooks/abc_model_large.ipynb +++ b/notebooks/abc_model_large.ipynb @@ -11,62 +11,7 @@ }, { "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Graph:\n", - " Nodes: Total: 438436, ComputeTaskP: 10, ComputeTaskU: 10, \n", - " ComputeTaskV: 109600, ComputeTaskSum: 1, ComputeTaskS2: 40320, \n", - " ComputeTaskS1: 69272, DataTask: 219223\n", - " Edges: 628665\n", - " Total Compute Effort: 1.903443e6\n", - " Total Data Transfer: 1.8040896e7\n", - " Total Compute Intensity: 0.10550712115407128\n" - ] - } - ], - "source": [ - "model = ABCModel()\n", - "process_str = \"AB->ABBBBBBB\"\n", - "process = parse_process(process_str, model)\n", - "graph = parse_dag(\"../input/$process_str.txt\", model)\n", - "print(graph)" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "351.606942 seconds (1.13 G allocations: 25.949 GiB, 1.33% gc time, 0.72% compilation time)\n", - "Graph:\n", - " Nodes: Total: 277188, ComputeTaskP: 10, ComputeTaskU: 10, \n", - " ComputeTaskV: 69288, ComputeTaskSum: 1, ComputeTaskS2: 40320, \n", - " ComputeTaskS1: 28960, DataTask: 138599\n", - " Edges: 427105\n", - " Total Compute Effort: 1.218139e6\n", - " Total Data Transfer: 1.2235968e7\n", - " Total Compute Intensity: 0.0995539543745129\n" - ] - } - ], - "source": [ - "include(\"../examples/profiling_utilities.jl\")\n", - "@time reduce_all!(graph)\n", - "print(graph)" - ] - }, - { - "cell_type": "code", - "execution_count": 5, + "execution_count": 6, "metadata": {}, "outputs": [ { @@ -86,400 +31,425 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "2315.896312 seconds (87.18 M allocations: 132.726 GiB, 0.11% gc time, 0.04% compilation time)\n" + "Graph:\n", + " Nodes: Total: 7854, ComputeTaskP: 8, ComputeTaskS2: 720, \n", + " ComputeTaskU: 8, ComputeTaskSum: 1, ComputeTaskS1: 1230, \n", + " ComputeTaskV: 1956, DataTask: 3931\n", + " Edges: 11241\n", + " Total Compute Effort: 33915.0\n", + " Total Data Transfer: 322464.0\n", + " Total Compute Intensity: 0.10517453111044954\n" ] - }, - { - "data": { - "text/plain": [ - "compute__8fd7c454_6214_11ee_3616_0f2435e477fe (generic function with 1 method)" - ] - }, - "execution_count": 6, - "metadata": {}, - "output_type": "execute_result" } ], "source": [ - "@time compute_AB_AB7 = get_compute_function(graph, process, machine)" + "model = ABCModel()\n", + "process_str = \"AB->ABBBBB\"\n", + "process = parse_process(process_str, model)\n", + "graph = parse_dag(\"../input/$process_str.txt\", model)\n", + "print(graph)" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "compute__ae7097a4_7bfc_11ee_2cec_190d7ced64f1 (generic function with 1 method)" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "compute_AB_AB5 = get_compute_function(graph, process, machine)" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - " 1.910169 seconds (4.34 M allocations: 278.284 MiB, 6.25% gc time, 99.23% compilation time)\n" + " 0.140021 seconds (791.41 k allocations: 30.317 MiB, 9.74% gc time)\n", + "Graph:\n", + " Nodes: Total: 4998, ComputeTaskP: 8, ComputeTaskS2: 720, \n", + " ComputeTaskU: 8, ComputeTaskSum: 1, ComputeTaskS1: 516, \n", + " ComputeTaskV: 1242, DataTask: 2503\n", + " Edges: 7671\n", + " Total Compute Effort: 21777.0\n", + " Total Data Transfer: 219648.0\n", + " Total Compute Intensity: 0.09914499562937062\n" + ] + } + ], + "source": [ + "include(\"../examples/profiling_utilities.jl\")\n", + "@time reduce_all!(graph)\n", + "print(graph)" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " 3.626740 seconds (1.52 M allocations: 114.358 MiB, 0.84% gc time)\n" + ] + }, + { + "data": { + "text/plain": [ + "compute__bad8f2ac_7bfc_11ee_176b_b72dc8919aad (generic function with 1 method)" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "@time compute_AB_AB5_reduced = get_compute_function(graph, process, machine)" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " 2.130952 seconds (4.31 M allocations: 276.129 MiB, 4.50% gc time, 99.02% compilation time)\n" ] }, { "data": { "text/plain": [ "1000-element Vector{ABCProcessInput}:\n", - " Input for ABC Process: 'AB->ABBBBBBB':\n", + " Input for ABC Process: 'AB->ABBBBB':\n", " 2 Incoming particles:\n", - " A: [8.411745173347825, 0.0, 0.0, 8.352092962924948]\n", - " B: [8.411745173347825, 0.0, 0.0, -8.352092962924948]\n", - " 8 Outgoing Particles:\n", - " A: [-2.003428483168789, 1.2386385417950023, -0.8321671195319228, 0.8871291535745444]\n", - " B: [-2.444326994820653, 1.1775023368116424, -0.9536682034633904, 1.6366855721594777]\n", - " B: [-4.289211829680359, -3.7216649121036443, 1.128125248220305, 1.50793959634144]\n", - " B: [-1.2727607454602508, 0.07512513775641204, 0.6370236198332677, -0.45659285653208986]\n", - " B: [-1.8777156401619268, -1.042329795325101, -0.5508846238377632, -1.0657817573524957]\n", - " B: [-1.1322368113474306, 0.0498922458527246, -0.2963537951915457, -0.4377732162313449]\n", - " B: [-1.4340705015357569, 0.7798902829682378, 0.144450581630926, -0.6538068364381232]\n", - " B: [-2.369739340520482, 1.4429461622447262, 0.7234742923401235, -1.4177996555214083]\n", + " A: [4.694213004647641, 0.0, 0.0, 4.58646222408983]\n", + " B: [4.694213004647641, 0.0, 0.0, -4.58646222408983]\n", + " 6 Outgoing Particles:\n", + " A: [-1.1989656045893697, -0.40235742161696864, 0.06512533692021122, 0.5209469423550988]\n", + " B: [-1.2555060342925868, 0.3685683194051901, 0.4785890883121294, -0.4597882997907804]\n", + " B: [-2.189083660521547, 0.31663070338411387, 0.1742479621961443, -1.9134967776579581]\n", + " B: [-1.0637129314000269, -0.2948512505337184, 0.0500740340487307, -0.2050378784528044]\n", + " B: [-1.6149410305664367, 1.0344652685816964, -0.406159957064284, 0.6106965118475143]\n", + " B: [-2.0662167479253144, -1.0224556192203134, -0.3618764644129321, 1.4466795016989296]\n", "\n", - " Input for ABC Process: 'AB->ABBBBBBB':\n", + " Input for ABC Process: 'AB->ABBBBB':\n", " 2 Incoming particles:\n", - " A: [8.262146117199348, 0.0, 0.0, 8.201405883258813]\n", - " B: [8.262146117199348, 0.0, 0.0, -8.201405883258813]\n", - " 8 Outgoing Particles:\n", - " A: [-2.022253637967156, 0.040616190652067494, 1.5789161216660899, -0.7712872241073523]\n", - " B: [-1.085155894223277, -0.4013306445746292, 0.044561160964560184, -0.12046298778597243]\n", - " B: [-2.3099664718736963, -0.6028883246226666, 0.7721426580907682, 1.8374619682515352]\n", - " B: [-3.8528592267292674, -1.1057919702708323, -3.154341441424319, -1.6345881470237529]\n", - " B: [-1.445065980497648, -0.3803292238069696, -0.9038074225417192, 0.3559459403736899]\n", - " B: [-1.637993216461692, 0.18276067729419151, -0.6165325663294264, 1.1267244146927589]\n", - " B: [-3.0791604558286254, 1.8666082398498536, 2.1149851082876507, -0.7237684597886623]\n", - " B: [-1.091837350817336, 0.4003550554789843, 0.16407638128639515, -0.0700255046122441]\n", + " A: [5.621657834589244, 0.0, 0.0, 5.532001157736559]\n", + " B: [5.621657834589244, 0.0, 0.0, -5.532001157736559]\n", + " 6 Outgoing Particles:\n", + " A: [-2.058801595505931, 0.7220299456693885, 0.22719930902793095, 1.6327024349806234]\n", + " B: [-1.1826215869997767, 0.04638669502532437, -0.553508153090363, -0.30011800516629]\n", + " B: [-2.3776830758041227, -0.8637209881441633, -0.22710813067439403, 1.9636152272240621]\n", + " B: [-1.9086249240920268, 0.02598092498567318, -1.087715954825374, -1.2079106316365085]\n", + " B: [-2.6526208210236426, 0.3117066248738638, 1.6178469805428013, -1.8225826038033035]\n", + " B: [-1.0629636657529868, -0.24238320241008685, 0.023285949019398133, -0.2657064215985837]\n", "\n", - " Input for ABC Process: 'AB->ABBBBBBB':\n", + " Input for ABC Process: 'AB->ABBBBB':\n", " 2 Incoming particles:\n", - " A: [9.522164300929319, 0.0, 0.0, 9.4695096480173]\n", - " B: [9.522164300929319, 0.0, 0.0, -9.4695096480173]\n", - " 8 Outgoing Particles:\n", - " A: [-2.2614545815907876, 0.09596466269330481, -1.680314037563078, -1.1320390202111377]\n", - " B: [-2.5164555101345942, 2.0544568173259474, 0.7608284478099104, 0.7299969816600982]\n", - " B: [-3.527555187469315, 3.1461533872404055, -0.4998113855480195, 1.1382236350884531]\n", - " B: [-1.5843416170605953, -0.649775322646379, 0.6368565466386346, -0.8260412390634552]\n", - " B: [-1.0715042390215452, 0.33101538188959895, -0.19275377509309963, -0.037364868271978664]\n", - " B: [-1.8269658913133924, -1.2104472444295427, -0.7036857693244948, 0.6143681099517287]\n", - " B: [-1.7510547915269752, 0.35168054121444203, 0.408535633181173, -1.3325210378384098]\n", - " B: [-4.504996783741433, -4.119048223287777, 1.270344339898973, 0.8453774386847008]\n", + " A: [6.176284774018432, 0.0, 0.0, 6.094792335245879]\n", + " B: [6.176284774018432, 0.0, 0.0, -6.094792335245879]\n", + " 6 Outgoing Particles:\n", + " A: [-3.2943110238771185, 1.9799744259594443, 2.3805040294128346, 0.5151572192390796]\n", + " B: [-1.0255775134941767, 0.18009906891836583, -0.12779691496180498, 0.05514988745120904]\n", + " B: [-1.7854209452644407, -0.56381615584479, -0.9572322565407875, 0.9764966468120639]\n", + " B: [-3.3312939695760786, -0.5949754252793171, -2.9420979921841868, -1.0428725518649993]\n", + " B: [-1.6551651824618003, -0.8748451354288965, 0.9749427327758187, -0.1539624566503731]\n", + " B: [-1.260800913363249, -0.12643677832480643, 0.6716804014981268, -0.34996874498697933]\n", "\n", - " Input for ABC Process: 'AB->ABBBBBBB':\n", + " Input for ABC Process: 'AB->ABBBBB':\n", " 2 Incoming particles:\n", - " A: [7.225275339000687, 0.0, 0.0, 7.1557392157883655]\n", - " B: [7.225275339000687, 0.0, 0.0, -7.1557392157883655]\n", - " 8 Outgoing Particles:\n", - " A: [-1.5721586195862234, -0.6346644373772993, 0.7957285133297657, -0.6600756851617959]\n", - " B: [-1.0093393293662618, -0.11321130994303012, 0.07324286826550051, -0.024177745030521003]\n", - " B: [-2.7355755394886443, 0.2329840388558535, -2.4939308642531, -0.4576033371958622]\n", - " B: [-1.618399027736879, -0.47727357006920945, 1.0132042772011558, -0.6040218911217943]\n", - " B: [-1.7201610947708947, 0.01110230391313025, 0.8839000043421623, -1.0851505486038107]\n", - " B: [-1.792300907703241, 0.8101193095744785, -0.625916307414256, 1.0790171565463333]\n", - " B: [-1.5563810656498285, -1.1865287585293671, 0.12019738267353275, -0.004910793671790455]\n", - " B: [-2.4462350936994026, 1.3574724235754438, 0.2335741258552372, 1.7569228442392408]\n", + " A: [4.747497785190141, 0.0, 0.0, 4.640984294348053]\n", + " B: [4.747497785190141, 0.0, 0.0, -4.640984294348053]\n", + " 6 Outgoing Particles:\n", + " A: [-1.3704329562088802, 0.8292801285050307, 0.2251475790952209, 0.3737506167990253]\n", + " B: [-1.352958681672649, 0.11120507604905326, 0.6088733084867489, -0.6688825902852584]\n", + " B: [-1.4224569379606473, -0.25277059018918374, -0.4925475402927904, -0.84669220478242]\n", + " B: [-2.4534584066229996, -0.23638988525842838, -1.4120549440785204, 1.7232756047945383]\n", + " B: [-1.4378719974624208, 0.5461758322111039, 0.8131489669135029, -0.3285674953530594]\n", + " B: [-1.457816590452685, -0.9975005613175758, 0.257432629875838, -0.25288393117282576]\n", "\n", - " Input for ABC Process: 'AB->ABBBBBBB':\n", + " Input for ABC Process: 'AB->ABBBBB':\n", " 2 Incoming particles:\n", - " A: [7.94532861335446, 0.0, 0.0, 7.882147345374172]\n", - " B: [7.94532861335446, 0.0, 0.0, -7.882147345374172]\n", - " 8 Outgoing Particles:\n", - " A: [-2.118671714766621, -0.6322452591326608, -1.2236882164873555, -1.2615953852509143]\n", - " B: [-2.560753710001491, -1.7412395645571277, -1.5891033163317627, 0.01717533495153369]\n", - " B: [-1.5550581087132076, -0.639122838128628, -0.9624327134008909, 0.2888788525193626]\n", - " B: [-2.181477133464949, 0.4918918998013713, 1.8559068969600523, -0.2692479016749415]\n", - " B: [-1.2628370388798702, -0.4013500667990802, 0.24813196852393224, 0.6100049482124643]\n", - " B: [-1.901139724448186, 1.3625293914322611, -0.8176066997802711, 0.2989401174693193]\n", - " B: [-2.2302691928842697, -0.1867565668705846, 1.9609184768063308, 0.3066290670808993]\n", - " B: [-2.0804506035503256, 1.7462930042544484, 0.5278736037099664, 0.009214966692276028]\n", + " A: [6.148648417619223, 0.0, 0.0, 6.066784763240853]\n", + " B: [6.148648417619223, 0.0, 0.0, -6.066784763240853]\n", + " 6 Outgoing Particles:\n", + " A: [-1.5381168736188293, 0.5769721565317305, 1.0069443436143835, 0.13773066601554382]\n", + " B: [-1.3178580311796126, 0.27781510267038506, -0.8083323925420551, 0.07853217328003184]\n", + " B: [-1.5330954954905804, 0.4994081736550063, -1.0290017953406905, 0.20525247761163526]\n", + " B: [-3.083592979398096, -2.1497728433794587, -1.2247634566690573, -1.5449844205264607]\n", + " B: [-3.1391572693216845, 0.49043306139044257, 2.931865230552653, 0.13397777318202247]\n", + " B: [-1.6854761862296446, 0.30514434913189475, -0.876711929615233, 0.989491330437227]\n", "\n", - " Input for ABC Process: 'AB->ABBBBBBB':\n", + " Input for ABC Process: 'AB->ABBBBB':\n", " 2 Incoming particles:\n", - " A: [5.597768901835826, 0.0, 0.0, 5.507723366179557]\n", - " B: [5.597768901835826, 0.0, 0.0, -5.507723366179557]\n", - " 8 Outgoing Particles:\n", - " A: [-1.0009073340208385, 0.03522831505376105, -0.010844681575969111, -0.021374049609080487]\n", - " B: [-1.3943823799403026, -0.886019044587247, 0.21582726795187737, -0.3356948979730148]\n", - " B: [-1.0593061926863385, 0.3261714964515558, -0.10930051701751846, -0.06160488410736567]\n", - " B: [-1.0190344437384602, 0.02512063114228613, 0.04379726771854621, -0.18942531709556668]\n", - " B: [-1.0919277601624486, -0.39612686480944176, 0.07078221355247243, -0.17429750036714983]\n", - " B: [-1.8292258091360047, 1.1565638126055895, 0.329244535677723, 0.9486966026643375]\n", - " B: [-1.7379569022732355, 0.6562121276078657, 0.7749535141539342, -0.9946491284065995]\n", - " B: [-2.0627969817140217, -0.9171504734643696, -1.3144596004610647, 0.8283491748944392]\n", + " A: [7.422637433466136, 0.0, 0.0, 7.35496746890785]\n", + " B: [7.422637433466136, 0.0, 0.0, -7.35496746890785]\n", + " 6 Outgoing Particles:\n", + " A: [-3.3788591199517355, 2.3069724486616927, -0.5016400230094518, 2.2006645271171985]\n", + " B: [-2.193241133599192, -1.652465184572841, -0.691853387986234, -0.7752447184070871]\n", + " B: [-2.295315825041209, 0.334376552772819, 0.5374003175214306, 1.966689593293318]\n", + " B: [-2.3721558149969235, -2.0813404180022568, 0.4923496733367945, 0.22964554029865022]\n", + " B: [-1.5367714331999278, 0.9008878309070798, 0.1482895506792473, -0.7266895920420517]\n", + " B: [-3.068931540143284, 0.1915687702335065, 0.015453869458212284, -2.8950653502600274]\n", "\n", - " Input for ABC Process: 'AB->ABBBBBBB':\n", + " Input for ABC Process: 'AB->ABBBBB':\n", " 2 Incoming particles:\n", - " A: [6.860362769879496, 0.0, 0.0, 6.787089017712134]\n", - " B: [6.860362769879496, 0.0, 0.0, -6.787089017712134]\n", - " 8 Outgoing Particles:\n", - " A: [-2.1483538194490985, 1.8204047500578164, 0.1342978924269131, -0.532461036694855]\n", - " B: [-1.2136825716769264, 0.12932805245115084, -0.43609629710270903, -0.5158678699965871]\n", - " B: [-3.3642987422516573, -1.7653207470663739, 0.533955101409256, 2.630026736893018]\n", - " B: [-1.053677321951765, 0.11000921943972916, 0.04739423847128557, -0.30965732123337875]\n", - " B: [-1.2932387925896982, -0.6843810329952256, 0.045636429012288295, -0.4494513240410521]\n", - " B: [-1.1237194151971648, -0.45140047643622017, 0.19994785657222267, -0.13785422959193222]\n", - " B: [-1.7619597212239484, 1.3299261857304887, 0.561749934748497, 0.1422512233127988]\n", - " B: [-1.7617951554187332, -0.488565951181366, -1.0868851555377534, -0.8269861786480115]\n", + " A: [6.716486802754837, 0.0, 0.0, 6.64162592830851]\n", + " B: [6.716486802754837, 0.0, 0.0, -6.64162592830851]\n", + " 6 Outgoing Particles:\n", + " A: [-1.3263331205917814, -0.5023870926274977, 0.418137178911541, 0.5761319775467438]\n", + " B: [-2.1603199304697136, -1.202627416523187, 1.024176720111292, -1.0824654936733602]\n", + " B: [-1.1665818595303201, 0.5747508534091106, 0.05041215840441908, 0.16743149576984034]\n", + " B: [-1.829760754209137, 0.5127529745920416, -0.17835468593467171, -1.4329334983509001]\n", + " B: [-2.891550940379351, -2.652621236308268, 0.3953841214715819, 0.41029113320086874]\n", + " B: [-4.05842700032937, 3.2701319174577996, -1.7097554929641623, 1.3615443855068068]\n", "\n", - " Input for ABC Process: 'AB->ABBBBBBB':\n", + " Input for ABC Process: 'AB->ABBBBB':\n", " 2 Incoming particles:\n", - " A: [9.57507915889135, 0.0, 0.0, 9.522717096450755]\n", - " B: [9.57507915889135, 0.0, 0.0, -9.522717096450755]\n", - " 8 Outgoing Particles:\n", - " A: [-3.4305207411483516, 2.6682294806816835, -1.883054168339437, -0.3211401453721668]\n", - " B: [-2.185574270107571, 1.4558232366821502, 1.2235951792097912, 0.40016050668089054]\n", - " B: [-3.0259648593433583, -0.9184166853584697, -0.10930222461665634, -2.7020412923806107]\n", - " B: [-3.246659025038245, -2.493839704051011, -1.0189869044243565, 1.5110340975546257]\n", - " B: [-1.4247322676315595, 0.05954103854817788, 0.9940897925990366, -0.19519831815252583]\n", - " B: [-1.4889906300188005, 0.5912092032645169, -0.19371449043911573, -0.9110650198822441]\n", - " B: [-1.1268952499657272, 0.36236812621338876, -0.3636229828302436, 0.07975319340034331]\n", - " B: [-3.220821274529085, -1.7249146959804351, 1.350995798840981, 2.1384969781516885]\n", + " A: [7.700331598721008, 0.0, 0.0, 7.635123229539995]\n", + " B: [7.700331598721008, 0.0, 0.0, -7.635123229539995]\n", + " 6 Outgoing Particles:\n", + " A: [-2.382743739041896, -1.410381415274026, 1.0613871843128353, 1.2496996576655786]\n", + " B: [-3.021630369232257, 0.25595209564405125, -2.8389223073732714, 0.07251720968504605]\n", + " B: [-2.7262381500229256, 1.0736489469437192, 2.293577756890956, 0.13839603484966886]\n", + " B: [-2.222260574660266, 1.5432031708495264, -0.7055857379280247, 1.0291330339668954]\n", + " B: [-1.650055097318715, -1.062833285640475, -0.34598865120359784, 0.6880109623839291]\n", + " B: [-3.397735267165956, -0.3995895125227963, 0.5355317553011019, -3.1777568985511193]\n", "\n", - " Input for ABC Process: 'AB->ABBBBBBB':\n", + " Input for ABC Process: 'AB->ABBBBB':\n", " 2 Incoming particles:\n", - " A: [8.472852690841874, 0.0, 0.0, 8.413633740584764]\n", - " B: [8.472852690841874, 0.0, 0.0, -8.413633740584764]\n", - " 8 Outgoing Particles:\n", - " A: [-1.1530011327357317, 0.34211475449117323, -0.45923141786607913, -0.03841369149190832]\n", - " B: [-2.62915067223017, 1.042431210232047, 0.6288618003426715, -2.1048285595963105]\n", - " B: [-1.1265473249385953, -0.4344882737979479, -0.1553035746380426, 0.2370856700921221]\n", - " B: [-1.4826889242092416, -0.5889894099544346, -0.45026884678673923, -0.8054290077639529]\n", - " B: [-4.118520088756618, -2.101194203160593, -3.0008966741533745, 1.5943054265577095]\n", - " B: [-3.9992129109551517, 1.0607252636964415, 3.6847882851419875, 0.539352496783755]\n", - " B: [-1.3172538577755006, 0.4084669000294691, -0.6351790575407871, 0.4060296568803221]\n", - " B: [-1.1193304700827373, 0.2709337584638445, 0.3872294855003629, 0.17189800853826395]\n", + " A: [4.9341647451125334, 0.0, 0.0, 4.8317679716550375]\n", + " B: [4.9341647451125334, 0.0, 0.0, -4.8317679716550375]\n", + " 6 Outgoing Particles:\n", + " A: [-1.834221818900379, 0.1070495973399568, 1.2695354794210922, 0.860923766155068]\n", + " B: [-1.5116322118250454, 0.39753882899610743, -0.756426277560466, -0.7448584495617266]\n", + " B: [-1.6588475476725886, 0.06712527283179799, 0.6875031760830096, -1.1289857249063835]\n", + " B: [-1.5718164783029667, 0.4294130824657117, -0.6215317131811225, -0.9486357444151968]\n", + " B: [-1.7838526603309615, -0.5732435925039472, -0.9425541080554634, 0.9824020820472578]\n", + " B: [-1.5079587731931232, -0.4278831891296266, 0.36347344329295106, 0.979154070680981]\n", "\n", - " Input for ABC Process: 'AB->ABBBBBBB':\n", + " Input for ABC Process: 'AB->ABBBBB':\n", " 2 Incoming particles:\n", - " A: [5.913538688235051, 0.0, 0.0, 5.828373685450576]\n", - " B: [5.913538688235051, 0.0, 0.0, -5.828373685450576]\n", - " 8 Outgoing Particles:\n", - " A: [-1.6813734506828508, -1.1942921586618185, -0.384476919421686, 0.5028522833318558]\n", - " B: [-1.412586238014363, 0.010275442474480664, 0.8780055986304257, -0.4737092609218783]\n", - " B: [-1.5338446207986793, 1.1234162145644635, 0.1670274754582306, -0.25043392751132176]\n", - " B: [-1.4260274101869397, 0.9023875675844153, -0.4646063309051003, -0.058239245843783906]\n", - " B: [-1.1055189977833793, -0.3699146930280028, 0.2809292901965394, -0.08008812803177658]\n", - " B: [-1.1926016738662872, 0.4242726765633766, 0.34415633034138016, -0.3519202590308968]\n", - " B: [-1.4188061371181722, 0.47356120240959365, 0.33662773751584696, 0.8218469496393668]\n", - " B: [-2.0563188480194308, -1.3697062519065082, -1.1576631818156364, -0.1103084116315648]\n", + " A: [7.099667747066588, 0.0, 0.0, 7.028889109862067]\n", + " B: [7.099667747066588, 0.0, 0.0, -7.028889109862067]\n", + " 6 Outgoing Particles:\n", + " A: [-3.851129225519823, 2.5555470019017212, -2.502060728335724, 1.019837214678957]\n", + " B: [-2.3860288930086897, 0.6059782347076652, 0.6711053982516709, 1.9686395814801452]\n", + " B: [-1.9543999030878276, -1.5857282951514855, 0.5255033921941499, -0.17026726032362857]\n", + " B: [-1.5523812781985644, -1.154244859738803, 0.03484928145183679, -0.2763909626783212]\n", + " B: [-3.2795110937910716, -1.0290377989842119, 1.3607888704851536, -2.616204860580336]\n", + " B: [-1.175885100527199, 0.6074857172651138, -0.09018621404708665, 0.07438628742318319]\n", "\n", - " Input for ABC Process: 'AB->ABBBBBBB':\n", + " Input for ABC Process: 'AB->ABBBBB':\n", " 2 Incoming particles:\n", - " A: [6.062750568659298, 0.0, 0.0, 5.979711068085032]\n", - " B: [6.062750568659298, 0.0, 0.0, -5.979711068085032]\n", - " 8 Outgoing Particles:\n", - " A: [-1.1157392140073992, -0.0424317149721654, 0.4662958482482185, -0.16013033799016252]\n", - " B: [-2.395340693850968, -1.171776361305547, -1.746409249879336, 0.5609384374776449]\n", - " B: [-1.0289722654275464, 0.23139962589771268, 0.07055331234631396, 0.01613586906426155]\n", - " B: [-1.212565238145815, -0.6377842504248107, 0.04163119753237706, 0.24862129848767983]\n", - " B: [-1.8156755638105053, -0.3987185167288875, 1.2510245302740972, 0.7567290942527487]\n", - " B: [-2.003891077687212, 1.2159250459117166, 0.38048599808923245, -1.1799729400359336]\n", - " B: [-1.4663599649673638, 0.593985649692284, -0.7733488095969958, -0.44645740391848543]\n", - " B: [-1.086957119421786, 0.20940052192969777, 0.3097671729860923, 0.20413598266224653]\n", + " A: [6.3653048194550985, 0.0, 0.0, 6.286263233796236]\n", + " B: [6.3653048194550985, 0.0, 0.0, -6.286263233796236]\n", + " 6 Outgoing Particles:\n", + " A: [-3.274142279992413, -2.62046758782023, -1.339558866223036, 1.028950598785383]\n", + " B: [-1.8502190446152251, -1.1967169760014287, 0.8476370040459147, 0.5221977611776395]\n", + " B: [-1.3090919645484567, 0.8304076910302604, -0.132118345313184, 0.08178985973111547]\n", + " B: [-1.7699077332157842, 0.8156249668276708, -0.2891156025546255, 1.1763254081859622]\n", + " B: [-1.6671330761442815, 1.2573648831500233, 0.2190135291489001, -0.3878135096217862]\n", + " B: [-2.8601155403940384, 0.913787022813704, 0.6941422808960306, -2.421450118258315]\n", "\n", - " Input for ABC Process: 'AB->ABBBBBBB':\n", + " Input for ABC Process: 'AB->ABBBBB':\n", " 2 Incoming particles:\n", - " A: [7.088363151833832, 0.0, 0.0, 7.017470496715726]\n", - " B: [7.088363151833832, 0.0, 0.0, -7.017470496715726]\n", - " 8 Outgoing Particles:\n", - " A: [-3.1474601133746627, 0.14412280671945385, 2.7364508363525357, 1.1821889028802701]\n", - " B: [-1.256451004773104, 0.1153142495225348, -0.7455659837621855, -0.09748392231091944]\n", - " B: [-1.4964417911663928, -0.0996845872039782, -0.8492275192498467, 0.7128910421459969]\n", - " B: [-3.2499484244824526, -0.8927423628721523, -1.0242747556675866, -2.777775559729678]\n", - " B: [-1.0489067674373789, -0.31603136975662793, 0.016268502528308637, -0.008057042333727152]\n", - " B: [-1.6957667777105587, 1.0857339287179024, 0.6252297389508089, 0.5530773670555896]\n", - " B: [-1.243679438145053, 0.06348629097723194, -0.7145975145476898, 0.17904867473682565]\n", - " B: [-1.0380719865780628, -0.10019895610436466, -0.044283304604344965, 0.2561105375556422]\n", + " A: [5.2620105860572215, 0.0, 0.0, 5.166116085395126]\n", + " B: [5.2620105860572215, 0.0, 0.0, -5.166116085395126]\n", + " 6 Outgoing Particles:\n", + " A: [-1.9479176369516882, 0.8861257045164052, 1.1018829783040076, 0.8916379636750793]\n", + " B: [-1.2433791528628988, 0.41365857789168176, 0.544699730060495, -0.27960776595565956]\n", + " B: [-1.074755543453127, 0.3002469943380598, 0.01041159782849033, 0.25464253219924826]\n", + " B: [-1.7453891507499704, 1.1576089006622574, 0.03134512003430503, -0.8398466551182168]\n", + " B: [-1.5208938996272057, 0.008686514238768405, -1.1440782944999142, -0.06424682441800389]\n", + " B: [-2.991685788469555, -2.7663266916471727, -0.544261131727384, 0.03742074961755215]\n", "\n", - " Input for ABC Process: 'AB->ABBBBBBB':\n", + " Input for ABC Process: 'AB->ABBBBB':\n", " 2 Incoming particles:\n", - " A: [9.842517855137334, 0.0, 0.0, 9.791586068084028]\n", - " B: [9.842517855137334, 0.0, 0.0, -9.791586068084028]\n", - " 8 Outgoing Particles:\n", - " A: [-1.0081083393933719, 0.09315850477843095, -0.05390640772287413, 0.06854207575149836]\n", - " B: [-1.2533776879399583, -0.09567218890986252, -0.022562148977002077, -0.749195175056841]\n", - " B: [-4.199102452438099, 3.1204551726062775, 2.23725963921713, 1.3747327844190023]\n", - " B: [-5.1018332572388285, -4.999892707918183, 0.09407944148737099, -0.14465321518774693]\n", - " B: [-3.7582268429742243, 2.1814891293707577, -1.5410280493623207, -2.4475715991095703]\n", - " B: [-1.1792132348986593, 0.6125282131702711, -0.12369433042852651, -0.007263198361168502]\n", - " B: [-1.3600169327450258, -0.07835376476887727, -0.6694537001487819, 0.6287594836317273]\n", - " B: [-1.8251569626465018, -0.8337123583288142, 0.07930555593500455, 1.2766488439130985]\n", + " A: [4.439668869119513, 0.0, 0.0, 4.325582003318043]\n", + " B: [4.439668869119513, 0.0, 0.0, -4.325582003318043]\n", + " 6 Outgoing Particles:\n", + " A: [-1.1969832203303146, 0.48265768801558717, -0.02482335564392214, 0.4463117598342591]\n", + " B: [-1.7251727113760817, -1.0744400415092346, 0.6322269398265393, 0.6496834443295479]\n", + " B: [-1.419669052608684, -0.4173084301546306, -0.44626125418717505, -0.8013518491074973]\n", + " B: [-1.331289111993432, -0.7645577006899625, -0.3423664341778722, 0.2656453402118452]\n", + " B: [-1.5156451020746182, 0.6491857388484042, 0.8955487542892042, -0.2715333876518423]\n", + " B: [-1.6905785398558963, 1.1244627454898357, -0.7143246501067739, -0.2887553076163127]\n", "\n", " ⋮\n", - " Input for ABC Process: 'AB->ABBBBBBB':\n", + " Input for ABC Process: 'AB->ABBBBB':\n", " 2 Incoming particles:\n", - " A: [9.861596443743153, 0.0, 0.0, 9.810763702141012]\n", - " B: [9.861596443743153, 0.0, 0.0, -9.810763702141012]\n", - " 8 Outgoing Particles:\n", - " A: [-1.8179384769334697, 0.9572508915748105, -0.9794338269553214, 0.6551949443563104]\n", - " B: [-2.1028582035167607, -0.7676665378472812, 0.6218562087985972, -1.5639678917247444]\n", - " B: [-3.1263866679666865, 2.3808322573838474, -1.6099851834448586, 0.7168535896041835]\n", - " B: [-5.177179415841987, -1.3605325795287053, 4.805481256903438, -0.9270855911989424]\n", - " B: [-1.2605754590213083, -0.023284320526100116, -0.14250915308265208, 0.7537900699744495]\n", - " B: [-2.712925004518324, -1.4343063146086636, -1.452340398698398, 1.4810249296764189]\n", - " B: [-2.3798188172675734, 0.6412170781802653, -1.487389994435021, -1.4283029321979925]\n", - " B: [-1.1455108424201939, -0.39351047462817185, 0.24432109091421514, 0.3124928815103169]\n", + " A: [5.750717080737416, 0.0, 0.0, 5.663104002460582]\n", + " B: [5.750717080737416, 0.0, 0.0, -5.663104002460582]\n", + " 6 Outgoing Particles:\n", + " A: [-1.0362067302993534, 0.23737037129807034, 0.1316212944823847, 0.007451817649030921]\n", + " B: [-3.597917991072113, -1.5787159301449987, 0.28387609057144564, 3.0613860010767477]\n", + " B: [-1.0798303035395174, -0.06880694215947386, -0.2669312876106363, -0.3000779512850572]\n", + " B: [-1.3394551212059678, -0.7053379424304421, 0.44160810884651497, -0.3187799976376953]\n", + " B: [-3.270241523195321, 1.927780354010675, 0.003047457202140131, -2.4450221348130854]\n", + " B: [-1.1777824921625586, 0.1877100894261692, -0.5932216634918489, -0.004957734989940532]\n", "\n", - " Input for ABC Process: 'AB->ABBBBBBB':\n", + " Input for ABC Process: 'AB->ABBBBB':\n", " 2 Incoming particles:\n", - " A: [5.611571819338176, 0.0, 0.0, 5.521751378284825]\n", - " B: [5.611571819338176, 0.0, 0.0, -5.521751378284825]\n", - " 8 Outgoing Particles:\n", - " A: [-1.0759150984150232, -0.3903007964405737, 0.045679777762273936, -0.05632002484775736]\n", - " B: [-1.021003529021616, -0.07269336486556076, 0.11388411952175649, 0.15554513267817288]\n", - " B: [-1.6939705353811365, -0.1440535362616654, -0.25084793375093056, -1.3363607550219565]\n", - " B: [-1.185801144621379, -0.31618880274591826, 0.5459120200606805, -0.09016131075324207]\n", - " B: [-1.197431131926246, 0.16472462054297168, -0.17198607315407527, -0.6141074056988615]\n", - " B: [-1.0089442324730478, -0.12314856400749492, -0.027052115631495212, -0.04550910308256443]\n", - " B: [-2.703474424566498, 0.16902217864171518, -0.14049660772763695, 2.502092358533033]\n", - " B: [-1.3366035422714058, 0.7126382651365266, -0.11509318708057305, -0.5151788918068239]\n", + " A: [6.84577391627276, 0.0, 0.0, 6.772342320993563]\n", + " B: [6.84577391627276, 0.0, 0.0, -6.772342320993563]\n", + " 6 Outgoing Particles:\n", + " A: [-1.0594956991232163, -0.09579189209396338, 0.21296650876679918, 0.2607687021353065]\n", + " B: [-1.8300488673592041, 0.8497425690197566, -0.8227483588311224, 0.9747315329664396]\n", + " B: [-2.860723394379955, 0.6743651794772785, 0.1320397309862766, 2.5906631300310776]\n", + " B: [-2.557528905485892, -1.3508678766931497, 1.2829278224554168, -1.4388211440218013]\n", + " B: [-3.790115184858299, 0.47588521284738383, -1.0334447791446917, -3.474262262286086]\n", + " B: [-1.5936357813389537, -0.553333192557306, 0.2282590757673212, 1.086920041175065]\n", "\n", - " Input for ABC Process: 'AB->ABBBBBBB':\n", + " Input for ABC Process: 'AB->ABBBBB':\n", " 2 Incoming particles:\n", - " A: [8.775111706253933, 0.0, 0.0, 8.717946171962454]\n", - " B: [8.775111706253933, 0.0, 0.0, -8.717946171962454]\n", - " 8 Outgoing Particles:\n", - " A: [-2.2750151423103953, 1.8467170131598, 0.8729070809034145, 0.05799482008261441]\n", - " B: [-1.5756212156561644, 1.0377655822554295, 0.3001332912880399, 0.5617337616455574]\n", - " B: [-1.6945981163898138, -0.5153714693329569, 0.050834292767083435, 1.2662823142365867]\n", - " B: [-2.630307241578496, -0.5126707368632603, 1.3344949978186418, -1.9684532002212756]\n", - " B: [-3.0848917600353407, -2.827901193400985, -0.46541663267058264, -0.5503811129833626]\n", - " B: [-2.812675339815945, 2.346626876124383, -1.1757879806725677, 0.14834923648401968]\n", - " B: [-1.695817659938434, -0.3817827622891304, -0.19598317768122073, 1.3006267920675472]\n", - " B: [-1.7812969367832734, -0.9933833096532803, -0.7211818717528079, -0.8161526113116866]\n", + " A: [6.25909007687458, 0.0, 0.0, 6.178689876537731]\n", + " B: [6.25909007687458, 0.0, 0.0, -6.178689876537731]\n", + " 6 Outgoing Particles:\n", + " A: [-2.15208406752572, -0.27987613820502405, 0.20983197963180572, -1.873260718983155]\n", + " B: [-3.1436326945514232, -2.0821664144960677, -1.9679549582157083, 0.8210741885063981]\n", + " B: [-2.206056617746511, 1.7689323832663284, -0.4273996865759156, -0.7449117612507478]\n", + " B: [-1.8709609004510535, 0.5332842722412897, 1.48760475220818, -0.055988188078690854]\n", + " B: [-1.0916331546903268, 0.018218872767661307, 0.4300802089857822, 0.07976234031782706]\n", + " B: [-2.0538127187841235, 0.04160702442581186, 0.2678377039658561, 1.7733241394883685]\n", "\n", - " Input for ABC Process: 'AB->ABBBBBBB':\n", + " Input for ABC Process: 'AB->ABBBBB':\n", " 2 Incoming particles:\n", - " A: [6.832501783927461, 0.0, 0.0, 6.758925996589395]\n", - " B: [6.832501783927461, 0.0, 0.0, -6.758925996589395]\n", - " 8 Outgoing Particles:\n", - " A: [-1.0114752465345387, -0.11558780230223581, -0.03776248532804595, -0.09108034372406744]\n", - " B: [-1.031154612454516, -0.04425244057817861, -0.0789748074180023, -0.23470095032271823]\n", - " B: [-2.2555952063288855, 1.7491237654517413, -0.4233804231771479, -0.9214254203222908]\n", - " B: [-2.089561973736715, 0.9235335217807571, 1.3477207222453012, -0.8348676128969853]\n", - " B: [-1.3199981586264844, -0.6902187266500668, -0.06216816149242132, -0.5119847340063199]\n", - " B: [-1.0105028642371863, -0.09317036739551621, -0.041275823376393385, -0.1035935696630954]\n", - " B: [-1.2426376312622325, -0.48126859609618416, 0.05225488689293943, -0.5565952280036419]\n", - " B: [-3.704077874674367, -1.2481593542103167, -0.7564139083462295, 3.254247858939119]\n", + " A: [6.8752382625158255, 0.0, 0.0, 6.802124753807565]\n", + " B: [6.8752382625158255, 0.0, 0.0, -6.802124753807565]\n", + " 6 Outgoing Particles:\n", + " A: [-3.815955448364548, 1.7284392485789066, 3.22998101457395, -0.37581430702794955]\n", + " B: [-3.705003390432734, 0.8773209536576554, -3.1633610279519866, -1.3966048382509024]\n", + " B: [-1.4798429985544235, -0.876885056483666, -0.05155962504198175, 0.6467994303891397]\n", + " B: [-1.196598159149068, -0.6492448407423084, 0.0066213036625077295, -0.10141227532326653]\n", + " B: [-1.307725757451199, -0.47623875265044, -0.08939192779758245, -0.6894580410872709]\n", + " B: [-2.2453507710796776, -0.6033915523601473, 0.06771026255509205, 1.91649003130025]\n", "\n", - " Input for ABC Process: 'AB->ABBBBBBB':\n", + " Input for ABC Process: 'AB->ABBBBB':\n", " 2 Incoming particles:\n", - " A: [8.775903429741401, 0.0, 0.0, 8.718743086485969]\n", - " B: [8.775903429741401, 0.0, 0.0, -8.718743086485969]\n", - " 8 Outgoing Particles:\n", - " A: [-1.7137666526922533, 1.1358800766324049, 0.08268488211087159, 0.7999598750311686]\n", - " B: [-1.1669696745288112, -0.04351472671445914, 0.5992401461010018, 0.028912577361687116]\n", - " B: [-3.5481649603318184, 0.4490928742123019, 1.0371640968528058, -3.21124287656006]\n", - " B: [-1.276578701414564, -0.08287623449031867, -0.6317118623642547, -0.47299559576203803]\n", - " B: [-4.955351547203613, -2.6459981607514886, 0.5026315754882429, 4.037519558961317]\n", - " B: [-2.3130557250521284, 1.4242375193555785, -1.5228161303749386, 0.05296516521446809]\n", - " B: [-1.4353464814836179, 0.25997106791735547, -0.029309860840599063, -0.9958792586507745]\n", - " B: [-1.1425731167759967, -0.4967924161613736, -0.03788284697312998, -0.23923944559576807]\n", + " A: [6.591382068439754, 0.0, 0.0, 6.515083849970707]\n", + " B: [6.591382068439754, 0.0, 0.0, -6.515083849970707]\n", + " 6 Outgoing Particles:\n", + " A: [-2.166341377746586, 0.738656605699622, 1.1097711420427974, -1.3841348908550482]\n", + " B: [-1.9136122405957643, -1.3687809690739081, -0.8052302154690981, 0.37410528752561706]\n", + " B: [-1.020282522629639, 0.01566959851558055, -0.04103060943002397, -0.1976040959992001]\n", + " B: [-3.3680104240574718, -0.44221430614525714, -3.1855463435158966, -0.015336796039828009]\n", + " B: [-1.1380460439601876, 0.33787512483866744, -0.3053034033656307, 0.2962752606648943]\n", + " B: [-3.576471527889859, 0.7187939461652956, 3.227339429737853, 0.9266952347035636]\n", "\n", - " Input for ABC Process: 'AB->ABBBBBBB':\n", + " Input for ABC Process: 'AB->ABBBBB':\n", " 2 Incoming particles:\n", - " A: [8.907102929629284, 0.0, 0.0, 8.850789942090511]\n", - " B: [8.907102929629284, 0.0, 0.0, -8.850789942090511]\n", - " 8 Outgoing Particles:\n", - " A: [-2.946046511363992, -0.9439001466724447, 2.1873638734369836, 1.4155146927582347]\n", - " B: [-3.7848309582649415, -2.22832689875391, -0.18756115269295068, -2.885190709282662]\n", - " B: [-1.0159875652570234, 0.04172671107403079, -0.15271016054388648, 0.08467125371989566]\n", - " B: [-2.0867601165869685, -1.8155383548303043, -0.021995043965926685, -0.24063350631004576]\n", - " B: [-4.34790862339958, 3.6266859724946396, -1.8990793068549607, 1.0700261868843775]\n", - " B: [-1.1578951917200673, 0.35622580432348594, 0.23734793715600985, 0.3968506117802061]\n", - " B: [-1.4421363377447174, 1.0156020669389267, -0.20020339434090184, -0.0907097523285523]\n", - " B: [-1.0326405549212787, -0.052475154574424254, 0.03683724780563263, 0.24947122277854633]\n", + " A: [7.366791305680796, 0.0, 0.0, 7.298603574756898]\n", + " B: [7.366791305680796, 0.0, 0.0, -7.298603574756898]\n", + " 6 Outgoing Particles:\n", + " A: [-1.1161936134323496, 0.1815174250263101, -0.30155987378038246, 0.34928677273057857]\n", + " B: [-1.1768168637671912, -0.488638136596838, -0.0387546058981897, 0.38030091090042567]\n", + " B: [-3.8756829146246745, -0.22123631639903027, -3.6727532274395425, -0.694878606198396]\n", + " B: [-1.4161987387916468, -0.42653096897021076, -0.26480462532703347, -0.8680833546784509]\n", + " B: [-3.4638938410201177, 2.8217659294852746, 1.2824429941168167, 1.179634497585545]\n", + " B: [-3.6847966397256138, -1.8668779325455054, 2.995429338328331, -0.346260220339702]\n", "\n", - " Input for ABC Process: 'AB->ABBBBBBB':\n", + " Input for ABC Process: 'AB->ABBBBB':\n", " 2 Incoming particles:\n", - " A: [6.294285658794556, 0.0, 0.0, 6.214340830249562]\n", - " B: [6.294285658794556, 0.0, 0.0, -6.214340830249562]\n", - " 8 Outgoing Particles:\n", - " A: [-1.06844272609547, -0.2848922847204133, 0.15179083391454987, -0.19330232226393051]\n", - " B: [-2.114647837734541, -1.6956804594706658, -0.38950327120442063, 0.6668511518515798]\n", - " B: [-1.494217345848325, 0.7529614584695401, -0.5432224448027106, -0.6088053006963738]\n", - " B: [-1.3783311635115514, 0.9215501628423943, 0.0395584401371469, -0.2213079833313275]\n", - " B: [-1.7816982863175768, 0.5393674002906785, 0.38766524831377364, 1.316528482874748]\n", - " B: [-1.659172767477475, 0.17135237894801714, -1.2297516401309854, -0.45956886117628726]\n", - " B: [-1.55277617510909, -0.23319042207457166, 1.041131562383322, 0.522284545863997]\n", - " B: [-1.5392850154950812, -0.17146823428497893, 0.5423312713893238, -1.022679713122405]\n", + " A: [4.762032860651893, 0.0, 0.0, 4.655851905497903]\n", + " B: [4.762032860651893, 0.0, 0.0, -4.655851905497903]\n", + " 6 Outgoing Particles:\n", + " A: [-2.656166654414924, 2.017338594394486, -1.384735065574992, 0.2609120345236529]\n", + " B: [-1.031990140619295, -0.035004877965791346, -0.20112979442869375, 0.15272561883031827]\n", + " B: [-1.7319386082994335, -1.0359644740176492, 0.8025718625008718, -0.5312883934487891]\n", + " B: [-1.7450617894727098, -0.49163856285061436, 1.1666756465784553, 0.6651316473275205]\n", + " B: [-1.0945973465763637, -0.42438631366397905, -0.017047995524507212, 0.1332252744613839]\n", + " B: [-1.2643111819210613, -0.030344365896452122, -0.3663346535511349, -0.6807061816940867]\n", "\n", - " Input for ABC Process: 'AB->ABBBBBBB':\n", + " Input for ABC Process: 'AB->ABBBBB':\n", " 2 Incoming particles:\n", - " A: [6.965556009635571, 0.0, 0.0, 6.8934005050751415]\n", - " B: [6.965556009635571, 0.0, 0.0, -6.8934005050751415]\n", - " 8 Outgoing Particles:\n", - " A: [-1.0775179795487104, -0.05690318568456522, -0.2919638065794134, 0.269377354945329]\n", - " B: [-3.216279237662679, -2.600571207682032, 0.23217633942174215, 1.5898351096286563]\n", - " B: [-1.9852997763312183, 1.2696870590322706, -0.6412445999499571, -0.9581833525279955]\n", - " B: [-1.9885313318262752, 0.8019078287339996, 1.2060162608136897, 0.9255946577864792]\n", - " B: [-1.4288503016026572, 0.2805632486843285, 0.07929023042776773, -0.9780646743628009]\n", - " B: [-1.3652585458391595, -0.12810083240879516, 0.7809145290728301, -0.4875382774777694]\n", - " B: [-1.8158888731893035, 0.7439741257624499, -1.2924797037897653, -0.2710186621991885]\n", - " B: [-1.0534859732711408, -0.3105570364376559, -0.07270924941689365, -0.0900021557927108]\n", + " A: [6.12211537837656, 0.0, 0.0, 6.039892110473065]\n", + " B: [6.12211537837656, 0.0, 0.0, -6.039892110473065]\n", + " 6 Outgoing Particles:\n", + " A: [-2.09449973649211, -1.247911941781509, -0.776547530016726, 1.1075282684200622]\n", + " B: [-2.857971140758051, 1.4507115887866229, 2.2078617054725442, 0.43449006556414854]\n", + " B: [-2.068918524386865, -0.43350532192333185, 1.7407499017717505, -0.24957318745593]\n", + " B: [-1.0503370840395667, 0.28162676024293815, -0.11219953076948735, 0.10632790470480236]\n", + " B: [-1.6648953051752136, 0.3171875953909028, -1.2925202016854087, 0.025689195388605857]\n", + " B: [-2.5076089659013125, -0.36810868071562286, -1.7673443447726724, -1.4244622466216894]\n", "\n", - " Input for ABC Process: 'AB->ABBBBBBB':\n", + " Input for ABC Process: 'AB->ABBBBB':\n", " 2 Incoming particles:\n", - " A: [6.43062328219917, 0.0, 0.0, 6.352394493225528]\n", - " B: [6.43062328219917, 0.0, 0.0, -6.352394493225528]\n", - " 8 Outgoing Particles:\n", - " A: [-2.125364788369443, -1.214725294501684, 0.4075454777366224, 1.369497946736289]\n", - " B: [-1.1032249572940587, -0.2977536437640783, 0.35819035202044425, 0.012155070594697458]\n", - " B: [-2.225917349319406, 1.3039585629995813, -0.8668848261688078, 1.2259326287114942]\n", - " B: [-2.717025897056506, -0.9721840017189309, 0.6274004665152297, -2.2457641565164295]\n", - " B: [-1.000557419196324, 0.013685057618434337, 0.015873673340379625, 0.025997976872664537]\n", - " B: [-1.1652637249339481, 0.20750251779397902, -0.05219673300317853, -0.5586212982154317]\n", - " B: [-1.4667402310584912, 0.9160649085291783, -0.533306342231441, -0.16654228923208916]\n", - " B: [-1.057152197170161, 0.043451893043520345, 0.0433779317907512, 0.3373441210488047]\n", + " A: [7.431058837653249, 0.0, 0.0, 7.363466265874004]\n", + " B: [7.431058837653249, 0.0, 0.0, -7.363466265874004]\n", + " 6 Outgoing Particles:\n", + " A: [-1.4340725727125623, 0.9525417282027518, 0.38239995291064965, -0.05476016666222433]\n", + " B: [-3.5734117962040854, 2.3267511116139916, 2.49915109639257, -0.33127771922267657]\n", + " B: [-2.3529075757582945, 1.185265706342765, -1.375530715171772, 1.1132091075119688]\n", + " B: [-2.710381815585542, -2.1195780947035594, -1.2974231675570782, -0.4126153305389483]\n", + " B: [-2.374272199256637, -1.2400410368129877, 1.6839473809113144, -0.5136028830766439]\n", + " B: [-2.4170717157893766, -1.104939414642962, -1.8925445474856835, 0.1990469919885247]\n", "\n", - " Input for ABC Process: 'AB->ABBBBBBB':\n", + " Input for ABC Process: 'AB->ABBBBB':\n", " 2 Incoming particles:\n", - " A: [8.156196486154876, 0.0, 0.0, 8.094661272762755]\n", - " B: [8.156196486154876, 0.0, 0.0, -8.094661272762755]\n", - " 8 Outgoing Particles:\n", - " A: [-1.4617318374080812, 0.10404421660552193, -0.19476289320497314, -1.0430254938944576]\n", - " B: [-2.745518719911882, 2.0283487429720055, -0.01415841484271091, -1.556751090431481]\n", - " B: [-1.193795120882441, -0.223211890483827, 0.20666745479885903, 0.5767250694363129]\n", - " B: [-1.0771186742980503, 0.29121400254582763, -0.18584437613704033, 0.20209134345899718]\n", - " B: [-2.9756813564276348, 0.7747616688600099, 0.31071107817153876, 2.6754219325851647]\n", - " B: [-1.8605025819101852, -0.3441559100391822, 0.5570133470539003, 1.4257498722017754]\n", - " B: [-3.3546424693401353, -1.4228183303706836, -0.7768040014609222, -2.7614832317390525]\n", - " B: [-1.6434022121313414, -1.2081825000896715, 0.0971778056213486, 0.48127159838273986]\n", + " A: [4.370360958267613, 0.0, 0.0, 4.254415930013168]\n", + " B: [4.370360958267613, 0.0, 0.0, -4.254415930013168]\n", + " 6 Outgoing Particles:\n", + " A: [-1.0037967551530176, -0.04979456910726583, -0.007092097585518878, 0.07126098999442977]\n", + " B: [-2.2427356029926337, 0.4432886498747459, -1.2315068062419472, -1.522087101319342]\n", + " B: [-1.576810353663218, -0.08400160217698217, 1.025238316808337, 0.6543401378482231]\n", + " B: [-1.1878570602356244, 0.3852696171578499, -0.47734716319323317, 0.18630996601909597]\n", + " B: [-1.6436772930583505, -1.0018521094453126, 0.4216069097815019, 0.7212593210074284]\n", + " B: [-1.0858448514323804, 0.3070900136969648, 0.26910084043086047, -0.11108331354983517]\n", "\n", - " Input for ABC Process: 'AB->ABBBBBBB':\n", + " Input for ABC Process: 'AB->ABBBBB':\n", " 2 Incoming particles:\n", - " A: [9.631814348202784, 0.0, 0.0, 9.579762399884718]\n", - " B: [9.631814348202784, 0.0, 0.0, -9.579762399884718]\n", - " 8 Outgoing Particles:\n", - " A: [-2.4271747113709625, -0.9216752449526319, 0.35006248470601437, 1.9796838331313595]\n", - " B: [-1.926574191117535, -0.6155920425308834, -0.36855158619622796, 1.4821957628346814]\n", - " B: [-2.809711053334662, 0.053095841327541846, -2.415282611989454, -1.0286238083410733]\n", - " B: [-2.069340346061984, 0.0706218659128716, 1.6880494984307581, 0.6539655271821153]\n", - " B: [-1.600891859223819, 0.522182956459051, 1.0136801062226364, -0.5124766796267364]\n", - " B: [-2.3653602811566903, 0.7359929823506941, 2.003935313635875, 0.19361520696286152]\n", - " B: [-4.134587420071929, 0.11270979705086029, -1.0448676862999513, -3.871738776569513]\n", - " B: [-1.9299888340679847, 0.04266384438249662, -1.2270255185096508, 1.1033789344263045]\n", + " A: [5.940760429560125, 0.0, 0.0, 5.855991332082674]\n", + " B: [5.940760429560125, 0.0, 0.0, -5.855991332082674]\n", + " 6 Outgoing Particles:\n", + " A: [-2.5515863925730233, 0.0574036477190863, 1.9321385747234918, 1.3319678930281418]\n", + " B: [-3.2707523737124977, -2.710802011299676, -1.41016923110446, -0.6006632045712658]\n", + " B: [-1.6965910302662786, 0.9846458960035911, 0.9504416414719069, -0.07452697242920955]\n", + " B: [-1.0283520810617242, 0.1620200166783027, 0.15874691422324994, -0.07782630689000514]\n", + " B: [-1.277724475991329, 0.26836143674120055, -0.33222621981983513, -0.6709602929248032]\n", + " B: [-2.0565145055153993, 1.2383710141574962, -1.298931679494354, 0.09200888378714224]\n", "\n", - " Input for ABC Process: 'AB->ABBBBBBB':\n", + " Input for ABC Process: 'AB->ABBBBB':\n", " 2 Incoming particles:\n", - " A: [7.383091586636561, 0.0, 0.0, 7.31505580133628]\n", - " B: [7.383091586636561, 0.0, 0.0, -7.31505580133628]\n", - " 8 Outgoing Particles:\n", - " A: [-1.0026822379766207, 0.02425303574920085, -0.0683120173174935, 0.010813366763733786]\n", - " B: [-3.2851307251831745, -2.830568076855887, -0.9156122597784988, 0.9703723169846757]\n", - " B: [-2.028220232462834, 1.6810294384373135, 0.4923274291375999, -0.21314558638988076]\n", - " B: [-1.5191535227395792, -0.17123543395193966, -1.1293131485074372, -0.05619309939470401]\n", - " B: [-1.1059696544762567, 0.2375361941082015, -0.40208228112542477, -0.07124094550113935]\n", - " B: [-1.371740281577803, -0.2278482692103191, -0.6986437390927988, -0.5845113276468179]\n", - " B: [-1.2867512190171768, 0.6015837296464805, -0.16735271525316733, -0.5155761675681034]\n", - " B: [-3.166535299839676, 0.6852493820769491, 2.888988731937221, 0.4594814427522358]\n" + " A: [6.732994664701373, 0.0, 0.0, 6.65831939417877]\n", + " B: [6.732994664701373, 0.0, 0.0, -6.65831939417877]\n", + " 6 Outgoing Particles:\n", + " A: [-1.602557260532173, -0.06659157948757613, 0.9308846463293637, -0.8349904850080558]\n", + " B: [-1.3205375883536927, 0.7078592481114431, -0.05631226213188625, -0.48947291677035515]\n", + " B: [-1.7625153098951976, 0.12706601232750347, 0.34097061443470383, 1.405010137407617]\n", + " B: [-2.7792473938949334, 1.6510422215054068, 1.7155538904747691, -1.0272051928194055]\n", + " B: [-2.722083339444658, -0.5204063912580275, -2.061236049180356, -1.3748530264647703]\n", + " B: [-3.279048437282091, -1.89896951119875, -0.8698608399265956, 2.3215114836549695]\n" ] }, - "execution_count": 7, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } @@ -490,14 +460,14 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 14, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "Internal error: stack overflow in type inference of materialize(Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, typeof(MetagraphOptimization.compute__8fd7c454_6214_11ee_3616_0f2435e477fe), Tuple{Array{MetagraphOptimization.ABCProcessInput, 1}}}).\n", + "Internal error: stack overflow in type inference of materialize(Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, typeof(MetagraphOptimization.compute__bad8f2ac_7bfc_11ee_176b_b72dc8919aad), Tuple{Array{MetagraphOptimization.ABCProcessInput, 1}}}).\n", "This might be caused by recursion over very long tuples or argument lists.\n" ] }, @@ -509,147 +479,136 @@ "StackOverflowError:", "", "Stacktrace:", - " [1] get", - " @ ./iddict.jl:102 [inlined]", - " [2] in", - " @ ./iddict.jl:189 [inlined]", - " [3] haskey", - " @ ./abstractdict.jl:17 [inlined]", - " [4] findall(sig::Type, table::Core.Compiler.CachedMethodTable{Core.Compiler.InternalMethodTable}; limit::Int64)", - " @ Core.Compiler ./compiler/methodtable.jl:120", - " [5] findall", - " @ ./compiler/methodtable.jl:114 [inlined]", - " [6] find_matching_methods(argtypes::Vector{Any}, atype::Any, method_table::Core.Compiler.CachedMethodTable{Core.Compiler.InternalMethodTable}, union_split::Int64, max_methods::Int64)", - " @ Core.Compiler ./compiler/abstractinterpretation.jl:336", - " [7] abstract_call_gf_by_type(interp::Core.Compiler.NativeInterpreter, f::Any, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, atype::Any, sv::Core.Compiler.InferenceState, max_methods::Int64)", - " @ Core.Compiler ./compiler/abstractinterpretation.jl:80", - " [8] abstract_call_known(interp::Core.Compiler.NativeInterpreter, f::Any, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState, max_methods::Int64)", - " @ Core.Compiler ./compiler/abstractinterpretation.jl:1949", - " [9] abstract_call(interp::Core.Compiler.NativeInterpreter, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState, max_methods::Int64)", + " [1] argtypes_to_type", + " @ ./compiler/typeutils.jl:71 [inlined]", + " [2] abstract_call_known(interp::Core.Compiler.NativeInterpreter, f::Any, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState, max_methods::Int64)", + " @ Core.Compiler ./compiler/abstractinterpretation.jl:1948", + " [3] abstract_call(interp::Core.Compiler.NativeInterpreter, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState, max_methods::Int64)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:2020", - " [10] abstract_apply(interp::Core.Compiler.NativeInterpreter, argtypes::Vector{Any}, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState, max_methods::Int64)", + " [4] abstract_apply(interp::Core.Compiler.NativeInterpreter, argtypes::Vector{Any}, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState, max_methods::Int64)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:1566", - " [11] abstract_call_known(interp::Core.Compiler.NativeInterpreter, f::Any, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState, max_methods::Int64)", + " [5] abstract_call_known(interp::Core.Compiler.NativeInterpreter, f::Any, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState, max_methods::Int64)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:1855", - " [12] abstract_call(interp::Core.Compiler.NativeInterpreter, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState, max_methods::Nothing)", + " [6] abstract_call(interp::Core.Compiler.NativeInterpreter, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState, max_methods::Nothing)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:2020", - " [13] abstract_call(interp::Core.Compiler.NativeInterpreter, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState)", + " [7] abstract_call(interp::Core.Compiler.NativeInterpreter, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:1999", - " [14] abstract_eval_statement_expr(interp::Core.Compiler.NativeInterpreter, e::Expr, vtypes::Vector{Core.Compiler.VarState}, sv::Core.Compiler.InferenceState, mi::Nothing)", + " [8] abstract_eval_statement_expr(interp::Core.Compiler.NativeInterpreter, e::Expr, vtypes::Vector{Core.Compiler.VarState}, sv::Core.Compiler.InferenceState, mi::Nothing)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:2183", - " [15] abstract_eval_statement(interp::Core.Compiler.NativeInterpreter, e::Any, vtypes::Vector{Core.Compiler.VarState}, sv::Core.Compiler.InferenceState)", + " [9] abstract_eval_statement(interp::Core.Compiler.NativeInterpreter, e::Any, vtypes::Vector{Core.Compiler.VarState}, sv::Core.Compiler.InferenceState)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:2396", - " [16] abstract_eval_basic_statement(interp::Core.Compiler.NativeInterpreter, stmt::Any, pc_vartable::Vector{Core.Compiler.VarState}, frame::Core.Compiler.InferenceState)", + " [10] abstract_eval_basic_statement(interp::Core.Compiler.NativeInterpreter, stmt::Any, pc_vartable::Vector{Core.Compiler.VarState}, frame::Core.Compiler.InferenceState)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:2682", - " [17] typeinf_local(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)", + " [11] typeinf_local(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:2867", - " [18] typeinf_nocycle(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)", + " [12] typeinf_nocycle(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:2955", - " [19] _typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)", + " [13] _typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)", " @ Core.Compiler ./compiler/typeinfer.jl:246", - " [20] typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)", + " [14] typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)", " @ Core.Compiler ./compiler/typeinfer.jl:216", - " [21] typeinf_edge(interp::Core.Compiler.NativeInterpreter, method::Method, atype::Any, sparams::Core.SimpleVector, caller::Core.Compiler.InferenceState)", + " [15] typeinf_edge(interp::Core.Compiler.NativeInterpreter, method::Method, atype::Any, sparams::Core.SimpleVector, caller::Core.Compiler.InferenceState)", " @ Core.Compiler ./compiler/typeinfer.jl:932", - " [22] abstract_call_method(interp::Core.Compiler.NativeInterpreter, method::Method, sig::Any, sparams::Core.SimpleVector, hardlimit::Bool, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState)", + " [16] abstract_call_method(interp::Core.Compiler.NativeInterpreter, method::Method, sig::Any, sparams::Core.SimpleVector, hardlimit::Bool, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:611", - " [23] abstract_call_gf_by_type(interp::Core.Compiler.NativeInterpreter, f::Any, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, atype::Any, sv::Core.Compiler.InferenceState, max_methods::Int64)", + " [17] abstract_call_gf_by_type(interp::Core.Compiler.NativeInterpreter, f::Any, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, atype::Any, sv::Core.Compiler.InferenceState, max_methods::Int64)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:152", + " [18] abstract_call_known(interp::Core.Compiler.NativeInterpreter, f::Any, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState, max_methods::Int64)", + " @ Core.Compiler ./compiler/abstractinterpretation.jl:1949", "--- the last 16 lines are repeated 413 more times ---", - " [6632] abstract_call_known(interp::Core.Compiler.NativeInterpreter, f::Any, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState, max_methods::Int64)", - " @ Core.Compiler ./compiler/abstractinterpretation.jl:1949", - " [6633] abstract_call(interp::Core.Compiler.NativeInterpreter, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState, max_methods::Int64)", + " [6627] abstract_call(interp::Core.Compiler.NativeInterpreter, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState, max_methods::Int64)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:2020", - " [6634] abstract_apply(interp::Core.Compiler.NativeInterpreter, argtypes::Vector{Any}, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState, max_methods::Int64)", + " [6628] abstract_apply(interp::Core.Compiler.NativeInterpreter, argtypes::Vector{Any}, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState, max_methods::Int64)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:1566", - " [6635] abstract_call_known(interp::Core.Compiler.NativeInterpreter, f::Any, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState, max_methods::Int64)", + " [6629] abstract_call_known(interp::Core.Compiler.NativeInterpreter, f::Any, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState, max_methods::Int64)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:1855", - " [6636] abstract_call(interp::Core.Compiler.NativeInterpreter, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState, max_methods::Nothing)", + " [6630] abstract_call(interp::Core.Compiler.NativeInterpreter, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState, max_methods::Nothing)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:2020", - " [6637] abstract_call(interp::Core.Compiler.NativeInterpreter, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState)", + " [6631] abstract_call(interp::Core.Compiler.NativeInterpreter, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:1999", - " [6638] abstract_eval_statement_expr(interp::Core.Compiler.NativeInterpreter, e::Expr, vtypes::Vector{Core.Compiler.VarState}, sv::Core.Compiler.InferenceState, mi::Nothing)", + " [6632] abstract_eval_statement_expr(interp::Core.Compiler.NativeInterpreter, e::Expr, vtypes::Vector{Core.Compiler.VarState}, sv::Core.Compiler.InferenceState, mi::Nothing)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:2183", - " [6639] abstract_eval_statement(interp::Core.Compiler.NativeInterpreter, e::Any, vtypes::Vector{Core.Compiler.VarState}, sv::Core.Compiler.InferenceState)", + " [6633] abstract_eval_statement(interp::Core.Compiler.NativeInterpreter, e::Any, vtypes::Vector{Core.Compiler.VarState}, sv::Core.Compiler.InferenceState)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:2396", - " [6640] abstract_eval_basic_statement(interp::Core.Compiler.NativeInterpreter, stmt::Any, pc_vartable::Vector{Core.Compiler.VarState}, frame::Core.Compiler.InferenceState)", + " [6634] abstract_eval_basic_statement(interp::Core.Compiler.NativeInterpreter, stmt::Any, pc_vartable::Vector{Core.Compiler.VarState}, frame::Core.Compiler.InferenceState)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:2658", - " [6641] typeinf_local(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)", + " [6635] typeinf_local(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:2867", - " [6642] typeinf_nocycle(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)", + " [6636] typeinf_nocycle(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:2955", - " [6643] _typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)", + " [6637] _typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)", " @ Core.Compiler ./compiler/typeinfer.jl:246", - " [6644] typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)", + " [6638] typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)", " @ Core.Compiler ./compiler/typeinfer.jl:216", - " [6645] typeinf_edge(interp::Core.Compiler.NativeInterpreter, method::Method, atype::Any, sparams::Core.SimpleVector, caller::Core.Compiler.InferenceState)", + " [6639] typeinf_edge(interp::Core.Compiler.NativeInterpreter, method::Method, atype::Any, sparams::Core.SimpleVector, caller::Core.Compiler.InferenceState)", " @ Core.Compiler ./compiler/typeinfer.jl:932", - " [6646] abstract_call_method(interp::Core.Compiler.NativeInterpreter, method::Method, sig::Any, sparams::Core.SimpleVector, hardlimit::Bool, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState)", + " [6640] abstract_call_method(interp::Core.Compiler.NativeInterpreter, method::Method, sig::Any, sparams::Core.SimpleVector, hardlimit::Bool, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:611", - " [6647] abstract_call_gf_by_type(interp::Core.Compiler.NativeInterpreter, f::Any, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, atype::Any, sv::Core.Compiler.InferenceState, max_methods::Int64)", + " [6641] abstract_call_gf_by_type(interp::Core.Compiler.NativeInterpreter, f::Any, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, atype::Any, sv::Core.Compiler.InferenceState, max_methods::Int64)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:152", - " [6648] abstract_call_known(interp::Core.Compiler.NativeInterpreter, f::Any, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState, max_methods::Int64)", + " [6642] abstract_call_known(interp::Core.Compiler.NativeInterpreter, f::Any, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState, max_methods::Int64)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:1949", - " [6649] abstract_call(interp::Core.Compiler.NativeInterpreter, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState, max_methods::Nothing)", + " [6643] abstract_call(interp::Core.Compiler.NativeInterpreter, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState, max_methods::Nothing)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:2020", - " [6650] abstract_call(interp::Core.Compiler.NativeInterpreter, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState)", + " [6644] abstract_call(interp::Core.Compiler.NativeInterpreter, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:1999", - " [6651] abstract_eval_statement_expr(interp::Core.Compiler.NativeInterpreter, e::Expr, vtypes::Vector{Core.Compiler.VarState}, sv::Core.Compiler.InferenceState, mi::Nothing)", + " [6645] abstract_eval_statement_expr(interp::Core.Compiler.NativeInterpreter, e::Expr, vtypes::Vector{Core.Compiler.VarState}, sv::Core.Compiler.InferenceState, mi::Nothing)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:2183", - " [6652] abstract_eval_statement(interp::Core.Compiler.NativeInterpreter, e::Any, vtypes::Vector{Core.Compiler.VarState}, sv::Core.Compiler.InferenceState)", + " [6646] abstract_eval_statement(interp::Core.Compiler.NativeInterpreter, e::Any, vtypes::Vector{Core.Compiler.VarState}, sv::Core.Compiler.InferenceState)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:2396", - " [6653] abstract_eval_basic_statement(interp::Core.Compiler.NativeInterpreter, stmt::Any, pc_vartable::Vector{Core.Compiler.VarState}, frame::Core.Compiler.InferenceState)", + " [6647] abstract_eval_basic_statement(interp::Core.Compiler.NativeInterpreter, stmt::Any, pc_vartable::Vector{Core.Compiler.VarState}, frame::Core.Compiler.InferenceState)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:2682", - " [6654] typeinf_local(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)", + " [6648] typeinf_local(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:2867", - " [6655] typeinf_nocycle(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)", + " [6649] typeinf_nocycle(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)", " @ Core.Compiler ./compiler/abstractinterpretation.jl:2955", - " [6656] _typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)", + " [6650] _typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)", " @ Core.Compiler ./compiler/typeinfer.jl:246", - " [6657] typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)", + " [6651] typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)", " @ Core.Compiler ./compiler/typeinfer.jl:216", - " [6658] typeinf", + " [6652] typeinf", " @ ./compiler/typeinfer.jl:12 [inlined]", - " [6659] typeinf_type(interp::Core.Compiler.NativeInterpreter, method::Method, atype::Any, sparams::Core.SimpleVector)", + " [6653] typeinf_type(interp::Core.Compiler.NativeInterpreter, method::Method, atype::Any, sparams::Core.SimpleVector)", " @ Core.Compiler ./compiler/typeinfer.jl:1079", - " [6660] return_type(interp::Core.Compiler.NativeInterpreter, t::DataType)", + " [6654] return_type(interp::Core.Compiler.NativeInterpreter, t::DataType)", " @ Core.Compiler ./compiler/typeinfer.jl:1140", - " [6661] return_type(f::Any, t::DataType)", + " [6655] return_type(f::Any, t::DataType)", " @ Core.Compiler ./compiler/typeinfer.jl:1112", - " [6662] combine_eltypes(f::Function, args::Tuple{Vector{ABCProcessInput}})", + " [6656] combine_eltypes(f::Function, args::Tuple{Vector{ABCProcessInput}})", " @ Base.Broadcast ./broadcast.jl:730", - " [6663] copy(bc::Base.Broadcast.Broadcasted{Style}) where Style", + " [6657] copy(bc::Base.Broadcast.Broadcasted{Style}) where Style", " @ Base.Broadcast ./broadcast.jl:895", - " [6664] materialize(bc::Base.Broadcast.Broadcasted)", + " [6658] materialize(bc::Base.Broadcast.Broadcasted)", " @ Base.Broadcast ./broadcast.jl:873", - " [6665] var\"##core#293\"()", + " [6659] var\"##core#302\"()", " @ Main ~/.julia/packages/BenchmarkTools/0owsb/src/execution.jl:489", - " [6666] var\"##sample#294\"(::Tuple{}, __params::BenchmarkTools.Parameters)", + " [6660] var\"##sample#303\"(::Tuple{}, __params::BenchmarkTools.Parameters)", " @ Main ~/.julia/packages/BenchmarkTools/0owsb/src/execution.jl:495", - " [6667] _run(b::BenchmarkTools.Benchmark, p::BenchmarkTools.Parameters; verbose::Bool, pad::String, kwargs::Base.Pairs{Symbol, Integer, NTuple{4, Symbol}, NamedTuple{(:samples, :evals, :gctrial, :gcsample), Tuple{Int64, Int64, Bool, Bool}}})", + " [6661] _run(b::BenchmarkTools.Benchmark, p::BenchmarkTools.Parameters; verbose::Bool, pad::String, kwargs::Base.Pairs{Symbol, Integer, NTuple{4, Symbol}, NamedTuple{(:samples, :evals, :gctrial, :gcsample), Tuple{Int64, Int64, Bool, Bool}}})", " @ BenchmarkTools ~/.julia/packages/BenchmarkTools/0owsb/src/execution.jl:99", - " [6668] #invokelatest#2", + " [6662] #invokelatest#2", " @ ./essentials.jl:821 [inlined]", - " [6669] invokelatest", + " [6663] invokelatest", " @ ./essentials.jl:816 [inlined]", - " [6670] #run_result#45", + " [6664] #run_result#45", " @ ~/.julia/packages/BenchmarkTools/0owsb/src/execution.jl:34 [inlined]", - " [6671] run_result", + " [6665] run_result", " @ ~/.julia/packages/BenchmarkTools/0owsb/src/execution.jl:34 [inlined]", - " [6672] run(b::BenchmarkTools.Benchmark, p::BenchmarkTools.Parameters; progressid::Nothing, nleaves::Float64, ndone::Float64, kwargs::Base.Pairs{Symbol, Integer, NTuple{5, Symbol}, NamedTuple{(:verbose, :samples, :evals, :gctrial, :gcsample), Tuple{Bool, Int64, Int64, Bool, Bool}}})", + " [6666] run(b::BenchmarkTools.Benchmark, p::BenchmarkTools.Parameters; progressid::Nothing, nleaves::Float64, ndone::Float64, kwargs::Base.Pairs{Symbol, Integer, NTuple{5, Symbol}, NamedTuple{(:verbose, :samples, :evals, :gctrial, :gcsample), Tuple{Bool, Int64, Int64, Bool, Bool}}})", " @ BenchmarkTools ~/.julia/packages/BenchmarkTools/0owsb/src/execution.jl:117", - " [6673] run (repeats 2 times)", + " [6667] run (repeats 2 times)", " @ ~/.julia/packages/BenchmarkTools/0owsb/src/execution.jl:117 [inlined]", - " [6674] #warmup#54", + " [6668] #warmup#54", " @ ~/.julia/packages/BenchmarkTools/0owsb/src/execution.jl:169 [inlined]", - " [6675] warmup(item::BenchmarkTools.Benchmark)", + " [6669] warmup(item::BenchmarkTools.Benchmark)", " @ BenchmarkTools ~/.julia/packages/BenchmarkTools/0owsb/src/execution.jl:168" ] } ], "source": [ "using BenchmarkTools\n", - "@benchmark compute_AB_AB7.(inputs)" + "#compute_bench = @benchmark compute_AB_AB5.(inputs)\n", + "compute_bench_reduced = @benchmark compute_AB_AB5_reduced.(inputs)" ] }, { diff --git a/src/code_gen/main.jl b/src/code_gen/main.jl index 13406bb..944ccb6 100644 --- a/src/code_gen/main.jl +++ b/src/code_gen/main.jl @@ -79,7 +79,7 @@ function gen_input_assignment_code( # TODO: how to get the "default" cpu device? device = entry_device(machine) evalExpr = eval(gen_access_expr(device, symbol)) - push!(assignInputs, Meta.parse("$(evalExpr) = ParticleValue($p, 1.0)")) + push!(assignInputs, Meta.parse("$(evalExpr)::ParticleValue{$type} = ParticleValue($p, 1.0)")) end end @@ -102,6 +102,7 @@ function get_compute_function(graph::DAG, process::AbstractProcessDescription, m expr = Meta.parse( "function compute_$(functionId)(input::AbstractProcessInput) $initCaches; $assignInputs; $code; return $resSym; end", ) + func = eval(expr) return func diff --git a/src/models/abc/compute.jl b/src/models/abc/compute.jl index 8d14d01..df5f865 100644 --- a/src/models/abc/compute.jl +++ b/src/models/abc/compute.jl @@ -7,7 +7,7 @@ Return the particle and value as is. 0 FLOP. """ -function compute(::ComputeTaskP, data::ParticleValue) +function compute(::ComputeTaskP, data::ParticleValue{P})::ParticleValue{P} where {P <: ABCParticle} return data end @@ -18,7 +18,7 @@ Compute an outer edge. Return the particle value with the same particle and the 1 FLOP. """ -function compute(::ComputeTaskU, data::ParticleValue) +function compute(::ComputeTaskU, data::ParticleValue{P})::ParticleValue{P} where {P <: ABCParticle} return ParticleValue(data.p, data.v * outer_edge(data.p)) end @@ -29,7 +29,11 @@ Compute a vertex. Preserve momentum and particle types (AB->C etc.) to create re 6 FLOP. """ -function compute(::ComputeTaskV, data1::ParticleValue, data2::ParticleValue) +function compute( + ::ComputeTaskV, + data1::ParticleValue{P1}, + data2::ParticleValue{P2}, +)::ParticleValue where {P1 <: ABCParticle, P2 <: ABCParticle} p3 = preserve_momentum(data1.p, data2.p) dataOut = ParticleValue(p3, data1.v * vertex() * data2.v) return dataOut @@ -44,7 +48,7 @@ For valid inputs, both input particles should have the same momenta at this poin 12 FLOP. """ -function compute(::ComputeTaskS2, data1::ParticleValue, data2::ParticleValue) +function compute(::ComputeTaskS2, data1::ParticleValue{P}, data2::ParticleValue{P})::Float64 where {P <: ABCParticle} #= @assert isapprox(abs(data1.p.momentum.E), abs(data2.p.momentum.E), rtol = 0.001, atol = sqrt(eps())) "E: $(data1.p.momentum.E) vs. $(data2.p.momentum.E)" @assert isapprox(data1.p.momentum.px, -data2.p.momentum.px, rtol = 0.001, atol = sqrt(eps())) "px: $(data1.p.momentum.px) vs. $(data2.p.momentum.px)" @@ -61,7 +65,7 @@ Compute inner edge (1 input particle, 1 output particle). 11 FLOP. """ -function compute(::ComputeTaskS1, data::ParticleValue) +function compute(::ComputeTaskS1, data::ParticleValue{P})::ParticleValue{P} where {P <: ABCParticle} return ParticleValue(data.p, data.v * inner_edge(data.p)) end @@ -72,7 +76,7 @@ Compute a sum over the vector. Use an algorithm that accounts for accumulated er Linearly many FLOP with growing data. """ -function compute(::ComputeTaskSum, data::Vector{Float64}) +function compute(::ComputeTaskSum, data::Vector{Float64})::Float64 return sum_kbn(data) end diff --git a/src/optimization/greedy.jl b/src/optimization/greedy.jl new file mode 100644 index 0000000..07808fa --- /dev/null +++ b/src/optimization/greedy.jl @@ -0,0 +1,8 @@ +""" + GreedyOptimizer + +An implementation of the greedy optimization algorithm, simply choosing the best next option evaluated with the given estimator. +""" +struct GreedyOptimizer + estimator::AbstractEstimator +end