Ubuntu 14.04 build error

Dec 1, 2015 at 10:55 AM
I previously posted the following issue under Issues, but I suspect I may be more likely to get a response here. Any suggestions will be gratefully received!

I'm trying to build CNTK on Ubuntu 14.04. CUDA 7.0 and ACML 5.3.1 have been installed successfully (and e.g. Caffe builds and runs fine). However, I see a link error when trying to build the current head revision of CNTK (commit af3ae29b84a01c5f7ccbccee693996c10692f409). I'd appreciate any tips for resolving the issue.

I've used the following commands:
mkdir build
cd build
../configure --cuda=yes
make j all

Build proceeds (what seems to be) normally initially, but then I see error messages indicating two undefined references:-

/home/a-durobe/cntk/build/lib/libcntkmath.so: undefined reference to Microsoft::MSR::CNTK::GPUSparseMatrix<double>::ConvolveAndWeightedAdd(double, Microsoft::MSR::CNTK::GPUMatrix<double> const&, Microsoft::MSR::CNTK::GPUSparseMatrix<double> const&, double, Microsoft::MSR::CNTK::GPUMatrix<double>&, unsigned long, bool)'
/home/a-durobe/cntk/build/lib/libcntkmath.so: undefined reference toMicrosoft::MSR::CNTK::GPUSparseMatrix<float>::ConvolveAndWeightedAdd(float, Microsoft::MSR::CNTK::GPUMatrix<float> const&, Microsoft::MSR::CNTK::GPUSparseMatrix<float> const&, float, Microsoft::MSR::CNTK::GPUMatrix<float>&, unsigned long, bool)'
collect2: error: ld returned 1 exit status
make[1]: *** [/home/a-durobe/cntk/build/bin/cntk] Error 1
make[1]: Leaving directory `/home/a-durobe/cntk'
make: *** [all] Error 2

It looks like a couple of explicit instantiations (of GPUSparseMatrix<>:ConvolveAndWeightedAdd()) have gone missing, but I'm not familiar enough with the code to debug this easily.
Dec 1, 2015 at 7:16 PM
can you please share the output of the “../configure --cuda=yes” command? It seems that the building script did not find CUDA at the default location and is building without CUDA supported.
Dec 2, 2015 at 11:56 AM
Thanks very much for this suggestion! The configure command was reporting that it couldn't find a path for either GDK or CUB. Resolving this resolved my original build issue.

In case this is helpful to others, another build issue I encountered was that the linker couldn't find libnvidia-ml.so on my system. It seems like my approach to installing CUDA 7.0 on Ubuntu (via: dpkg -i cuda-repo-ubuntu1404-7-0-rc_7.0-18_amd64.deb) meant that this file ended up at "/usr/lib/nvidia-352", which wasn't on the linker's library search path. I worked around this issue by modifying the Makefile in the root directory to include this line:
LIBPATH += /usr/lib/nvidia-352
Dec 9, 2015 at 11:30 PM
Hi durobe,

there are now Linux build instructions here: https://cntk.codeplex.com/documentation

Could you validate whether they (also) resolve your issue?

Thanks for your feedback,