I need to work on some code in C which must be run using CUDA and OpenMP. My OS is Ubuntu 15.04. I have installed CUDA 7.5 following directions from the nVidia site and using Nsight(eclipse) I have managed to compile and run some of the examples provided by nVidia.
My code includes some OpenMP arguments and I cannot successfully compile them since I am not sure how to configure Nsight to work with OpenMP.
I tried adding -fopenmp and -Xcompile as nvcc options but I get "could not open options file..." errors. I guess I'm missing some basic stuff but any information I find floating around is either very specific to another problem or outdated.
I would like some help on how to set up Nsight to work with CUDA and OpenMP.
There are only two things you need to do to make this work. Open the project properties and navigate to the build->settings tab:
Add the
-fopenmpoption to the host compiler flagsAdd the gcc OpenMP runtime library as a linker dependency
then the project should compile.