0

How do I install Cuda 8 under Ubuntu 17.04, although it is not listed as supported? I need it because the following code causes nvcc 9 not to terminate:

#include <thrust/device_vector.h>
using thrust::device_vector;

struct T : public thrust::binary_function<int, int, int> {
  // m=1000 compile loops.  m=10 compiles.
  static const int m = 1000;
  int d[m];
  __host__ __device__
  int operator()(const int i, const int j) const  {
return i+d[j];
  }
};

int main(void) {
  device_vector<int> a(10), b(10), c(10);
  T f;
  transform(a.begin(), a.end(), b.begin(), c.begin(), f);
}

This is a MWE tediously extracted from a much larger program.

Previously, the larger program compiled and ran fine. Indeed, an executable compiled under cuda 8 in an earlier Ubuntu release runs fine in the cuda 9 environment.

Thanks.

My other options would be to revert my whole system to an earlier Ubuntu release or to rework my algorithm to find something that nvcc can handle.

WRF
  • 127
  • 10
  • 1
    Not supported means not supported. I would focus on understanding the problem with CUDA 9 and what workaround you could devise to get the code to build – talonmies Dec 12 '17 at 11:50
  • Thanks for your advice. Nevertheless my experience is that often things that are not supported actually work. I've hypothesized that CUDA is mature enough to solve my problem and do not see how understanding CUDA 9 would work to fix this, absent studying its source. I have found many compiler errors over the years but this is the first time I've ever put one into an infinite loop. Now, given that I would like to see whether this nonsupported combo works, could anyone save me a little time by pointing me to the specific deb packages to install? – WRF Dec 12 '17 at 16:19
  • 1
    I just installed the latest CUDA 9.1 toolkit (released today) on CentOS7 linux, and your code here compiled in a few seconds with no obvious issues. Perhaps you could try CUDA 9.1 rather than 8.0 – Robert Crovella Dec 12 '17 at 16:55
  • Thanks, I upgraded and it worked fine. (I do apt-get dist-upgrade frequently; 9.1 wasn't available earlier.) So, I report a bug and 12 hours later it's fixed. That's service. – WRF Dec 12 '17 at 20:56

1 Answers1

1

CUDA 9.1 fixed it.

(filler to 30 chars)

WRF
  • 127
  • 10