[project @ 2000-09-06 10:23:52 by simonmar]
[ghc-hetmet.git] / ghc / tests / programs / dmgob_native1 / BugReport
1 Hi,
2
3 -- The Good News --
4
5 I was able to compile my suite of programs for training phonetic
6 hidden Markov models for speech recognizers using ghc.  The first
7 program in the suite produced the same output as hbc, but with a
8 reduction in run time of 35%.  Yeah!!
9
10
11 -- The Bad News --
12
13 The second program in the suite, the one that runs for 21 hours on an
14 unloaded Sparc 10 (compiled with hbc -O) doesn't work.
15
16 There appears to be a bug somewhere in your code for reading "Native"
17 binary data.  I don't know what the source of the error is, but here
18 is a simpler program that shows the problem.  I am sending you a C
19 program for generating a binary test data file (called "test_data")
20 and a Haskell program to read it and display the contents.  Here are
21 the steps:
22
23 % make
24
25 % generate_vectors
26
27 % ReadNative test_data
28
29
30 If you look at the code for generate_vectors, it will be obvious that
31 the program ReadNative is NOT reading the vectors properly :-( You can
32 do
33
34         % od -fv test_data
35
36 to look at the vector components, and 
37
38         % od -fd test_data
39
40 to see the dimensions.  If you do, you'll notice that the output of
41 ReadNative makes it look like there's an offset of 8 bytes.
42
43
44 -- An observation --
45
46 I don't know if this is the source of the error, but your definition
47 of ``hasNElems'' in Native.hs has an ambiguous case:
48
49         hasNElems 0 []
50
51 is assigned True by the first def and would be assigned False by the
52 6th definition.  I know that the first def will be picked, but this
53 overlap makes me wonder if there is a flaw in the logic that has
54 something to do with the problem.
55
56
57 -- The Begging --
58
59 Here's hoping you can find and squash this one; if I get a 35%
60 reduction on this second program, my 21 hour job will finish in less
61 than 14 hours!  Until this is fixed, though, I can't even run the
62 second program.
63
64 Thanks, and good luck!
65
66 dave goblirsch