openmp support with CUDA

dears
how could I make visual studio 2013 to support openmp in cuda-C project?

The CUDA toolkit samples ship with a sample called cudaOpenMP:

[url]http://docs.nvidia.com/cuda/cuda-samples/index.html#cudaopenmp[/url]

That project should have everything you need. It demonstrates a code example as well as how to compile it.

I was able to successfully compile it on Windows 7 with VS 2013 community without installing anything extra/special.

I used the mentioned project and modified the code so the same project with otherdiffernt code.
when i compile the project , just one thread is running using the openmp
why is that?

does it must have some configuration as the C/C++ project : C\C++ → language–> openmp support =yes

Did you set OMP_NUM_THREADS to something?

[url]Microsoft Docs - Developer tools, technical documentation and coding examples

A question about why your OpenMP app is not running with the correct number of OpenMP threads likely has nothing to do with CUDA.

i set the number with threads before, but i solved the problem by setting the additional options to :-Xcompiler “/openmp”