- Windows 10 version 2004 or higher, or Windows 11
- CUDA enabled NVIDIA GPU
- Install Windows Subsystem for Linux (WSL)
- On Windows Powershell
wsl --install
- Restart PC
- Create Ubuntu account
- On Windows Powershell
- Update Ubuntu
sudo apt update && sudo apt upgrade -y
- Install build stuff
sudo apt install build-essential
- Install CUDA on WSL
- Add NVIDIA pkg repo
wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-wsl-ubuntu.pin sudo mv cuda-wsl-ubuntu.pin /etc/apt/preferences.d/cuda-repository-pin-600 sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/7fa2af80.pub sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/ /" sudo apt-get update
- Install CUDA
sudo apt-get install cuda
- Environment variables (bashrc)
export PATH=/usr/local/cuda/bin${PATH:+:${PATH}} export LD_LIBRARY_PATH=/usr/local/cuda/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
- Apply changes
source ~/.bashrc
- Add NVIDIA pkg repo
- Verify CUDA
nvcc --version
- Clone this repo (assuming you haven't already)
- Build the project
make
- Run simulation
./monte_carlo_sim