-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathkt.txt
More file actions
3986 lines (3968 loc) · 291 KB
/
kt.txt
File metadata and controls
3986 lines (3968 loc) · 291 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
diff --git a/static/als_csv_instrumented.cpp b/static/als_csv_instrumented.cpp
index 23dc984..2df2dfe 100644
--- a/static/als_csv_instrumented.cpp
+++ b/static/als_csv_instrumented.cpp
@@ -23,24 +23,22 @@
#include <utility>
///////////////////////////////////////////////////////////////////////////////
-char const* const read_x_code = R"(block(
+char const* const read_x_code = R"(
//
// Read input-data from given CSV file
//
define(read_x, filepath, row_start, row_stop, col_start, col_stop,
slice(file_read_csv(filepath), make_list(row_start , row_stop),
make_list(col_start , col_stop))
- ),
+ )
read_x
-))";
+)";
-char const* const als_explicit = R"(block(
+char const* const als_explicit = R"(
//
// Alternating Least squares algorithm (ALS)
//
- //
- //
define(als_explicit, ratings, regularization, num_factors, iterations, alpha,
enable_output,
block(
@@ -49,7 +47,7 @@ char const* const als_explicit = R"(block(
define(conf, alpha * ratings),
define(conf_u, constant(0.0, make_list(num_items))),
- define(conf_i, constant(0.0,make_list(num_users))),
+ define(conf_i, constant(0.0, make_list(num_users))),
define(c_u, constant(0.0, make_list(num_items, num_items))),
define(c_i, constant(0.0, make_list(num_users, num_users))),
@@ -73,25 +71,25 @@ char const* const als_explicit = R"(block(
while(k < iterations,
block(
- store(YtY, dot(transpose(Y), Y) + regularization*I_f),
- store(XtX, dot(transpose(X), X) + regularization*I_f),
+ if(enable_output,
+ block(
+ cout("iteration ", k, u),
+ cout("X: ",X),
+ cout("Y: ",Y)
+ )
+ ),
+ store(YtY, dot(transpose(Y), Y) + regularization * I_f),
+ store(XtX, dot(transpose(X), X) + regularization * I_f),
while(u < num_users,
block(
- if(enable_output,
- block(
- cout("iteration ",k),
- cout("X: ",X),
- cout("Y: ",Y)
- )
- ),
store(conf_u, slice_row(conf, u)),
store(c_u, diag(conf_u)),
- store(p_u, __ne(conf_u,0.0,true)),
- store(A, dot(dot(transpose(Y),c_u),Y)+ YtY),
- store(b, dot(dot(transpose(Y),(c_u + I_i)),transpose(p_u))),
- set_row(X,u,u+1,1,dot(inverse(A),b)),
- store(u, u+1)
+ store(p_u, __ne(conf_u, 0.0, true)),
+ store(A, dot(dot(transpose(Y), c_u), Y)+ YtY),
+ store(b, dot(dot(transpose(Y),(c_u + I_i)), transpose(p_u))),
+ store(slice(X, list(u, u + 1, 1),nil), dot(inverse(A), b)),
+ store(u, u + 1)
)
),
store(u, 0),
@@ -99,36 +97,33 @@ char const* const als_explicit = R"(block(
block(
store(conf_i, slice_column(conf, i)),
store(c_i, diag(conf_i)),
- store(p_i, __ne(conf_i,0.0,true)),
- store(A, dot(dot(transpose(X),c_i),X) + XtX),
- store(b, dot(dot(transpose(X),(c_i + I_u)),transpose(p_i))),
- set_row(Y,i,i+1,1,dot(inverse(A),b)),
- store(i, i+1)
+ store(p_i, __ne(conf_i, 0.0, true)),
+ store(A, dot(dot(transpose(X),c_i), X) + XtX),
+ store(b, dot(dot(transpose(X),(c_i + I_u)), transpose(p_i))),
+ store(slice(Y, list(i, i + 1, 1),nil), dot(inverse(A), b)),
+ store(i, i + 1)
)
),
store(i, 0),
- store(k,k+1)
+ store(k, k + 1)
)
),
- make_list(X, Y)
+ list(X, Y)
)
- ),
+ )
als_explicit
-))";
+)";
-std::string const als_direct = R"(block(
+std::string const als_direct = R"(
//
// Alternating Least squares algorithm (ALS) (direct implementation)
//
- //
- //
- //
define(als_direct, ratings, regularization, num_factors, iterations, alpha,
enable_output, als(ratings, regularization, num_factors, iterations, alpha,
enable_output)
- ),
+ )
als_direct
-))";
+)";
///////////////////////////////////////////////////////////////////////////////
// Find the line/column position in the source code from a given iterator
@@ -293,28 +288,17 @@ void print_instrumentation(char const* const name, int compile_id,
<< "\n\n";
}
-void print_performance_counter_data_csv()
+void print_performance_counter_data_csv(
+ std::vector<std::string> const& existing_primitive_instances)
{
std::cout << std::endl << "Primitive Performance Counter Data in CSV:";
// CSV Header
std::cout << "\nprimitive_instance,display_name,count,time,eval_direct\n";
- // List of existing primitive instances
- std::vector<std::string> existing_primitive_instances;
-
- // Retrieve all primitive instances
- for (auto const& entry :
- hpx::agas::find_symbols(hpx::launch::sync, "/phylanx/*$*"))
- {
- existing_primitive_instances.push_back(entry.first);
- }
-
// Print performance data
for (auto const& entry :
- phylanx::util::retrieve_counter_data(existing_primitive_instances,
- std::vector<std::string>{"count/eval", "time/eval", "eval_direct"},
- hpx::find_here()))
+ phylanx::util::retrieve_counter_data(existing_primitive_instances))
{
std::cout << "\"" << entry.first << "\",\""
<< phylanx::execution_tree::compiler::primitive_display_name(
@@ -340,11 +324,19 @@ int hpx_main(boost::program_options::variables_map& vm)
// compile the given code
phylanx::execution_tree::compiler::function_list snippets;
- auto read_x =
+ auto const& code_read_x =
phylanx::execution_tree::compile("read_x", read_x_code, snippets);
- auto als = phylanx::execution_tree::compile(
+
+ auto const& code_als = phylanx::execution_tree::compile(
+ vm.count("direct") != 0 ? "als_direct" : "als_explicit",
vm.count("direct") != 0 ? als_direct : als_explicit, snippets);
+ // Enable collection of performance data for all existing primitives
+ auto primitives = phylanx::util::enable_measurements();
+
+ auto read_x = code_read_x.run();
+ auto als = code_als.run();
+
// Print instrumentation information, if enabled
if (vm.count("instrument") != 0)
{
@@ -382,7 +374,7 @@ int hpx_main(boost::program_options::variables_map& vm)
// Print performance counter data in CSV
if (vm.count("instrument") != 0)
{
- print_performance_counter_data_csv();
+ print_performance_counter_data_csv(primitives);
}
// Make sure all counters are properly initialized, don't reset current
diff --git a/static/compare.js b/static/compare.js
index 315f0d9..8b99e38 100644
--- a/static/compare.js
+++ b/static/compare.js
@@ -261,8 +261,8 @@ function retrieveData() {
legend.empty();
*/
- // console.log("Files1:", textfile1, csvfile1);
- // console.log("Files2:", textfile2, csvfile2);
+ console.log("Files1:", textfile1, csvfile1);
+ console.log("Files2:", textfile2, csvfile2);
callEverything(textfile1, csvfile1, textfile2, csvfile2);
}
diff --git a/static/generateTree.js b/static/generateTree.js
index a4ec3c2..e75b3d8 100644
--- a/static/generateTree.js
+++ b/static/generateTree.js
@@ -401,7 +401,8 @@ function update(source, fullRoot, perfdata, perfdata2, clicked) {
}
if (d._perfdata.eval_direct !== d._perfdata2.eval_direct) {
- d.executedDifferently = true;
+ console.log("diff ", d._perfdata, d._perfdata2);
+ d.executedDifferently = true;
} else {
d.executedDifferently = false;
}
@@ -747,7 +748,7 @@ function update(source, fullRoot, perfdata, perfdata2, clicked) {
return "start";
})
.text(function (d) {
- if (!d.children) {
+ if (!d.children && d._perfdata) {
return d._perfdata.display_name;
} else {
return "";
@@ -1294,8 +1295,6 @@ function drawList (nodes) {
}
// Sort nodes by time (slowest to fastest)
var nodes = nodes.sort(function(c,d) {
- console.log(c);
- console.log(d);
if ( hasData(c) && hasData(d)){
return d._perfdata[currentTime] - c._perfdata[currentTime];
}
diff --git a/static/lra_csv_instrumented.cpp b/static/lra_csv_instrumented.cpp
new file mode 100644
index 0000000..56328bf
--- /dev/null
+++ b/static/lra_csv_instrumented.cpp
@@ -0,0 +1,410 @@
+// Copyright (c) 2017-2018 Hartmut Kaiser
+// Copyright (c) 2018 Parsa Amini
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <phylanx/phylanx.hpp>
+
+#include <hpx/hpx_init.hpp>
+#include <hpx/include/agas.hpp>
+#include <hpx/runtime_fwd.hpp>
+
+#include <cstddef>
+#include <cstdint>
+#include <iostream>
+#include <map>
+#include <vector>
+#include <string>
+#include <utility>
+
+#include <boost/program_options.hpp>
+#include <blaze/Math.h>
+
+//////////////////////////////////////////////////////////////////////////////////
+// This example uses part of the breast cancer dataset from UCI Machine Learning
+// Repository:
+// https://archive.ics.uci.edu/ml/datasets/Breast+Cancer+Wisconsin+(Diagnostic)
+//
+// A copy of the full dataset in CSV format (breast_cancer.csv), obtained from
+// scikit-learn datasets, is provided in the same folder as this example.
+//
+// The layout of the data in the provided CSV file used by the example
+// is as follows:
+// 30 features per line followed by the classification
+// 569 lines of data
+//
+// This example also demonstrates how the generated primitives can be introspected
+// and linked back to the source code.
+//
+/////////////////////////////////////////////////////////////////////////////////
+
+std::string const read_x_code = R"(block(
+ //
+ // Read X-data from given CSV file
+ //
+ define(read_x, filepath, row_start, row_stop, col_start, col_stop,
+ slice(file_read_csv(filepath),
+ make_list(row_start, row_stop),
+ make_list(col_start, col_stop))
+ ),
+ read_x
+))";
+
+std::string const read_y_code = R"(block(
+ //
+ // Read Y-data from given CSV file
+ //
+ define(read_y, filepath, row_start, row_stop, col_stop,
+ slice(file_read_csv(filepath), make_list(row_start, row_stop), col_stop)
+ ),
+ read_y
+))";
+
+///////////////////////////////////////////////////////////////////////////////
+std::string const lra_code = R"(block(
+ //
+ // Logistic regression analysis algorithm
+ //
+ // x: [N, M]
+ // y: [N]
+ //
+ define(lra_explicit, x, y, alpha, iterations, enable_output,
+ block(
+ define(weights, constant(0.0, shape(x, 1))), // weights: [M]
+ define(transx, transpose(x)), // transx: [M, N]
+ define(pred, constant(0.0, shape(x, 0))),
+ define(step, 0),
+ while(
+ step < iterations,
+ block(
+ if(enable_output, cout("step: ", step, ", ", weights)),
+ // exp(-dot(x, weights)): [N], pred: [N]
+ store(pred, 1.0 / (1.0 + exp(-dot(x, weights)))),
+ store(weights, weights - (alpha * dot(transx, pred - y))),
+ store(step, step + 1)
+ )
+ ),
+ weights
+ )
+ ),
+ lra_explicit
+))";
+
+std::string const lra_code_direct = R"(block(
+ //
+ // Logistic regression analysis algorithm (direct implementation)
+ //
+ // x: [N, M]
+ // y: [N]
+ //
+ define(lra_direct, x, y, alpha, iterations, enable_output,
+ lra(x, y, alpha, iterations, enable_output)
+ ),
+ lra_direct
+))";
+
+///////////////////////////////////////////////////////////////////////////////
+// Find the line/column position in the source code from a given iterator
+// pointing into it.
+//
+std::pair<std::size_t, std::size_t> get_pos(std::string const& code,
+ std::tuple<std::size_t, std::size_t, std::int64_t> const& tags)
+{
+ // Column might be given directly, in that case line is given as well
+ if (std::get<2>(tags) != -1)
+ {
+ return std::make_pair(std::get<1>(tags), std::get<2>(tags));
+ }
+
+ // Otherwise the given value is the offset into the code
+ std::size_t pos = std::get<1>(tags);
+ std::size_t line = 1;
+ std::size_t column = 1;
+
+ for (std::int64_t i = 0; i != pos && i != code.size(); ++i)
+ {
+ if (code[i] == '\r' || code[i] == '\n') // CR/LF
+ {
+ ++line;
+ column = 1;
+ }
+ else
+ {
+ ++column;
+ }
+ }
+
+ return std::make_pair(line, column);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// Find offset into code as given by the tags argument
+//
+std::size_t get_offset(std::string const& code,
+ std::tuple<std::size_t, std::size_t, std::size_t> const& tags)
+{
+ // Offset might be given directly
+ if (std::get<2>(tags) == -1)
+ {
+ return std::get<1>(tags);
+ }
+
+ // Otherwise the given value is the line/column position in the code
+ std::size_t offset = 0;
+ std::size_t line = 1;
+ std::size_t column = 0;
+
+ for (std::int64_t i = 0; i != code.size(); ++i, ++offset)
+ {
+ if (code[i] == '\r' || code[i] == '\n') // CR/LF
+ {
+ ++line;
+ column = 0;
+ }
+ else
+ {
+ ++column;
+ }
+
+ if (std::get<1>(tags) == line && std::get<2>(tags) == column)
+ {
+ break;
+ }
+ }
+
+ return offset;
+}
+
+// Extract the compile_id/tag pair from a given primitive instance name.
+//
+// The compile_id is a sequence number tracking invocations of the
+// function phylanx::execution_tree::compile (needed to link back to the
+// concrete source code compiled).
+//
+// The tag is an index into the array of iterators filled by
+// phylanx::ast::generate_ast. It allows to find the iterator referring
+// to the construct in the source code a particular primitive instance was
+// created by.
+//
+std::tuple<std::size_t, std::size_t, std::size_t> extract_tags(
+ std::string const& name)
+{
+ auto data = phylanx::execution_tree::compiler::parse_primitive_name(name);
+ return std::make_tuple(data.compile_id, data.tag1, data.tag2);
+}
+
+// The symbolic names registered in AGAS that identify the created
+// primitive instances have the following structure:
+//
+// /phylanx/<primitive>$<sequence-nr>[$<instance>]/<compile_id>$<tag1>[$<tag2>]
+//
+// where:
+// <primitive>: the name of primitive type representing the given
+// node in the expression tree
+// <sequence-nr>: the sequence number of the corresponding instance
+// of type <primitive>
+// <instance>: (optional), some primitives have additional instance
+// names, for instance references to function arguments
+// have the name of the argument as their <instance>
+// <compile_id>: the sequence number of the invocation of the
+// function phylanx::execution_tree::compile
+// <tag1>: if <tag2> == -1: the position inside the compiled code
+// block where the referring to the point of usage of the
+// primitive in the compiled source code
+// if <tag2> != -1: the line number in the compiled code
+// block where the referring to the point of usage of the
+// primitive in the compiled source code
+// <tag2>: (optional) if <tag2> != -1 or not given: the column
+// offset in the given line (default: -1)
+//
+void print_instrumentation(
+ char const* const name, int compile_id, std::string const& code,
+ phylanx::execution_tree::compiler::function const& func,
+ std::map<std::string, hpx::id_type> const& entries)
+{
+ std::cout << "Instrumentation information for function: " << name << "\n";
+
+ for (auto const& e : entries)
+ {
+ // Extract compile_id and iterator index (tag) from the symbolic name
+ auto tags = extract_tags(e.first);
+ if (std::get<0>(tags) != compile_id)
+ continue;
+
+ // Find real position of given symbol in source code
+ if (std::get<1>(tags) != std::size_t(-1))
+ {
+ auto pos = get_pos(code, tags);
+ std::cout << e.first << ": " << name << "(" << pos.first << ", "
+ << pos.second << "): ";
+
+ // Show the next (at max) 20 characters
+ auto offset = get_offset(code, tags);
+ auto end = code.begin() + offset;
+ for (int i = 0; end != code.end() && i != 20; ++end, ++i)
+ {
+ if (*end == '\n' || *end == '\r')
+ break;
+ }
+ std::cout << std::string(code.begin() + offset, end)
+ << " ...\n";
+ }
+ else
+ {
+ std::cout << e.first << "\n";
+ }
+ }
+
+ std::cout << "\n";
+
+ std::cout << "Tree information for function: " << name << "\n";
+ std::cout << phylanx::execution_tree::newick_tree(
+ name, func.get_expression_topology())
+ << "\n\n";
+
+ std::cout << phylanx::execution_tree::dot_tree(
+ name, func.get_expression_topology())
+ << "\n\n";
+}
+
+void print_performance_counter_data_csv(
+ std::vector<std::string> const& existing_primitive_instances)
+{
+ std::cout << std::endl << "Primitive Performance Counter Data in CSV:";
+
+ // CSV Header
+ std::cout << "\nprimitive_instance,display_name,count,time,eval_direct\n";
+
+ // Print performance data
+ for (auto const& entry :
+ phylanx::util::retrieve_counter_data(existing_primitive_instances))
+ {
+ std::cout << "\"" << entry.first << "\",\""
+ << phylanx::execution_tree::compiler::primitive_display_name(
+ entry.first)
+ << "\"";
+ for (auto const& counter_value : entry.second)
+ {
+ std::cout << "," << counter_value;
+ }
+ std::cout << std::endl;
+ }
+
+ std::cout << std::endl;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+int hpx_main(boost::program_options::variables_map& vm)
+{
+ if (vm.count("data_csv") == 0)
+ {
+ std::cerr << "Please specify '--data_csv=data-file'";
+ return hpx::finalize();
+ }
+
+ // Compile the given code
+ phylanx::execution_tree::compiler::function_list snippets;
+ auto const& code_read_x = phylanx::execution_tree::compile(
+ "read_x", phylanx::ast::generate_ast(read_x_code), snippets);
+
+ auto const& code_read_y = phylanx::execution_tree::compile(
+ "read_y", phylanx::ast::generate_ast(read_y_code), snippets);
+
+ auto const& code_lra = phylanx::execution_tree::compile(
+ vm.count("direct") != 0 ? "lra_direct" : "lra",
+ vm.count("direct") != 0 ? lra_code_direct : lra_code, snippets);
+
+ // Enable collection of performance data for all existing primitives
+ auto primitives = phylanx::util::enable_measurements();
+
+ auto read_x = code_read_x.run();
+ auto read_y = code_read_y.run();
+ auto lra = code_lra.run();
+
+ // Print instrumentation information, if enabled
+ if (vm.count("instrument") != 0)
+ {
+ auto entries =
+ hpx::agas::find_symbols(hpx::launch::sync, "/phylanx/*");
+
+ print_instrumentation("read_x", 0, read_x_code, read_x, entries);
+ print_instrumentation("read_y", 1, read_y_code, read_y, entries);
+ print_instrumentation("lra", 2, lra_code, lra, entries);
+ }
+
+ auto row_start = vm["row_start"].as<std::int64_t>();
+ auto col_start = vm["col_start"].as<std::int64_t>();
+ auto row_stop = vm["row_stop"].as<std::int64_t>();
+ auto col_stop = vm["col_stop"].as<std::int64_t>();
+
+ // Read the data from the files
+ auto x = read_x(vm["data_csv"].as<std::string>(), row_start, row_stop,
+ col_start, col_stop);
+ auto y =
+ read_y(vm["data_csv"].as<std::string>(), row_start, row_stop, col_stop);
+
+ // Remaining command line options
+ auto alpha = vm["alpha"].as<double>();
+ auto iterations = vm["num_iterations"].as<std::int64_t>();
+ bool enable_output = vm.count("enable_output") != 0;
+
+ // Measure execution time
+ hpx::util::high_resolution_timer t;
+
+ // Evaluate LRA using the read data
+ auto result =
+ lra(std::move(x), std::move(y), alpha, iterations, enable_output);
+
+ auto elapsed = t.elapsed();
+
+ // Print performance counter data in CSV
+ if (vm.count("instrument") != 0)
+ {
+ print_performance_counter_data_csv(primitives);
+ }
+
+ // Make sure all counters are properly initialized, don't reset current
+ // counter values
+ hpx::reinit_active_counters(false);
+
+ std::cout << "Result: \n"
+ << phylanx::execution_tree::extract_numeric_value(result) << "\n"
+ << "Calculated in: " << elapsed << " seconds\n";
+
+ return hpx::finalize();
+}
+
+int main(int argc, char* argv[])
+{
+ // Command line handling
+ boost::program_options::options_description desc("usage: lra [options]");
+ desc.add_options()
+ ("enable_output,e", "enable progress output (default: false)")
+ ("instrument,i", "print instrumentation information (default: false)")
+ ("direct,d", "use direct implementation of LRA (default: false)")
+ ("num_iterations,n",
+ boost::program_options::value<std::int64_t>()->default_value(750),
+ "number of iterations (default: 750)")
+ ("alpha,a",
+ boost::program_options::value<double>()->default_value(1e-5),
+ "alpha (default: 1e-5)")
+ ("data_csv",
+ boost::program_options::value<std::string>(),
+ "file name for reading data")
+ ("row_start",
+ boost::program_options::value<std::int64_t>()->default_value(0),
+ "row_start (default: 0)")
+ ("col_start",
+ boost::program_options::value<std::int64_t>()->default_value(0),
+ "col_start (default: 0)")
+ ("row_stop",
+ boost::program_options::value<std::int64_t>()->default_value(569),
+ "row_stop (default: 569)")
+ ("col_stop",
+ boost::program_options::value<std::int64_t>()->default_value(30),
+ "col_stop (default: 30)")
+ ;
+
+ return hpx::init(desc, argc, argv);
+}
diff --git a/static/weekly-data/2019-01-10-als-perfdata.csv b/static/weekly-data/2019-01-10-als-perfdata.csv
new file mode 100755
index 0000000..29dc203
--- /dev/null
+++ b/static/weekly-data/2019-01-10-als-perfdata.csv
@@ -0,0 +1,270 @@
+primitive_instance,display_name,count,time,eval_direct
+"/phylanx/__add$0/2$44$32","add(44, 32)",3,580312,1
+"/phylanx/__add$1/2$45$32","add(45, 32)",3,328744,1
+"/phylanx/__add$10/2$71$30","add(71, 30)",3,53675,1
+"/phylanx/__add$2/2$52$38","add(52, 38)",30,3605704,1
+"/phylanx/__add$3/2$53$60","add(53, 60)",30,1574924,1
+"/phylanx/__add$4/2$54$52","add(54, 52)",30,438469,1
+"/phylanx/__add$5/2$55$38","add(55, 38)",30,443047,1
+"/phylanx/__add$6/2$64$38","add(64, 38)",300,18578779,1
+"/phylanx/__add$7/2$65$60","add(65, 60)",300,4776749,1
+"/phylanx/__add$8/2$66$52","add(66, 52)",300,3153814,1
+"/phylanx/__add$9/2$67$38","add(67, 38)",300,3384603,1
+"/phylanx/__lt$0/2$35$19","lt(35, 19)",4,205540,1
+"/phylanx/__lt$1/2$47$27","lt(47, 27)",33,732476,1
+"/phylanx/__lt$2/2$59$27","lt(59, 27)",303,5024296,1
+"/phylanx/__mul$0/2$10$26","mul(10, 26)",1,46134626,-1
+"/phylanx/__mul$1/2$44$55","mul(44, 55)",3,105886,1
+"/phylanx/__mul$2/2$45$55","mul(45, 55)",3,79612,1
+"/phylanx/__ne$0/2$51$40","ne(51, 40)",30,30916817,0
+"/phylanx/__ne$1/2$63$40","ne(63, 40)",300,3873461,1
+"/phylanx/access-argument$0$filepath/0$6$29","access-argument/filepath(6, 29)",1,4818,1
+"/phylanx/access-argument$1$row_start/0$6$50","access-argument/row_start(6, 50)",1,1198,1
+"/phylanx/access-argument$10$num_factors/2$22$51","access-argument/num_factors(22, 51)",1,775,1
+"/phylanx/access-argument$11$num_factors/2$23$34","access-argument/num_factors(23, 34)",1,5883,1
+"/phylanx/access-argument$12$num_factors/2$30$49","access-argument/num_factors(30, 49)",1,963,1
+"/phylanx/access-argument$13$num_factors/2$30$62","access-argument/num_factors(30, 62)",1,263,1
+"/phylanx/access-argument$14$num_factors/2$31$49","access-argument/num_factors(31, 49)",1,705,1
+"/phylanx/access-argument$15$num_factors/2$31$62","access-argument/num_factors(31, 62)",1,304,1
+"/phylanx/access-argument$16$num_factors/2$32$47","access-argument/num_factors(32, 47)",1,916,1
+"/phylanx/access-argument$17$num_factors/2$32$60","access-argument/num_factors(32, 60)",1,266,1
+"/phylanx/access-argument$18$num_factors/2$33$47","access-argument/num_factors(33, 47)",1,1008,1
+"/phylanx/access-argument$19$iterations/2$35$23","access-argument/iterations(35, 23)",4,3483,1
+"/phylanx/access-argument$2$row_stop/0$6$62","access-argument/row_stop(6, 62)",1,356,1
+"/phylanx/access-argument$20$enable_output/2$37$24","access-argument/enable_output(37, 24)",3,2416,1
+"/phylanx/access-argument$21$regularization/2$44$55","access-argument/regularization(44, 55)",3,2489,1
+"/phylanx/access-argument$22$regularization/2$45$55","access-argument/regularization(45, 55)",3,2383,1
+"/phylanx/access-argument$3$col_start/0$7$25","access-argument/col_start(7, 25)",1,1038,1
+"/phylanx/access-argument$4$col_stop/0$7$37","access-argument/col_stop(7, 37)",1,316,1
+"/phylanx/access-argument$5$ratings/2$8$37","access-argument/ratings(8, 37)",1,1983,1
+"/phylanx/access-argument$6$ratings/2$9$37","access-argument/ratings(9, 37)",1,1000,1
+"/phylanx/access-argument$7$alpha/2$10$26","access-argument/alpha(10, 26)",1,1000,1
+"/phylanx/access-argument$8$ratings/2$10$34","access-argument/ratings(10, 34)",1,577,1
+"/phylanx/access-argument$9$num_factors/2$21$51","access-argument/num_factors(21, 51)",1,1044,1
+"/phylanx/access-function$0$read_x/1$9$5","access-function/read_x(9, 5)",1,520,1
+"/phylanx/access-function$1$als_explicit/3$77$5","access-function/als_explicit(77, 5)",1,197,1
+"/phylanx/access-variable$0$num_items/2$12$52","access-variable/num_items(12, 52)",1,4587,1
+"/phylanx/access-variable$1$num_users/2$13$52","access-variable/num_users(13, 52)",1,3162,1
+"/phylanx/access-variable$10$num_items/2$24$34","access-variable/num_items(24, 34)",1,9447,1
+"/phylanx/access-variable$11$num_users/2$25$34","access-variable/num_users(25, 34)",1,8263,1
+"/phylanx/access-variable$12$k/2$35$19","access-variable/k(35, 19)",4,12380,1
+"/phylanx/access-variable$13$k/2$39$56","access-variable/k(39, 56)",0,0,1
+"/phylanx/access-variable$14$u/2$39$59","access-variable/u(39, 59)",0,0,1
+"/phylanx/access-variable$15$X/2$40$48","access-variable/X(40, 48)",0,0,1
+"/phylanx/access-variable$16$Y/2$41$48","access-variable/Y(41, 48)",0,0,1
+"/phylanx/access-variable$17$YtY/2$44$27","access-variable/YtY(44, 27)",0,0,1
+"/phylanx/access-variable$18$Y/2$44$46","access-variable/Y(44, 46)",3,11721,1
+"/phylanx/access-variable$19$Y/2$44$50","access-variable/Y(44, 50)",3,5711,1
+"/phylanx/access-variable$2$num_items/2$15$49","access-variable/num_items(15, 49)",1,4020,1
+"/phylanx/access-variable$20$I_f/2$44$72","access-variable/I_f(44, 72)",3,7019,1
+"/phylanx/access-variable$21$XtX/2$45$27","access-variable/XtX(45, 27)",0,0,1
+"/phylanx/access-variable$22$X/2$45$46","access-variable/X(45, 46)",3,11147,1
+"/phylanx/access-variable$23$X/2$45$50","access-variable/X(45, 50)",3,5836,1
+"/phylanx/access-variable$24$I_f/2$45$72","access-variable/I_f(45, 72)",3,5196,1
+"/phylanx/access-variable$25$u/2$47$27","access-variable/u(47, 27)",33,57963,1
+"/phylanx/access-variable$26$num_users/2$47$31","access-variable/num_users(47, 31)",33,38660,1
+"/phylanx/access-variable$27$conf_u/2$49$35","access-variable/conf_u(49, 35)",0,0,1
+"/phylanx/access-variable$28$conf/2$49$53","access-variable/conf(49, 53)",30,46622,1
+"/phylanx/access-variable$29$u/2$49$59","access-variable/u(49, 59)",30,42801,1
+"/phylanx/access-variable$3$num_items/2$15$60","access-variable/num_items(15, 60)",1,1662,1
+"/phylanx/access-variable$30$c_u/2$50$35","access-variable/c_u(50, 35)",0,0,1
+"/phylanx/access-variable$31$conf_u/2$50$45","access-variable/conf_u(50, 45)",30,52006,1
+"/phylanx/access-variable$32$p_u/2$51$35","access-variable/p_u(51, 35)",0,0,1
+"/phylanx/access-variable$33$conf_u/2$51$45","access-variable/conf_u(51, 45)",30,161001,1
+"/phylanx/access-variable$34$A/2$52$35","access-variable/A(52, 35)",0,0,1
+"/phylanx/access-variable$35$Y/2$52$56","access-variable/Y(52, 56)",30,59893,1
+"/phylanx/access-variable$36$c_u/2$52$60","access-variable/c_u(52, 60)",30,45404,1
+"/phylanx/access-variable$37$Y/2$52$66","access-variable/Y(52, 66)",30,43646,1
+"/phylanx/access-variable$38$YtY/2$52$70","access-variable/YtY(52, 70)",30,39096,1
+"/phylanx/access-variable$39$b/2$53$35","access-variable/b(53, 35)",0,0,1
+"/phylanx/access-variable$4$num_users/2$16$49","access-variable/num_users(16, 49)",1,3057,1
+"/phylanx/access-variable$40$Y/2$53$56","access-variable/Y(53, 56)",30,63744,1
+"/phylanx/access-variable$41$c_u/2$53$60","access-variable/c_u(53, 60)",30,44793,1
+"/phylanx/access-variable$42$I_i/2$53$66","access-variable/I_i(53, 66)",30,33921,1
+"/phylanx/access-variable$43$p_u/2$53$83","access-variable/p_u(53, 83)",30,52271,1
+"/phylanx/access-variable$44$u/2$54$49","access-variable/u(54, 49)",30,56306,1
+"/phylanx/access-variable$45$u/2$54$52","access-variable/u(54, 52)",30,33181,1
+"/phylanx/access-variable$46$X/2$54$41","access-variable/X(54, 41)",0,0,1
+"/phylanx/access-variable$47$A/2$54$80","access-variable/A(54, 80)",30,50913,1
+"/phylanx/access-variable$48$b/2$54$84","access-variable/b(54, 84)",30,39454,1
+"/phylanx/access-variable$49$u/2$55$35","access-variable/u(55, 35)",0,0,1
+"/phylanx/access-variable$5$num_users/2$16$60","access-variable/num_users(16, 60)",1,1608,1
+"/phylanx/access-variable$50$u/2$55$38","access-variable/u(55, 38)",30,40770,1
+"/phylanx/access-variable$51$u/2$58$27","access-variable/u(58, 27)",0,0,1
+"/phylanx/access-variable$52$i/2$59$27","access-variable/i(59, 27)",303,325687,1
+"/phylanx/access-variable$53$num_items/2$59$31","access-variable/num_items(59, 31)",303,283614,1
+"/phylanx/access-variable$54$conf_i/2$61$35","access-variable/conf_i(61, 35)",0,0,1
+"/phylanx/access-variable$55$conf/2$61$56","access-variable/conf(61, 56)",300,384787,1
+"/phylanx/access-variable$56$i/2$61$62","access-variable/i(61, 62)",300,350383,1
+"/phylanx/access-variable$57$c_i/2$62$35","access-variable/c_i(62, 35)",0,0,1
+"/phylanx/access-variable$58$conf_i/2$62$45","access-variable/conf_i(62, 45)",300,418045,1
+"/phylanx/access-variable$59$p_i/2$63$35","access-variable/p_i(63, 35)",0,0,1
+"/phylanx/access-variable$6$num_items/2$17$49","access-variable/num_items(17, 49)",1,2975,1
+"/phylanx/access-variable$60$conf_i/2$63$45","access-variable/conf_i(63, 45)",300,461457,1
+"/phylanx/access-variable$61$A/2$64$35","access-variable/A(64, 35)",0,0,1
+"/phylanx/access-variable$62$X/2$64$56","access-variable/X(64, 56)",300,377796,1
+"/phylanx/access-variable$63$c_i/2$64$59","access-variable/c_i(64, 59)",300,296134,1
+"/phylanx/access-variable$64$X/2$64$65","access-variable/X(64, 65)",300,272057,1
+"/phylanx/access-variable$65$XtX/2$64$70","access-variable/XtX(64, 70)",300,272139,1
+"/phylanx/access-variable$66$b/2$65$35","access-variable/b(65, 35)",0,0,1
+"/phylanx/access-variable$67$X/2$65$56","access-variable/X(65, 56)",300,350833,1
+"/phylanx/access-variable$68$c_i/2$65$60","access-variable/c_i(65, 60)",300,302039,1
+"/phylanx/access-variable$69$I_u/2$65$66","access-variable/I_u(65, 66)",300,240096,1
+"/phylanx/access-variable$7$num_users/2$18$49","access-variable/num_users(18, 49)",1,4224,1
+"/phylanx/access-variable$70$p_i/2$65$83","access-variable/p_i(65, 83)",300,332486,1
+"/phylanx/access-variable$71$i/2$66$49","access-variable/i(66, 49)",300,481232,1
+"/phylanx/access-variable$72$i/2$66$52","access-variable/i(66, 52)",300,256890,1
+"/phylanx/access-variable$73$Y/2$66$41","access-variable/Y(66, 41)",0,0,1
+"/phylanx/access-variable$74$A/2$66$80","access-variable/A(66, 80)",300,338992,1
+"/phylanx/access-variable$75$b/2$66$84","access-variable/b(66, 84)",300,315154,1
+"/phylanx/access-variable$76$i/2$67$35","access-variable/i(67, 35)",0,0,1
+"/phylanx/access-variable$77$i/2$67$38","access-variable/i(67, 38)",300,328131,1
+"/phylanx/access-variable$78$i/2$70$27","access-variable/i(70, 27)",0,0,1
+"/phylanx/access-variable$79$k/2$71$27","access-variable/k(71, 27)",0,0,1
+"/phylanx/access-variable$8$num_users/2$21$40","access-variable/num_users(21, 40)",1,3222,1
+"/phylanx/access-variable$80$k/2$71$30","access-variable/k(71, 30)",3,5543,1
+"/phylanx/access-variable$81$X/2$74$18","access-variable/X(74, 18)",1,2089,1
+"/phylanx/access-variable$82$Y/2$74$21","access-variable/Y(74, 21)",1,1199,1
+"/phylanx/access-variable$9$num_items/2$22$40","access-variable/num_items(22, 40)",1,3280,1
+"/phylanx/block$0/2$7$9","block(7, 9)",1,267859219,-1
+"/phylanx/block$1/2$36$17","block(36, 17)",3,275166622,0
+"/phylanx/block$2/2$38$29","block(38, 29)",0,0,-1
+"/phylanx/block$3/2$48$25","block(48, 25)",30,56178089,0
+"/phylanx/block$4/2$60$25","block(60, 25)",300,143701608,-1
+"/phylanx/constant$0/2$12$28","constant(12, 28)",1,159837,-1
+"/phylanx/constant$1/2$13$28","constant(13, 28)",1,88691,-1
+"/phylanx/constant$2/2$15$25","constant(15, 25)",1,110741,-1
+"/phylanx/constant$3/2$16$25","constant(16, 25)",1,85221,-1
+"/phylanx/constant$4/2$17$25","constant(17, 25)",1,72723,-1
+"/phylanx/constant$5/2$18$25","constant(18, 25)",1,78013,-1
+"/phylanx/constant$6/2$30$25","constant(30, 25)",1,81129,-1
+"/phylanx/constant$7/2$31$25","constant(31, 25)",1,78394,-1
+"/phylanx/constant$8/2$32$23","constant(32, 23)",1,75361,-1
+"/phylanx/constant$9/2$33$23","constant(33, 23)",1,70534,-1
+"/phylanx/cout$0/2$39$37","cout(39, 37)",0,0,-1
+"/phylanx/cout$1/2$40$37","cout(40, 37)",0,0,-1
+"/phylanx/cout$2/2$41$37","cout(41, 37)",0,0,-1
+"/phylanx/define-variable$0$read_x/0$5$12","define-variable/read_x(5, 12)",1,8936,-1
+"/phylanx/define-variable$1$num_users/2$8$20","define-variable/num_users(8, 20)",1,215863,-1
+"/phylanx/define-variable$10$X/2$21$20","define-variable/X(21, 20)",1,245594,-1
+"/phylanx/define-variable$11$Y/2$22$20","define-variable/Y(22, 20)",1,226806,-1
+"/phylanx/define-variable$12$I_f/2$23$20","define-variable/I_f(23, 20)",1,90910,-1
+"/phylanx/define-variable$13$I_i/2$24$20","define-variable/I_i(24, 20)",1,99698,-1
+"/phylanx/define-variable$14$I_u/2$25$20","define-variable/I_u(25, 20)",1,66500,-1
+"/phylanx/define-variable$15$k/2$26$20","define-variable/k(26, 20)",1,6826,-1
+"/phylanx/define-variable$16$i/2$27$20","define-variable/i(27, 20)",1,10470,-1
+"/phylanx/define-variable$17$u/2$28$20","define-variable/u(28, 20)",1,5255,-1
+"/phylanx/define-variable$18$XtX/2$30$20","define-variable/XtX(30, 20)",1,114160,-1
+"/phylanx/define-variable$19$YtY/2$31$20","define-variable/YtY(31, 20)",1,111123,-1
+"/phylanx/define-variable$2$num_items/2$9$20","define-variable/num_items(9, 20)",1,78933,-1
+"/phylanx/define-variable$20$A/2$32$20","define-variable/A(32, 20)",1,107550,-1
+"/phylanx/define-variable$21$b/2$33$20","define-variable/b(33, 20)",1,109997,-1
+"/phylanx/define-variable$22$als_explicit/2$5$12","define-variable/als_explicit(5, 12)",1,562,-1
+"/phylanx/define-variable$3$conf/2$10$20","define-variable/conf(10, 20)",1,46196609,-1
+"/phylanx/define-variable$4$conf_u/2$12$20","define-variable/conf_u(12, 20)",1,204368,-1
+"/phylanx/define-variable$5$conf_i/2$13$20","define-variable/conf_i(13, 20)",1,126307,-1
+"/phylanx/define-variable$6$c_u/2$15$20","define-variable/c_u(15, 20)",1,142177,-1
+"/phylanx/define-variable$7$c_i/2$16$20","define-variable/c_i(16, 20)",1,119364,-1
+"/phylanx/define-variable$8$p_u/2$17$20","define-variable/p_u(17, 20)",1,103904,-1
+"/phylanx/define-variable$9$p_i/2$18$20","define-variable/p_i(18, 20)",1,111912,-1
+"/phylanx/diag$0/2$50$40","diag(50, 40)",30,747771,1
+"/phylanx/diag$1/2$62$40","diag(62, 40)",300,3173255,1
+"/phylanx/dot$0/2$44$32","dot(44, 32)",3,451323,1
+"/phylanx/dot$1/2$45$32","dot(45, 32)",3,204777,1
+"/phylanx/dot$10/2$65$42","dot(65, 42)",300,12134693,1
+"/phylanx/dot$11/2$66$68","dot(66, 68)",300,11046755,1
+"/phylanx/dot$2/2$52$38","dot(52, 38)",30,2914904,1
+"/phylanx/dot$3/2$52$42","dot(52, 42)",30,2155938,1
+"/phylanx/dot$4/2$53$38","dot(53, 38)",30,4495237,1
+"/phylanx/dot$5/2$53$42","dot(53, 42)",30,3612580,1
+"/phylanx/dot$6/2$54$68","dot(54, 68)",30,1864883,1
+"/phylanx/dot$7/2$64$38","dot(64, 38)",300,13320104,1
+"/phylanx/dot$8/2$64$42","dot(64, 42)",300,8309576,1
+"/phylanx/dot$9/2$65$38","dot(65, 38)",300,18403921,1
+"/phylanx/file_read_csv$0/0$6$15","file_read_csv(6, 15)",1,700726803,-1
+"/phylanx/function$0$read_x/0$5$12","function/read_x(5, 12)",1,700855201,1
+"/phylanx/function$1$als_explicit/2$5$12","function/als_explicit(5, 12)",1,267974504,1
+"/phylanx/identity$0/2$23$25","identity(23, 25)",1,51190,-1
+"/phylanx/identity$1/2$24$25","identity(24, 25)",1,62727,-1
+"/phylanx/identity$2/2$25$25","identity(25, 25)",1,30247,-1
+"/phylanx/if$0/2$37$21","if(37, 21)",3,74374,1
+"/phylanx/inverse$0/2$54$72","inverse(54, 72)",30,1000273,1
+"/phylanx/inverse$1/2$66$72","inverse(66, 72)",300,6253562,1
+"/phylanx/lambda$0/0$5$12","lambda(5, 12)",1,700813158,-1
+"/phylanx/lambda$1/2$5$12","lambda(5, 12)",1,267936086,-1
+"/phylanx/list$0/2$54$44","list(54, 44)",30,1159268,1
+"/phylanx/list$1/2$66$44","list(66, 44)",300,9243687,1
+"/phylanx/list$2/2$74$13","list(74, 13)",1,19688,-1
+"/phylanx/make_list$0/0$6$40","make_list(6, 40)",1,58568,-1
+"/phylanx/make_list$1/0$7$15","make_list(7, 15)",1,34731,-1
+"/phylanx/make_list$10/2$30$39","make_list(30, 39)",1,29022,-1
+"/phylanx/make_list$11/2$31$39","make_list(31, 39)",1,26585,-1
+"/phylanx/make_list$12/2$32$37","make_list(32, 37)",1,26032,-1
+"/phylanx/make_list$13/2$33$37","make_list(33, 37)",1,20310,-1
+"/phylanx/make_list$2/2$12$42","make_list(12, 42)",1,30240,-1
+"/phylanx/make_list$3/2$13$42","make_list(13, 42)",1,24440,-1
+"/phylanx/make_list$4/2$15$39","make_list(15, 39)",1,34843,-1
+"/phylanx/make_list$5/2$16$39","make_list(16, 39)",1,32092,-1
+"/phylanx/make_list$6/2$17$39","make_list(17, 39)",1,21760,-1
+"/phylanx/make_list$7/2$18$39","make_list(18, 39)",1,23905,-1
+"/phylanx/make_list$8/2$21$30","make_list(21, 30)",1,32517,-1
+"/phylanx/make_list$9/2$22$30","make_list(22, 30)",1,30400,-1
+"/phylanx/random$0/2$21$23","random(21, 23)",1,211243,-1
+"/phylanx/random$1/2$22$23","random(22, 23)",1,199446,-1
+"/phylanx/set_seed$0/2$20$13","set_seed(20, 13)",1,244026,-1
+"/phylanx/shape$0/2$8$31","shape(8, 31)",1,95177,-1
+"/phylanx/shape$1/2$9$31","shape(9, 31)",1,28443,-1
+"/phylanx/slice$0/0$6$9","slice(6, 9)",1,700747090,-1
+"/phylanx/slice_column$0/2$61$43","slice_column(61, 43)",300,6861679,1
+"/phylanx/slice_row$0/2$49$43","slice_row(49, 43)",30,835425,1
+"/phylanx/store$0/2$44$21","store(44, 21)",3,668609,1
+"/phylanx/store$1/2$45$21","store(45, 21)",3,415095,1
+"/phylanx/store$10/2$61$29","store(61, 29)",300,15252577,1
+"/phylanx/store$11/2$62$29","store(62, 29)",300,9425952,1
+"/phylanx/store$12/2$63$29","store(63, 29)",300,9677825,1
+"/phylanx/store$13/2$64$29","store(64, 29)",300,24970065,1
+"/phylanx/store$14/2$65$29","store(65, 29)",300,24692187,1
+"/phylanx/store$15/2$66$29","store(66, 29)",300,31795808,1
+"/phylanx/store$16/2$67$29","store(67, 29)",300,11677842,1
+"/phylanx/store$17/2$70$21","store(70, 21)",3,88345,1
+"/phylanx/store$18/2$71$21","store(71, 21)",3,57638665,0
+"/phylanx/store$2/2$49$29","store(49, 29)",30,1830628,1
+"/phylanx/store$3/2$50$29","store(50, 29)",30,1653391,1
+"/phylanx/store$4/2$51$29","store(51, 29)",30,32601127,0
+"/phylanx/store$5/2$52$29","store(52, 29)",30,4563774,1
+"/phylanx/store$6/2$53$29","store(53, 29)",30,5472070,1
+"/phylanx/store$7/2$54$29","store(54, 29)",30,4432226,1
+"/phylanx/store$8/2$55$29","store(55, 29)",30,2817748,1
+"/phylanx/store$9/2$58$21","store(58, 21)",3,84777,1
+"/phylanx/transpose$0/2$44$36","transpose(44, 36)",3,81446,1
+"/phylanx/transpose$1/2$45$36","transpose(45, 36)",3,48107,1
+"/phylanx/transpose$2/2$52$46","transpose(52, 46)",30,534996,1
+"/phylanx/transpose$3/2$53$46","transpose(53, 46)",30,419282,1
+"/phylanx/transpose$4/2$53$73","transpose(53, 73)",30,316431,1
+"/phylanx/transpose$5/2$64$46","transpose(64, 46)",300,3554226,1
+"/phylanx/transpose$6/2$65$46","transpose(65, 46)",300,2807089,1
+"/phylanx/transpose$7/2$65$73","transpose(65, 73)",300,2238965,1
+"/phylanx/variable$0$num_users/2$8$20","variable/num_users(8, 20)",39,14737,1
+"/phylanx/variable$1$num_items/2$9$20","variable/num_items(9, 20)",309,79906,1
+"/phylanx/variable$10$Y/2$22$20","variable/Y(22, 20)",97,65031,1
+"/phylanx/variable$11$I_f/2$23$20","variable/I_f(23, 20)",6,4300,1
+"/phylanx/variable$12$I_i/2$24$20","variable/I_i(24, 20)",30,10925,1
+"/phylanx/variable$13$I_u/2$25$20","variable/I_u(25, 20)",300,77316,1
+"/phylanx/variable$14$k/2$26$20","variable/k(26, 20)",7,4473,1
+"/phylanx/variable$15$i/2$27$20","variable/i(27, 20)",1503,596987,1
+"/phylanx/variable$16$u/2$28$20","variable/u(28, 20)",153,79494,1
+"/phylanx/variable$17$XtX/2$30$20","variable/XtX(30, 20)",300,90619,1
+"/phylanx/variable$18$YtY/2$31$20","variable/YtY(31, 20)",30,13318,1
+"/phylanx/variable$19$A/2$32$20","variable/A(32, 20)",330,141766,1
+"/phylanx/variable$2$conf/2$10$20","variable/conf(10, 20)",330,191618,1
+"/phylanx/variable$20$b/2$33$20","variable/b(33, 20)",330,126289,1
+"/phylanx/variable$3$conf_u/2$12$20","variable/conf_u(12, 20)",60,51318,1
+"/phylanx/variable$4$conf_i/2$13$20","variable/conf_i(13, 20)",600,290690,1
+"/phylanx/variable$5$c_u/2$15$20","variable/c_u(15, 20)",60,31116,1
+"/phylanx/variable$6$c_i/2$16$20","variable/c_i(16, 20)",600,214435,1
+"/phylanx/variable$7$p_u/2$17$20","variable/p_u(17, 20)",30,20759,1
+"/phylanx/variable$8$p_i/2$18$20","variable/p_i(18, 20)",300,128101,1
+"/phylanx/variable$9$X/2$21$20","variable/X(21, 20)",907,383102,1
+"/phylanx/while$0/2$35$13","while(35, 13)",1,218106852,-1
+"/phylanx/while$1/2$47$21","while(47, 21)",3,56647724,0
+"/phylanx/while$2/2$59$21","while(59, 21)",3,159182428,0
\ No newline at end of file
diff --git a/static/weekly-data/2019-01-10-als-tree.txt b/static/weekly-data/2019-01-10-als-tree.txt
new file mode 100755
index 0000000..fa3fbd7
--- /dev/null
+++ b/static/weekly-data/2019-01-10-als-tree.txt
@@ -0,0 +1 @@
+(((((((/phylanx/access-argument$5$ratings/2$8$37) /phylanx/shape$0/2$8$31) /phylanx/variable$0$num_users/2$8$20) /phylanx/define-variable$1$num_users/2$8$20,(((/phylanx/access-argument$6$ratings/2$9$37) /phylanx/shape$1/2$9$31) /phylanx/variable$1$num_items/2$9$20) /phylanx/define-variable$2$num_items/2$9$20,(((/phylanx/access-argument$7$alpha/2$10$26,/phylanx/access-argument$8$ratings/2$10$34) /phylanx/__mul$0/2$10$26) /phylanx/variable$2$conf/2$10$20) /phylanx/define-variable$3$conf/2$10$20,((((/phylanx/access-variable$0$num_items/2$12$52) /phylanx/make_list$2/2$12$42) /phylanx/constant$0/2$12$28) /phylanx/variable$3$conf_u/2$12$20) /phylanx/define-variable$4$conf_u/2$12$20,((((/phylanx/access-variable$1$num_users/2$13$52) /phylanx/make_list$3/2$13$42) /phylanx/constant$1/2$13$28) /phylanx/variable$4$conf_i/2$13$20) /phylanx/define-variable$5$conf_i/2$13$20,((((/phylanx/access-variable$2$num_items/2$15$49,/phylanx/access-variable$3$num_items/2$15$60) /phylanx/make_list$4/2$15$39) /phylanx/constant$2/2$15$25) /phylanx/variable$5$c_u/2$15$20) /phylanx/define-variable$6$c_u/2$15$20,((((/phylanx/access-variable$4$num_users/2$16$49,/phylanx/access-variable$5$num_users/2$16$60) /phylanx/make_list$5/2$16$39) /phylanx/constant$3/2$16$25) /phylanx/variable$6$c_i/2$16$20) /phylanx/define-variable$7$c_i/2$16$20,((((/phylanx/access-variable$6$num_items/2$17$49) /phylanx/make_list$6/2$17$39) /phylanx/constant$4/2$17$25) /phylanx/variable$7$p_u/2$17$20) /phylanx/define-variable$8$p_u/2$17$20,((((/phylanx/access-variable$7$num_users/2$18$49) /phylanx/make_list$7/2$18$39) /phylanx/constant$5/2$18$25) /phylanx/variable$8$p_i/2$18$20) /phylanx/define-variable$9$p_i/2$18$20,/phylanx/set_seed$0/2$20$13,((((/phylanx/access-variable$8$num_users/2$21$40,/phylanx/access-argument$9$num_factors/2$21$51) /phylanx/make_list$8/2$21$30) /phylanx/random$0/2$21$23) /phylanx/variable$9$X/2$21$20) /phylanx/define-variable$10$X/2$21$20,((((/phylanx/access-variable$9$num_items/2$22$40,/phylanx/access-argument$10$num_factors/2$22$51) /phylanx/make_list$9/2$22$30) /phylanx/random$1/2$22$23) /phylanx/variable$10$Y/2$22$20) /phylanx/define-variable$11$Y/2$22$20,(((/phylanx/access-argument$11$num_factors/2$23$34) /phylanx/identity$0/2$23$25) /phylanx/variable$11$I_f/2$23$20) /phylanx/define-variable$12$I_f/2$23$20,(((/phylanx/access-variable$10$num_items/2$24$34) /phylanx/identity$1/2$24$25) /phylanx/variable$12$I_i/2$24$20) /phylanx/define-variable$13$I_i/2$24$20,(((/phylanx/access-variable$11$num_users/2$25$34) /phylanx/identity$2/2$25$25) /phylanx/variable$13$I_u/2$25$20) /phylanx/define-variable$14$I_u/2$25$20,(/phylanx/variable$14$k/2$26$20) /phylanx/define-variable$15$k/2$26$20,(/phylanx/variable$15$i/2$27$20) /phylanx/define-variable$16$i/2$27$20,(/phylanx/variable$16$u/2$28$20) /phylanx/define-variable$17$u/2$28$20,((((/phylanx/access-argument$12$num_factors/2$30$49,/phylanx/access-argument$13$num_factors/2$30$62) /phylanx/make_list$10/2$30$39) /phylanx/constant$6/2$30$25) /phylanx/variable$17$XtX/2$30$20) /phylanx/define-variable$18$XtX/2$30$20,((((/phylanx/access-argument$14$num_factors/2$31$49,/phylanx/access-argument$15$num_factors/2$31$62) /phylanx/make_list$11/2$31$39) /phylanx/constant$7/2$31$25) /phylanx/variable$18$YtY/2$31$20) /phylanx/define-variable$19$YtY/2$31$20,((((/phylanx/access-argument$16$num_factors/2$32$47,/phylanx/access-argument$17$num_factors/2$32$60) /phylanx/make_list$12/2$32$37) /phylanx/constant$8/2$32$23) /phylanx/variable$19$A/2$32$20) /phylanx/define-variable$20$A/2$32$20,((((/phylanx/access-argument$18$num_factors/2$33$47) /phylanx/make_list$13/2$33$37) /phylanx/constant$9/2$33$23) /phylanx/variable$20$b/2$33$20) /phylanx/define-variable$21$b/2$33$20,((/phylanx/access-variable$12$k/2$35$19,/phylanx/access-argument$19$iterations/2$35$23) /phylanx/__lt$0/2$35$19,((/phylanx/access-argument$20$enable_output/2$37$24,((/phylanx/access-variable$13$k/2$39$56,/phylanx/access-variable$14$u/2$39$59) /phylanx/cout$0/2$39$37,(/phylanx/access-variable$15$X/2$40$48) /phylanx/cout$1/2$40$37,(/phylanx/access-variable$16$Y/2$41$48) /phylanx/cout$2/2$41$37) /phylanx/block$2/2$38$29) /phylanx/if$0/2$37$21,(/phylanx/access-variable$17$YtY/2$44$27,(((/phylanx/access-variable$18$Y/2$44$46) /phylanx/transpose$0/2$44$36,/phylanx/access-variable$19$Y/2$44$50) /phylanx/dot$0/2$44$32,(/phylanx/access-argument$21$regularization/2$44$55,/phylanx/access-variable$20$I_f/2$44$72) /phylanx/__mul$1/2$44$55) /phylanx/__add$0/2$44$32) /phylanx/store$0/2$44$21,(/phylanx/access-variable$21$XtX/2$45$27,(((/phylanx/access-variable$22$X/2$45$46) /phylanx/transpose$1/2$45$36,/phylanx/access-variable$23$X/2$45$50) /phylanx/dot$1/2$45$32,(/phylanx/access-argument$22$regularization/2$45$55,/phylanx/access-variable$24$I_f/2$45$72) /phylanx/__mul$2/2$45$55) /phylanx/__add$1/2$45$32) /phylanx/store$1/2$45$21,((/phylanx/access-variable$25$u/2$47$27,/phylanx/access-variable$26$num_users/2$47$31) /phylanx/__lt$1/2$47$27,((/phylanx/access-variable$27$conf_u/2$49$35,(/phylanx/access-variable$28$conf/2$49$53,/phylanx/access-variable$29$u/2$49$59) /phylanx/slice_row$0/2$49$43) /phylanx/store$2/2$49$29,(/phylanx/access-variable$30$c_u/2$50$35,(/phylanx/access-variable$31$conf_u/2$50$45) /phylanx/diag$0/2$50$40) /phylanx/store$3/2$50$29,(/phylanx/access-variable$32$p_u/2$51$35,(/phylanx/access-variable$33$conf_u/2$51$45) /phylanx/__ne$0/2$51$40) /phylanx/store$4/2$51$29,(/phylanx/access-variable$34$A/2$52$35,((((/phylanx/access-variable$35$Y/2$52$56) /phylanx/transpose$2/2$52$46,/phylanx/access-variable$36$c_u/2$52$60) /phylanx/dot$3/2$52$42,/phylanx/access-variable$37$Y/2$52$66) /phylanx/dot$2/2$52$38,/phylanx/access-variable$38$YtY/2$52$70) /phylanx/__add$2/2$52$38) /phylanx/store$5/2$52$29,(/phylanx/access-variable$39$b/2$53$35,(((/phylanx/access-variable$40$Y/2$53$56) /phylanx/transpose$3/2$53$46,(/phylanx/access-variable$41$c_u/2$53$60,/phylanx/access-variable$42$I_i/2$53$66) /phylanx/__add$3/2$53$60) /phylanx/dot$5/2$53$42,(/phylanx/access-variable$43$p_u/2$53$83) /phylanx/transpose$4/2$53$73) /phylanx/dot$4/2$53$38) /phylanx/store$6/2$53$29,(/phylanx/access-variable$46$X/2$54$41,((/phylanx/access-variable$47$A/2$54$80) /phylanx/inverse$0/2$54$72,/phylanx/access-variable$48$b/2$54$84) /phylanx/dot$6/2$54$68) /phylanx/store$7/2$54$29,(/phylanx/access-variable$49$u/2$55$35,(/phylanx/access-variable$50$u/2$55$38) /phylanx/__add$5/2$55$38) /phylanx/store$8/2$55$29) /phylanx/block$3/2$48$25) /phylanx/while$1/2$47$21,(/phylanx/access-variable$51$u/2$58$27) /phylanx/store$9/2$58$21,((/phylanx/access-variable$52$i/2$59$27,/phylanx/access-variable$53$num_items/2$59$31) /phylanx/__lt$2/2$59$27,((/phylanx/access-variable$54$conf_i/2$61$35,(/phylanx/access-variable$55$conf/2$61$56,/phylanx/access-variable$56$i/2$61$62) /phylanx/slice_column$0/2$61$43) /phylanx/store$10/2$61$29,(/phylanx/access-variable$57$c_i/2$62$35,(/phylanx/access-variable$58$conf_i/2$62$45) /phylanx/diag$1/2$62$40) /phylanx/store$11/2$62$29,(/phylanx/access-variable$59$p_i/2$63$35,(/phylanx/access-variable$60$conf_i/2$63$45) /phylanx/__ne$1/2$63$40) /phylanx/store$12/2$63$29,(/phylanx/access-variable$61$A/2$64$35,((((/phylanx/access-variable$62$X/2$64$56) /phylanx/transpose$5/2$64$46,/phylanx/access-variable$63$c_i/2$64$59) /phylanx/dot$8/2$64$42,/phylanx/access-variable$64$X/2$64$65) /phylanx/dot$7/2$64$38,/phylanx/access-variable$65$XtX/2$64$70) /phylanx/__add$6/2$64$38) /phylanx/store$13/2$64$29,(/phylanx/access-variable$66$b/2$65$35,(((/phylanx/access-variable$67$X/2$65$56) /phylanx/transpose$6/2$65$46,(/phylanx/access-variable$68$c_i/2$65$60,/phylanx/access-variable$69$I_u/2$65$66) /phylanx/__add$7/2$65$60) /phylanx/dot$10/2$65$42,(/phylanx/access-variable$70$p_i/2$65$83) /phylanx/transpose$7/2$65$73) /phylanx/dot$9/2$65$38) /phylanx/store$14/2$65$29,(/phylanx/access-variable$73$Y/2$66$41,((/phylanx/access-variable$74$A/2$66$80) /phylanx/inverse$1/2$66$72,/phylanx/access-variable$75$b/2$66$84) /phylanx/dot$11/2$66$68) /phylanx/store$15/2$66$29,(/phylanx/access-variable$76$i/2$67$35,(/phylanx/access-variable$77$i/2$67$38) /phylanx/__add$9/2$67$38) /phylanx/store$16/2$67$29) /phylanx/block$4/2$60$25) /phylanx/while$2/2$59$21,(/phylanx/access-variable$78$i/2$70$27) /phylanx/store$17/2$70$21,(/phylanx/access-variable$79$k/2$71$27,(/phylanx/access-variable$80$k/2$71$30) /phylanx/__add$10/2$71$30) /phylanx/store$18/2$71$21) /phylanx/block$1/2$36$17) /phylanx/while$0/2$35$13,(/phylanx/access-variable$81$X/2$74$18,/phylanx/access-variable$82$Y/2$74$21) /phylanx/list$2/2$74$13) /phylanx/block$0/2$7$9) /phylanx/lambda$1/2$5$12) /phylanx/function$1$als_explicit/2$5$12) als;
\ No newline at end of file
diff --git a/static/weekly-data/2019-01-17-als-perfdata.csv b/static/weekly-data/2019-01-17-als-perfdata.csv
new file mode 100644
index 0000000..77ea9b2
--- /dev/null
+++ b/static/weekly-data/2019-01-17-als-perfdata.csv
@@ -0,0 +1,270 @@
+primitive_instance,display_name,count,time,eval_direct
+"/phylanx/__add$0/2$44$32","add(44, 32)",3,642328,1
+"/phylanx/__add$1/2$45$32","add(45, 32)",3,375069,1
+"/phylanx/__add$10/2$71$30","add(71, 30)",3,56195,1
+"/phylanx/__add$2/2$52$38","add(52, 38)",30,3691754,1
+"/phylanx/__add$3/2$53$60","add(53, 60)",30,1536680,1
+"/phylanx/__add$4/2$54$52","add(54, 52)",30,437661,1
+"/phylanx/__add$5/2$55$38","add(55, 38)",30,450044,1
+"/phylanx/__add$6/2$64$38","add(64, 38)",300,19446873,1
+"/phylanx/__add$7/2$65$60","add(65, 60)",300,4908812,1
+"/phylanx/__add$8/2$66$52","add(66, 52)",300,3162566,1
+"/phylanx/__add$9/2$67$38","add(67, 38)",300,3423066,1
+"/phylanx/__lt$0/2$35$19","lt(35, 19)",4,209564,1
+"/phylanx/__lt$1/2$47$27","lt(47, 27)",33,768667,1
+"/phylanx/__lt$2/2$59$27","lt(59, 27)",303,5310367,1
+"/phylanx/__mul$0/2$10$26","mul(10, 26)",1,189297,-1
+"/phylanx/__mul$1/2$44$55","mul(44, 55)",3,101966,1
+"/phylanx/__mul$2/2$45$55","mul(45, 55)",3,91213,1
+"/phylanx/__ne$0/2$51$40","ne(51, 40)",30,649599,1
+"/phylanx/__ne$1/2$63$40","ne(63, 40)",300,4035775,1
+"/phylanx/access-argument$0$filepath/0$6$29","access-argument/filepath(6, 29)",1,800,1
+"/phylanx/access-argument$1$row_start/0$6$50","access-argument/row_start(6, 50)",1,4695,1
+"/phylanx/access-argument$10$num_factors/2$22$51","access-argument/num_factors(22, 51)",1,873,1
+"/phylanx/access-argument$11$num_factors/2$23$34","access-argument/num_factors(23, 34)",1,5503,1
+"/phylanx/access-argument$12$num_factors/2$30$49","access-argument/num_factors(30, 49)",1,1256,1
+"/phylanx/access-argument$13$num_factors/2$30$62","access-argument/num_factors(30, 62)",1,343,1
+"/phylanx/access-argument$14$num_factors/2$31$49","access-argument/num_factors(31, 49)",1,1180,1
+"/phylanx/access-argument$15$num_factors/2$31$62","access-argument/num_factors(31, 62)",1,286,1
+"/phylanx/access-argument$16$num_factors/2$32$47","access-argument/num_factors(32, 47)",1,834,1
+"/phylanx/access-argument$17$num_factors/2$32$60","access-argument/num_factors(32, 60)",1,370,1
+"/phylanx/access-argument$18$num_factors/2$33$47","access-argument/num_factors(33, 47)",1,1534,1
+"/phylanx/access-argument$19$iterations/2$35$23","access-argument/iterations(35, 23)",4,2892,1
+"/phylanx/access-argument$2$row_stop/0$6$62","access-argument/row_stop(6, 62)",1,543,1
+"/phylanx/access-argument$20$enable_output/2$37$24","access-argument/enable_output(37, 24)",3,2695,1
+"/phylanx/access-argument$21$regularization/2$44$55","access-argument/regularization(44, 55)",3,1958,1
+"/phylanx/access-argument$22$regularization/2$45$55","access-argument/regularization(45, 55)",3,2684,1
+"/phylanx/access-argument$3$col_start/0$7$25","access-argument/col_start(7, 25)",1,674,1
+"/phylanx/access-argument$4$col_stop/0$7$37","access-argument/col_stop(7, 37)",1,198,1
+"/phylanx/access-argument$5$ratings/2$8$37","access-argument/ratings(8, 37)",1,1834,1
+"/phylanx/access-argument$6$ratings/2$9$37","access-argument/ratings(9, 37)",1,1112,1
+"/phylanx/access-argument$7$alpha/2$10$26","access-argument/alpha(10, 26)",1,806,1
+"/phylanx/access-argument$8$ratings/2$10$34","access-argument/ratings(10, 34)",1,529,1
+"/phylanx/access-argument$9$num_factors/2$21$51","access-argument/num_factors(21, 51)",1,1334,1
+"/phylanx/access-function$0$read_x/1$9$5","access-function/read_x(9, 5)",1,412,1
+"/phylanx/access-function$1$als_explicit/3$77$5","access-function/als_explicit(77, 5)",1,174,1
+"/phylanx/access-variable$0$num_items/2$12$52","access-variable/num_items(12, 52)",1,5393,1
+"/phylanx/access-variable$1$num_users/2$13$52","access-variable/num_users(13, 52)",1,3813,1
+"/phylanx/access-variable$10$num_items/2$24$34","access-variable/num_items(24, 34)",1,9200,1
+"/phylanx/access-variable$11$num_users/2$25$34","access-variable/num_users(25, 34)",1,8417,1
+"/phylanx/access-variable$12$k/2$35$19","access-variable/k(35, 19)",4,12601,1
+"/phylanx/access-variable$13$k/2$39$56","access-variable/k(39, 56)",0,0,1
+"/phylanx/access-variable$14$u/2$39$59","access-variable/u(39, 59)",0,0,1