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

Fix NVIDIA driver version parsing for Ubuntu #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix NVIDIA driver version parsing for Ubuntu #6

wants to merge 1 commit into from

Conversation

marcoesposito1988
Copy link

No description provided.

@al42and
Copy link
Owner

al42and commented Jan 28, 2017

Hi Marco!

Could you please provide example of erroneously parsed version string?
Also, were you using drivers from Ubuntu repos, or the ones directly from Nvidia website?

@marcoesposito1988
Copy link
Author

Hi Andrey,

I am using Ubuntu 14.04.5 and the NVIDIA drivers from the official CUDA PPA (so through apt-get).

Here is the version string:

NVRM version: NVIDIA UNIX x86_64 Kernel Module  361.93.02  Wed Sep 21 16:32:29 PDT 2016
GCC version:  gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)

This is the output without the proposed fix:

g++ -I/usr/local/cuda/include -L/usr/local/cuda/lib64/ -L/usr/lib/nvidia-NVRM version: NVIDIA UNIX x86_64 Kernel Module  361.93.02  Wed Sep 21 16:32:29 PDT 2016/ -L/usr/lib/nvidia-NVRM version: NVIDIA UNIX x86_64 Kernel Module  361.93.02  Wed Sep 21 16:32:29 PDT 2016/ cuda-smi.cpp -lcudart_static -lpthread -ldl -lnvidia-ml -lrt -o cuda-smi
g++: error: version:: No such file or directory
g++: error: NVIDIA: No such file or directory
g++: error: UNIX: No such file or directory
g++: error: x86_64: No such file or directory
g++: error: Kernel: No such file or directory
g++: error: Module: No such file or directory
g++: error: 361.93.02: No such file or directory
g++: error: Wed: No such file or directory
g++: error: Sep: No such file or directory
g++: error: 21: No such file or directory
g++: error: 16:32:29: No such file or directory
g++: error: PDT: No such file or directory
g++: error: 2016/: No such file or directory
g++: error: version:: No such file or directory
g++: error: NVIDIA: No such file or directory                                                                                                                                                                                                                                               
g++: error: UNIX: No such file or directory                                                                                                                                                                                                                                                 
g++: error: x86_64: No such file or directory                                                                                                                                                                                                                                               
g++: error: Kernel: No such file or directory                                                                                                                                                                                                                                               
g++: error: Module: No such file or directory                                                                                                                                                                                                                                               
g++: error: 361.93.02: No such file or directory                                                                                                                                                                                                                                            
g++: error: Wed: No such file or directory                                                                                                                                                                                                                                                  
g++: error: Sep: No such file or directory                                                                                                                                                                                                                                                  
g++: error: 21: No such file or directory                                                                                                                                                                                                                                                   
g++: error: 16:32:29: No such file or directory                                                                                                                                                                                                                                             
g++: error: PDT: No such file or directory                                                                                                                                                                                                                                                  
g++: error: 2016/: No such file or directory                                                                                                                                                                                                                                                
make: *** [cuda-smi] Error 1 

@al42and
Copy link
Owner

al42and commented Feb 4, 2017

Ah, okay, I see the problem. It's really a shame Nvidia is so inconsistent with their version numbering.

Please check if your problem is fixed in current master branch (87d9196).
I'd rather prefer to parse driver response with regex: it's not perfect, but relying on specific token position seems a bit more fragile to me.

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

Successfully merging this pull request may close these issues.

2 participants