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!!
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.
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
27 % ReadNative test_data
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
36 to look at the vector components, and
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.
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:
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.
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
64 Thanks, and good luck!