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

All training examples are assigned to the same neuron after gpu-training #40

Closed
Andy--- opened this issue Jul 26, 2016 · 2 comments
Closed
Labels

Comments

@Andy---
Copy link

Andy--- commented Jul 26, 2016

Hi,

I had a hard time installing the python interface of somoclu with Cuda on Ubuntu 16.4 today. First I ran into a "‘memcpy’ was not declared in this scope" error. After reading BVLC/caffe#4046, I added -D_FORCE_INLINES to CXXFLAGS and CUDA_CFLAGS in src/Makefile. Whyever, this helped with the error.
Than I got 2 similar errors where one looked like: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: error adding symbols: DSO missing from command line. The other was for libm library. So I added -lstdc++ -lm to LIBS in the same Makefile. This worked and make ended without errors. After this I did make python and python setup.py install. Both seemed to work fine.
But when I tried the example from the README in the python folder on gpu, all examples where assigned to the same neuron [49, 29]. When I tried a 50x50 map, all examples where assigned to neuron [49,49]. I ran the example on cpu and everything looked fine, the examples where assigned to different neurons. I don't know why this is like that. Did I do something wrong in the installation process?

@peterwittek
Copy link
Owner

An awful lot depends on the version of GCC and CUDA. Some versions of CUDA simply don't work with certain versions of GCC, and you have to resort to a bunch of tricky flags to get it compiled.

Nevertheless, once you succeed in compiling it, it should work, but it will not throw you an error if the GPU kernel fails. The most common failure is that the GPU is not initialized by the operating system. This is as mysterious as the version problem, but calling nvidia-smi -a -q from the command line usually achieves the necessary initialization. Could you check if other CUDA programmes run correctly? E.g., can you run device query from the CUDA SDK?

@peterwittek
Copy link
Owner

I cannot reproduce this error, it seems to be fine with my CUDA install and GPU, so I am closing it.

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

No branches or pull requests

2 participants