Hi SGaist. Sorry if my explanations lack experience here.
However, I tried installing NVIDIA CUDA toolkit 10.2
Should that be enough to properly setup CUDA? Do I need to add something in my .pro file?
Thanks
Here is my .pro file (if necessary)
#-------------------------------------------------
#
# Project created by QtCreator 2018-02-20T14:33:13
#
#-------------------------------------------------
QT += core gui opengl
QT += network
QT += opengl
QMAKE_CXXFLAGS += -std=c++14
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
TARGET = MGA-GUI
TEMPLATE = app
INCLUDEPATH += /usr/local/include/opencv /home/tosson/Desktop/root/include /usr/local/include/
LIBS += -L/usr/local/lib -lopencv_core -lopencv_imgcodecs -lopencv_highgui -L/usr/local/lib/ -lhpdf $$system(root-config --glibs) $$system(root-config --libs --cflags)
LIBS += -lglut -lGLU
SOURCES += main.cpp\
mainwindow.cpp \
recomb.cpp \
qcustomplot.cpp \
singanalysis.cpp \
maianalysis.cpp \
spottrap.cpp \
qq.cpp \
spottrapped.cpp \
energyspectrumauto.cpp \
matrial.cpp \
englimits.cpp \
indexuser.cpp \
livestream.cpp \
frames.cpp \
gpuconnect.cpp \
parsoptimization.cpp \
progress.cpp \
unitcell.cpp \
baseclass.cpp \
dialog.cpp \
maincal.cpp \
glwidget.cpp \
analysisequation.cpp \
rings.cpp
OTHER_FILES += rec.cu \
HEADERS += mainwindow.h \
recomb.h \
qcustomplot.h \
singanalysis.h \
maianalysis.h \
spottrap.h \
qq.h \
spottrapped.h \
energyspectrumauto.h \
matrial.h \
englimits.h \
indexuser.h \
livestream.h \
frames.h \
gpuconnect.h \
parsoptimization.h \
progress.h \
pixelstype.h \
spotstypy.h \
unitcell.h \
baseclass.h \
conv_pixel.h \
dialog.h \
pointtype.h \
analysisequation.h \
rings.h \
glwidget.h
FORMS += mainwindow.ui \
recomb.ui \
singanalysis.ui \
spottrap.ui \
englimits.ui \
indexuser.ui \
frames.ui \
RESOURCES += \
pics.qrc
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../root/lib/release/ -lGraf3d
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../root/lib/debug/ -lGraf3d
else:unix: LIBS += -L$$PWD/../root/lib/ -lGraf3d
INCLUDEPATH += $$PWD/../root/include
DEPENDPATH += $$PWD/../root/include
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../root/lib/release/ -lSpectrum
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../root/lib/debug/ -lSpectrum
else:unix: LIBS += -L$$PWD/../root/lib/ -lSpectrum
INCLUDEPATH += $$PWD/../root/include
DEPENDPATH += $$PWD/../root/include
DEPENDPATH += /usr/local/lib
CUDA_SOURCES += rec.cu
CUDA_SDK = "/usr/" # Path to cuda SDK install
CUDA_DIR = "/usr/" # Path to cuda toolkit install
# DO NOT EDIT BEYOND THIS UNLESS YOU KNOW WHAT YOU ARE DOING....
SYSTEM_NAME = unix # Depending on your system either 'Win32', 'x64', or 'Win64'
SYSTEM_TYPE = 64 # '32' or '64', depending on your system
CUDA_ARCH = sm_21 # Type of CUDA architecture, for example 'compute_10', 'compute_11', 'sm_10'
NVCC_OPTIONS = --use_fast_math
# include paths
INCLUDEPATH += $$CUDA_DIR/include
# library directories
QMAKE_LIBDIR += $$CUDA_DIR/lib/
CUDA_OBJECTS_DIR = ./
# Add the necessary libraries
CUDA_LIBS = -lcuda -lcudart
# The following makes sure all path names (which often include spaces) are put between quotation marks
CUDA_INC = $$join(INCLUDEPATH,'" -I"','-I"','"')
#LIBS += $$join(CUDA_LIBS,'.so ', '', '.so')
LIBS += $$CUDA_LIBS
# Configuration of the Cuda compiler
CONFIG(debug, debug|release) {
# Debug mode
cuda_d.input = CUDA_SOURCES
cuda_d.output = $$CUDA_OBJECTS_DIR/${QMAKE_FILE_BASE}_cuda.o
cuda_d.commands = $$CUDA_DIR/bin/nvcc -D_DEBUG $$NVCC_OPTIONS $$CUDA_INC $$NVCC_LIBS --machine $$SYSTEM_TYPE -arch=$$CUDA_ARCH -c -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME}
cuda_d.dependency_type = TYPE_C
QMAKE_EXTRA_COMPILERS += cuda_d
}
else {
# Release mode
cuda.input = CUDA_SOURCES
cuda.output = $$CUDA_OBJECTS_DIR/${QMAKE_FILE_BASE}_cuda.o
cuda.commands = $$CUDA_DIR/bin/nvcc $$NVCC_OPTIONS $$CUDA_INC $$NVCC_LIBS --machine $$SYSTEM_TYPE -arch=$$CUDA_ARCH -c -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME}
cuda.dependency_type = TYPE_C
QMAKE_EXTRA_COMPILERS += cuda
}
DISTFILES += \
../streaking/report_Nickel.pdf \
../streaking/report_Aluminum.pdf \
../streaking/pole22.jpg \
../streaking/pole2.jpg \
../streaking/pole.jpg \
../streaking/img.jpg \
../streaking/convimg.jpg \
../streaking/333.jpg \
../streaking/3D33_img.jpg \
../streaking/3D_img2.jpg \
../streaking/3D_img1.jpg \
../streaking/3D_img.jpg \
../streaking/pole2.png \
../streaking/pole.png