Dimitris D. Patoukas
Dimitris D. Patoukas

Reputation: 13

Setting up nsight with openmp

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.

Upvotes: 0

Views: 758

Answers (1)

talonmies
talonmies

Reputation: 72342

There are only two things you need to do to make this work. Open the project properties and navigate to the build->settings tab:

  1. Add the -fopenmp option to the host compiler flags enter image description here

  2. Add the gcc OpenMP runtime library as a linker dependency enter image description here

then the project should compile.

Upvotes: 2

Related Questions