real: enable linear
authorMichal Terepeta <michal.terepeta@gmail.com>
Mon, 13 Mar 2017 22:31:50 +0000 (18:31 -0400)
committerBen Gamari <ben@smart-cactus.org>
Mon, 13 Mar 2017 23:44:06 +0000 (19:44 -0400)
This also tweaks a parameter in the benchmark so that it takes a
reasonable amount of time to run ( ~1.1s on my machine) and adds
the `.stdout` file. The `Makefile` required some tweaking to make sure
that the modules are compiled in the right order.

Signed-off-by: Michal Terepeta <michal.terepeta@gmail.com>
Test Plan: compile & run nofib

Reviewers: bgamari

Reviewed By: bgamari

Differential Revision: https://phabricator.haskell.org/D3157

real/Makefile
real/linear/Main.lhs
real/linear/Makefile
real/linear/linear.stdout [new file with mode: 0644]

index b3f1f87..11e98aa 100644 (file)
@@ -2,10 +2,10 @@ TOP = ..
 include $(TOP)/mk/boilerplate.mk
 
 SUBDIRS = anna bspt cacheprof compress compress2 fem fluid fulsom gamteb gg \
-          grep hidden hpg infer lift maillist mkhprog parser pic prolog \
+          grep hidden hpg infer lift linear maillist mkhprog parser pic prolog \
           reptile rsa scs symalg veritas
 
-OTHER_SUBDIRS = PolyGP linear rx
+OTHER_SUBDIRS = PolyGP rx
 
 include $(TOP)/mk/target.mk
 
index 37b7e48..7bf0eca 100644 (file)
@@ -129,7 +129,7 @@ main resps
 \begin{code}
 main = putStr result
           where
-          result = test bilu test_data 4 conv2
+          result = test bilu test_data 16 conv2
 
 test_data = hard_data 
 
index cf44ea3..dee7f12 100644 (file)
@@ -1,5 +1,11 @@
 TOP = ../..
 include $(TOP)/mk/boilerplate.mk
 -include opts.mk
+# It's necessary to specify the HS_SRCS so that the current make-based system
+# compiles the modules in the right order (otherwise it starts with AbsCg, which
+# fails due to missing .hi files)
+# TODO(michalt): This should go away once we switch to the Shake-based system
+HS_SRCS = Utils.lhs Misc.lhs Densematrix.lhs AbsDensematrix.lhs Matrix.lhs Cg.lhs Input.lhs Matlib.lhs Absmatlib.lhs AbsCg.lhs Main.lhs
+
 include $(TOP)/mk/target.mk
 
diff --git a/real/linear/linear.stdout b/real/linear/linear.stdout
new file mode 100644 (file)
index 0000000..b2ab958
--- /dev/null
@@ -0,0 +1,56 @@
+START
+Iteration   norm (x-soln)   norm r  
+=========   =============   ======= 
+    0                       1024.0                   332.47906
+    1                    487.77692                   320.67267
+    2                     380.0222                   7.2986073
+    3                    89.108864                   2.6207294
+    4                     92.27595                   2.0028818
+    5                    56.788265                   0.9246741
+    6                    48.743073                   0.7287846
+    7                    40.723335                  0.49839145
+    8                    25.916683                  0.22327241
+    9                    25.981207                  0.22294453
+   10                    21.511564                  0.12464476
+   11                    18.227795                 8.796385e-2
+   12                    18.504082                 7.399316e-2
+   13                     16.93208                2.9566484e-2
+   14                    16.300467                2.7726116e-2
+   15                    18.767685                1.8923977e-2
+   16                    17.218872                1.5457665e-2
+   17                    17.826754                1.5359238e-2
+   18                     18.14604                 1.179346e-2
+   19                    17.047215                1.1319233e-2
+   20                    18.234877                1.1098935e-2
+   21                     17.02114                 9.928966e-3
+   22                     9.368839                7.1590673e-3
+   23                     9.379931                 6.936198e-3
+   24                    6.0347986                4.5933104e-3
+   25                    3.6565864                3.2746575e-3
+   26                    3.6596847                3.0588645e-3
+   27                    2.2099524                 1.649105e-3
+   28                    1.8611239                1.4196584e-3
+   29                    1.9219794                1.3830797e-3
+   30                    1.6037003                9.4637414e-4
+   31                    1.3180441                7.9798966e-4
+   32                    1.3740739                7.7578315e-4
+   33                     1.251271                  6.54156e-4
+   34                   0.88109696                 5.174503e-4
+   35                   0.89911026                 5.157987e-4
+   36                   0.73470736                4.4457804e-4
+   37                   0.37132028                3.0794018e-4
+   38                     0.377424                3.0732254e-4
+   39                   0.42432526                 2.877599e-4
+   40                   0.41230243                2.6800556e-4
+   41                   0.43262625                2.6495897e-4
+   42                   0.43946514                2.4427296e-4
+   43                   0.41381273                2.3941029e-4
+   44                   0.43486106                2.3694332e-4
+   45                    0.3935155                 2.138149e-4
+   46                   0.36464012                2.1057764e-4
+   47                   0.37146172                2.0192607e-4
+   48                   0.32298154                1.8111535e-4
+   49                    0.2705077                1.7049188e-4
+
+
+END
\ No newline at end of file