Answer the question
In order to leave comments, you need to log in
Why doesn't the exe with openMP exit after executing the code?
I am writing code in VS2010 using openMP, the code uses only the directives #pragma omp parallel for and #pragma omp parallel sections
The code produces the correct results, on two cores it gives a speedup of 2 times (sometimes more, why?). But at the end of the program, the window itself does not close, before return 0; costs cout<<"all"; it is printed. Maybe the threads are not shutting down, how can I fix this?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question