### Extra Fix required for Nvidia NVCC to work under Fedora 23

Fedora 23 changed a default gcc ABI setting from that which was used in Fedora 22. The previous value was chosen so that the default compiler behaviour matched earlier versions of gcc as closely as possible, so this change actually broke systems that want the earlier behaviour : In our case, Nvidia’s tool chain.

This has to be fixed by adding additional options into the NVCC invocations. Doing this is not so easy, since Theano (ideally) insulates the programmer from these kinds of details.

The following instructions build upon the previous Fedora 22 version.

### Fix the CUDA headers to accept new gcc (5.3.1 for Fedora 23)

Now, as root, fix up Nvidia’s header file that disallows gcc greater than v4.9

In file /usr/local/cuda-7.0/include/host_config.h, look to make the following replacement :

### Prove that it’s still broken

As a regular user, let’s try out one of the CUDA samples from within a clean directory (and then fix it):

… this will FAIL, with a nasty looking message like these ::

### Fix the CUDA functionality

Edit the Makefile within that directory, adding the -D_GLIBCXX_USE_CXX11_ABI=0 line :

then, running make again should work without complaint, and running ./asyncAPI should produce results like ::

If that works, then we can move on to fixing the issue within Theano…

### Theano stuff - command line

Using the same gpu_check.py as given in the Fedora 22 instructions, the following command-line should FAIL :

This should work, though, if we supply an additional flag related to NVCC (for when it is invoked deep inside Theano) :

### Theano stuff - within a program

To achieve the same effect via program code within a module that uses Theano, add an extra line after the standard Python import ‘preamble’ :

### Theano stuff - in the ~/.theanorc file

To achieve the same effect using your .theanorc file, add the following section (the config file format doesn’t seem to object to the second ‘=’):