Recently GPH was installed on my Universities beowulf cluster. PVM3 is
installed (as well as Lam MPI). Ghc appears to be correctly installed; it
compiles non-parallel programs fine. However when I try to compile (for
example) the fibonacci function given in the documentation it fails.
The file is parallelfib:
import Parallel
nfib :: Int -> Int
nfib n | n <= 1 = 1
| otherwise = n1 `par` (n2 `seq` (n1 + n2 + 1))
where
n1 = nfib (n-1)
n2 = nfib (n-2)
main = putStr (show (nfib 30))
Given the command:
ghc -parallel -O -o p parallelfib.hs
The result is:
parallelfib.hs:2: Could not find valid interface file `Prelude'
parallelfib.hs:2: Could not find valid interface file `Parallel'
Compilation had errors
Given the command:
ghc -O -o p parallelfib.hs
The result is:
parallelfib.hs:2: Could not find valid interface file `Parallel'
Compilation had errors
I have done a bit of looking around and it appears that Parallel.hi is in
the /usr/lib/ghc-4.06/imports/concurrent directory. Is this where is should
be?
I am not sure how to get ghc to find Parallel.hs so that I can use it to
write programs which use pvm. It would be greatly appreciated if replys are
CC'd to this email address since I am not on this mailing list.
Thanks,
Ben.