-
Notifications
You must be signed in to change notification settings - Fork 119
Installing Accelerate CUDA on Windows
mikestout edited this page Jul 4, 2013
·
2 revisions
The following steps should install Accelerate-CUDA on Windows.
Please contact us if you have find any problems with this procedure.
### Get MingW and Msys
# From: http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/
# Install MingW and Msys and start a msys (bash) console
# Start msys
### Get Nvidia Tookkit and Drivers
# From https://developer.nvidia.com/cuda-downloads
# Download cuda_5.0.35_winvista_win7_win8_general_64-3.msi (c 1Gb!)
# Install Nvidia Toolkit v5.0
# NB install this into c:\CUDA
### Setup the dlls
# Not yet tried the 64bit versions....
# Maybe able to get away with just symbolic links ...
cp /c/Windows/SysWOW64/nvcuda.dll /c/CUDA/v5.0/lib/Win32/cuda.dll
cp /c/CUDA/v5.0/bin/cudart32_50_35.dll /c/CUDA/v5.0/lib/Win32/cudart.dll
cp /c/CUDA/v5.0/bin/cufft32_50_35.dll /c/CUDA/v5.0/lib/cufft.dll
### Setup Environment
export CXX=/c/MinGW/bin/c++.exe
export PATH=/c/MinGW/bin/:/c/CUDA/v5.0/bin:$PATH
### Install Mainland CUDA Package
git clone https://github.com/mainland/cuda.git
cd cuda
# NB needs TMDs patches of 1.7.2013 to various hs files
# eg check that Foreign/CUDA/Driver/Context.chs line 54 reads deriving (Eq, Show)
./autoconf
cabal install --extra-include-dirs=/c/CUDA/v5.0/include/ --extra-lib-dirs=/c/CUDA/v5.0/lib/Win32/ --force-reinstalls --reinstall
cd ..
### Install Accelerate-CUDA
cabal unpack accelerate-cuda
cd ../accelerate-cuda-0.13.0.3/
# Edit accelerate-cuda.cabal thus: cuda >= 0.5 && \lte; 6.0
# Also needs recent edits to process calls in Compile.hs this
# Comment out lines 537 - 544
# Line 474: pid 'lt;'- return 9999 -- getProcessID
# Line 512: change to "waitForProcess pid"
mkdir -p /tmp/accelerate-cuda-9999
cabal install --extra-include-dirs=/c/CUDA/v5.0/include/ --extra-lib-dirs=/c/CUDA/v5.0/lib/Win32/ --force-reinstalls --reinstall
cd ..
### Install Accelerate-examples
cabal unpack accelerate-examples
cd accelerate-examples-0.13.0.0
[Edit accelerate-examples-0.13.0.0.cabal adding "Buildable False:" to all examples except accelerate-examples test section]
cabal install --extra-include-dirs=/c/CUDA/v5.0/include/ --extra-lib-dirs=/c/CUDA/v5.0/lib/Win32/ --force-reinstalls --reinstall
~/cabal/bin/accelerate-examples.exe --cuda
### For GUI Examples....
cd examples
cd n-body
ghc -O3 -threaded -rtsopts --make -i:../../lib/ Main -DACCELERATE_CUDA_BACKEND
### Run n-body examples with nice settings for cluster formation ...
./Main --cuda -n 2000 --mass 80 --speed 2