Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cuda compiler #31

Closed
JanMatas opened this issue Dec 6, 2017 · 3 comments
Closed

Cuda compiler #31

JanMatas opened this issue Dec 6, 2017 · 3 comments

Comments

@JanMatas
Copy link

JanMatas commented Dec 6, 2017

Hi,

I was glad to learn that nvidia-cuda-dev will be installed on the AMI. However, it would really help to also install associated compiler nvcc because the code that uses cuda needs to be compiled by it.

A possible workaround would be to add compiled binaries to the git repo that would be just linked by g++ but this does not seem like a good practice.

@m8pple
Copy link
Contributor

m8pple commented Dec 6, 2017

Good point - I haven't used CUDA in about 5 years, and forgot that the compiler is
a separate thing in their world. I'm getting worried about disk-space (as I need a lot
of it to hold outputs from all the submissions), so I can do:

 sudo apt install --no-install-recommends nvidia-cuda-toolkit

Does that give enough of the toolkit to compile things?

@JanMatas
Copy link
Author

Sorry for late reply. I have some bad news on this front - altough the nvidia-cuda-toolkit indeed provides everything we need to compile cuda, it does not work on the target g3.4xlarge machine. The GPU there is too "new" for the drivers in jessie repos.

One solution is to run Debian Stretch (probably not doable at this point) or to install the drivers using jessie backports.

The rough steps I took to make it working are the following:

  1. Add this to /etc/apt/sources.list

deb http://httpredir.debian.org/debian jessie-backports main contrib non-free

  1. In terminal:

sudo apt-get update

  1. Install headers:

sudo apt-get install linux-headers-$(uname -r|sed 's/[^-]-[^-]-//')

  1. Update again

sudo apt-get update

  1. Install toolkit:

sudo apt-get install -t jessie-backports nvidia-driver nvidia-cuda-toolkit nvidia-smi

  1. Check it works (this should not return an error):

nvidia-smi

@m8pple
Copy link
Contributor

m8pple commented Dec 12, 2017

Yes - someone pointed out the driver problem in #39; it turned out I'd updated in my AMI
over the summer using backports too, but not propagated to the public AMI. So I'll pull
in the updated cuda toolkit too.

Thanks for the set of steps though - full solutions are always appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants