Seqmentation fault when compiling my application using the latest CUDA drivers

Dear all,

We are developing a developmental robotics framework called Aquila (see the recent article on NVidia), which compiles just fine when I use CUDA Toolkit 3.0 but gives me a segmentation fault when I use the latest version 3.2. It will be realted to the actual toolkit since I can run the latest drivers 260.19.21 with the old toolkit, which is obviously not something I want to do :)

I have no clue what is wrong, could someone please help me to understand what is going on?

This is my project file, the bottom part of which I am not entirely sure about as it deals with linking the nvcc compiler to .cu files so perhaps something wrong there?

# #########################################################################################################

# Aquila - CUDA enabled AI system                                                                         #

# Copyright (C) 2010  Martin Peniak(www.martinpeniak.com) and Anthony Morse(anthony.morse@plymouth.ac.uk) #

# #

# This program is free software: you can redistribute it and/or modify it under the terms of the GNU      #

# General Public License as published by the Free Software Foundation, either version 3 of the License,   #

# or (at your option) any later version.                                                                  #

# #########################################################################################################

QT += opengl \

      xml

CONFIG += opengl

TARGET = Aquila

TEMPLATE = app

SOURCES += src/main.cpp \

    src/mainwindow.cpp \

    src/splashscreen.cpp \

    src/yarp.cpp \

    src/modi.cpp \

    src/plots.cpp \

    src/iCub_control.cpp \

    src/custom_som.cpp \

    src/speech.cpp \

    src/xml.cpp \

    src/development.cpp

CUSOURCES += src/cuda_mtrnn.cu \

    src/cuda_som.cu \

    src/cuda_esn.cu \

    src/cuda_image_processing.cu

OTHER_FILES += src/cuda_esn.cu \

    src/cuda_mtrnn.cu \

    src/cuda_som.cu \

    src/cuda_image_processing.cu

HEADERS += src/mainwindow.h \

    src/splashscreen.h \

    src/yarp.h \

    src/globals.h \

    src/modi.h \

    src/cuda_mtrnn.h \

    src/cuda_som.h \

    src/plots.h \

    src/iCub_control.h \

    src/cuda_image_processing.h \

    src/cuda_esn.h \

    src/custom_som.h \

    src/yarp.h \

    src/cuda_esn.h \

    src/speech.h \

    src/xml.h \

    src/development.h

FORMS += ui/mainwindow.ui

RESOURCES += res/resources.qrc

DESTDIR = bin

OBJECTS_DIR = bld/obj

MOC_DIR = bld/moc

UI_DIR = bld/ui

RCC_DIR = bld/rcc

QMAKE_CXXFLAGS += -fopenmp

# get the user name

UNAME = $$system(whoami)

INCLUDEPATH += ./src \

    /home/$$UNAME/Dev/Lib/yarp2/src/libYARP_dev/include \

    /home/$$UNAME/Dev/Lib/yarp2/src/libYARP_OS/include \

    /home/$$UNAME/Dev/Lib/yarp2/src/libYARP_sig/include \

    /home/$$UNAME/Dev/Lib/yarp2/src/libYARP_math/include \

    /home/$$UNAME/Dev/Lib/yarp2/generated_include \

    /home/$$UNAME/Dev/Lib/qwtplot3d/include \

    /home/$$UNAME/Dev/Lib/qwt-5.2.1/src \

    /usr/local/cuda/include

LIBPATH += /home/$$UNAME/NVIDIA_GPU_Computing_SDK/shared/lib \

    /home/$$UNAME/Dev/Lib/qwtplot3d/lib \

    /home/$$UNAME/Dev/Lib/qwt-5.2.1/lib \

    /home/$$UNAME/Dev/Lib/yarp2/lib

LIBS += -lYARP_dev \

    -lYARP_OS \

    -lYARP_sig \

    -lYARP_math \

    -lYARP_init \

    -lyarpcar \

    -lyarpmod \

    -lACE \

    -fopenmp \

    -lqwtplot3d \

    -lqwt

# NVCC SETTINGS

QMAKE_CUC                   =   /usr/local/cuda/bin/nvcc

cuda.input                  =   CUSOURCES

INCLUDEPATH                 +=  /home/$$UNAME/NVIDIA_GPU_Computing_SDK/shared/inc

LIBPATH                     +=  /usr/local/cuda/lib64

LIBS                        +=  -lcudart

isEmpty(CU_DIR):CU_DIR = .

isEmpty(QMAKE_CPP_MOD_CU):QMAKE_CPP_MOD_CU =

isEmpty(QMAKE_EXT_CPP_CU):QMAKE_EXT_CPP_CU = .cu

ReleaseBuild:QMAKE_CUFLAGS  += $$QMAKE_CXXFLAGS_RELEASE

message(QMAKE_CUFLAGS: $$QMAKE_CUFLAGS)

QMAKE_CUEXTRAFLAGS          +=  $(DEFINES) \

                                $(INCPATH)

QMAKE_CUEXTRAFLAGS          +=  -c \

                                -use_fast_math

# use -deviceemu to test the code by emulation by uncommenting the line below

# this mode is only available with CUDA 3.0 and lower

#--------------------------------------------------------------

#QMAKE_CUEXTRAFLAGS         +=  -deviceemu

#--------------------------------------------------------------

QMAKE_EXTRA_VARIABLES       +=  QMAKE_CUEXTRAFLAGS

cuda.commands               =   $$QMAKE_CUC \

                                $(EXPORT_QMAKE_CUEXTRAFLAGS) \

                                -o \

                                $$OBJECTS_DIR/$${QMAKE_CPP_MOD_CU}${QMAKE_FILE_BASE}$${QMAKE_EXT_OBJ} \

                                ${QMAKE_FILE_NAME}$$escape_expand(\n\t)

cuda.output                 =   $$OBJECTS_DIR/$${QMAKE_CPP_MOD_CU}${QMAKE_FILE_BASE}$${QMAKE_EXT_OBJ}

QMAKE_EXTRA_COMPILERS       +=  cuda

This is the error I get:

Running build steps for project Aquila...

Starting: "/usr/bin/make" clean -w 

make: Entering directory `/home/mpeniak/Desktop/Aquila' 

rm -f bld/obj/cuda_mtrnn.o bld/obj/cuda_som.o bld/obj/cuda_esn.o bld/obj/cuda_image_processing.o 

rm -f bld/moc/moc_mainwindow.cpp bld/moc/moc_splashscreen.cpp 

rm -f bld/rcc/qrc_resources.cpp 

rm -f bld/ui/ui_mainwindow.h 

rm -f bld/obj/cuda_mtrnn.o bld/obj/cuda_som.o bld/obj/cuda_esn.o bld/obj/cuda_image_processing.o bld/obj/main.o bld/obj/mainwindow.o bld/obj/splashscreen.o bld/obj/yarp.o bld/obj/modi.o bld/obj/plots.o bld/obj/iCub_control.o bld/obj/custom_som.o bld/obj/speech.o bld/obj/xml.o bld/obj/development.o bld/obj/moc_mainwindow.o bld/obj/moc_splashscreen.o bld/obj/qrc_resources.o 

rm -f *~ core *.core 

make: Leaving directory `/home/mpeniak/Desktop/Aquila' 

The process "/usr/bin/make" exited normally.

Configuration unchanged, skipping qmake step.

Starting: "/usr/bin/make" -w 

make: Entering directory `/home/mpeniak/Desktop/Aquila' 

/usr/bin/uic-qt4 ui/mainwindow.ui -o bld/ui/ui_mainwindow.h 

Warning: name frame is already used 

/usr/local/cuda/bin/nvcc -DQT_XML_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtXml -I/usr/include/qt4 -Isrc -I../../Dev/Lib/yarp2/src/libYARP_dev/include -I../../Dev/Lib/yarp2/src/libYARP_OS/include -I../../Dev/Lib/yarp2/src/libYARP_sig/include -I../../Dev/Lib/yarp2/src/libYARP_math/include -I../../Dev/Lib/yarp2/generated_include -I../../Dev/Lib/qwtplot3d/include -I../../Dev/Lib/qwt-5.2.1/src -I/usr/local/cuda/include -I../../NVIDIA_GPU_Computing_SDK/shared/inc -I/usr/X11R6/include -Ibld/moc -Ibld/ui -c -use_fast_math -o bld/obj/cuda_mtrnn.o src/cuda_mtrnn.cu 

Segmentation fault 

make: *** [bld/obj/cuda_mtrnn.o] Error 139 

make: Leaving directory `/home/mpeniak/Desktop/Aquila' 

The process "/usr/bin/make" exited with code %2.

Error while building project Aquila (target: Desktop)

When executing build step 'Make'

So it seems as if the compilation crashes right after it has to do anything with CUDA files.

Any help very much appreciated,

Martin Peniak