[Gate-users] GATE7 - re install

Bryan McIntosh mcintoshster at gmail.com
Sun Jan 15 16:05:20 CET 2017


Hi Michael (and anyone else using GATE under Mint or Ubuntu 16.04),

I just finished spending a day or so installing GATE 7.2 with GPU support
under a new installation of Mint 18.1. I ended up with a few errors and
headaches along the way, so here's a concise list of how one can avoid them:

1) Install the Nvidia drivers from the Driver Manager in Mint, or from the
Proprietary Drivers dialogue in Ubuntu. Trying to install them manually
will lead to pain since it's even harder to disable the built-in Nouveau
drivers with the new systemd boot system. Once those are installed, CUDA
installs without any problems (see note 3 below).

2) Ubuntu 16.04 and Mint 18.x ship with GCC 5.4 and g++ 5.4 by default.
These versions are too new for GATE, and it just won't compile right if you
do so. Downgrade to version 4.9 by typing the following at the command line
(requires administrative privileges; ignore text in brackets since those
are my comments):

sudo apt-get install gcc-4.9
sudo apt-get install g++-4.9
cd /usr/bin
sudo rm gcc (removes the old symbolic link to gcc-5)
sudo ln -s gcc-4.9 gcc (makes a new symbolic link to gcc-4.9)
sudo rm g++
sudo ln -s g++-4.9 g++ (same thing for g++ as for gcc)

Compile both Geant4 and GATE using gcc/g++ 4.9; if you compile Geant4 with
5.4 like I tried to do, compiling GATE will fail right at the end.

3) Thanks to Nathan Lo and Edwin Leung's contributions to the mailing list,
I now have better instructions for compiling GATE with GPU support. After
installing CUDA (just download the .deb package for Ubuntu 16.04 from
Nvidia at https://developer.nvidia.com/cuda-downloads and follow their
directions), build and install Root and Geant4.

Now, when running ccmake to configure the build for GATE 7.2, make sure
that CUDA_SDK_ROOT_DIR setting is set to the same as CUDA_TOOLKIT_ROOT_DIR.
Generate the settings needed, then open the CMakeLists.txt file in /[your
GATE folder]/gate_v7.2. Find a line that contains the text
SET(CUDA_NVCC_FLAGS "-gencode arch=compute_XX,code=sm_XX -gencode
arch=compute_XX,code=sm_XX;"

XX will be some number, probably 20 or 30. These correspond to CUDA compute
capability for your GPU hardware, which is likely greater then 3.0 if you
bought your card in the past two years or so. A list of compute
capabilities is available at https://developer.nvidia.com/cuda-gpus; as an
example, since I have a GTX 980 I would enter "52" instead of "XX", since
my card supports compute version 5.2.

Hope this helps!

-Bryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20170115/55c0d0e1/attachment.html>


More information about the Gate-users mailing list