openMP is not creating threads in visual studio

后端 未结 4 1919
旧时难觅i
旧时难觅i 2020-12-06 16:26

My openMP version did not give any speed boost. I have a dual core machine and the CPU usage is always 50%. So I tried the sample program given in Wiki. Looks like the openM

4条回答
  •  时光取名叫无心
    2020-12-06 17:06

    There's nothing wrong with the program - so presumably there's some issue with how it's being compiled or run. Is this VS2008 Pro? A quick google around suggests OpenMP is not enabled in Standard. Is OpenMP enabled in Properties -> C/C++ -> Language -> OpenMP? (Eg, are you compiling with /openmp)? Is the environment variable OMP_NUM_THREADS being set to 1 somewhere when you run this?

提交回复
热议问题