I’m trying to run some pytorch code on a universities cluster. The GPU in question is a Tesla K20m, so according to wikipedia it supports CUDA compute capability 3.5. As I understood from other threads the corresponding binary isn’t shipped with pytorch anymore. I tried building pytorch from source but the system itself is rather ancient(Ubuntu 14.04, gcc 4.8.4) and I get
The C++ compiler does not support required functions. This is very likely
due to a known bug in GCC 5 (and maybe other versions) on Ubuntu 17.10 and
newer. For more information, see:
https://github.com/pytorch/pytorch/issues/5229
As I have limited possibilities to change these circumstances I was wondering if I could precompile the binaries on another machine and move them to the cluster. Or if maybe those were available somewhere. And what files I was even looking for in my environment folder. I am new to Pytorch, CUDA and using remote systems, please let me now which additional information might be required.
Doing cross compilation is know to be tricky. I wouldn’t recommend it if you’re not already familiar with build systems.
I think your best change is to get a newer version of gcc on the cluster.
You can either use conda and install a gcc there that will be recent enough that you can compile pytorch with it.
Or ask the people that maintain the cluster how you can get a newer version of gcc locally. You usually can get that for your user only.
Alright, I’ll keep my hands of cross compilation then, thanks for the warning. To get gcc inside my conda environment I would try and install it from the conda-forge channel or somewhere else?
Yes conda-forge has one, and compatible cuda and mkl maybe?
You can find the full instructions for the install from source in conda in the doc: https://github.com/pytorch/pytorch#from-source
Appears to have done the trick. I’m now waiting for the compilation to finish and hope my original problem which caused me to consider building pytorch from source will be solved to. Thank you for your help!