To implement multi-GPU stencil computation using Accelerate

Takayuki Muranushi nushio at yukawa.kyoto-u.ac.jp
Fri Jul 8 16:52:01 BST 2011


Hi, and thank you.

Sorry for my lazy response. I was devoted into necromancy last month :
http://www.icfpcontest.org/ .
I'm now trying accelerate step by step.

while trying -fpcache option in accelerate, I got the following error.

========================
Loading package fclabels-0.11.1.1 ... linking ... done.
Loading package extensible-exceptions-0.1.1.2 ... linking ... done.
Loading package cuda-0.3.2.2 ... linking ... done.
Loading package binary-0.5.0.2 ... linking ... done.
Loading package ffi-1.0 ... linking ... done.

Data/Array/Accelerate/CUDA/State.hs:133:11: Not in scope: `</>'

Data/Array/Accelerate/CUDA/State.hs:134:10:
    Not in scope: `createDirectoryIfMissing'

Data/Array/Accelerate/CUDA/State.hs:134:47:
    Not in scope: `canonicalizePath'

Data/Array/Accelerate/CUDA/State.hs:135:15: Not in scope: `</>'

Data/Array/Accelerate/CUDA/State.hs:156:8:
    Not in scope: `doesFileExist'

Data/Array/Accelerate/CUDA/State.hs:161:70:
    Not in scope: `replaceExtension'

========================


This is probably because Data/Array/Accelerate/CUDA/State.hs lacked
the following imports.

========================
import System.FilePath
import System.Directory
========================

I also needed to modify the
unless cached $
from the function `build' to make accelerate generate cache every time.
========================
build :: String -> OpenAcc aenv a -> [AccBinding aenv] -> CIO (AccKernel a)
build name acc fvar =
  let key = accToKey acc
  in do
    liftIO $ hPutStr stderr "build"
    mvar   <- liftIO newEmptyMVar
    table  <- getM kernelTable
    cached <- isJust `fmap` liftIO (Hash.lookup table key)
    unless cached $ compile table key acc fvar
    return . (name,) . liftIO $ memo mvar (link table key)
========================




-- 
MURANUSHI Takayuki
The Hakubi Center, Kyoto University : http://www.hakubi.kyoto-u.ac.jp/



More information about the Accelerate mailing list