When I execute my parallel program with OpenMP by this line:
- Code: Select all
I discover that this program was executed by two threads. I thought that when I run the program without "OMP_NUM_THREADS" it will be executed with only one thread . The computer is a 2 processors machine, and maybe this is the answer, why there was 2 threads involved in execution of program ? Could somebody tell me how is calculated the default number of threads in this case? And why there is two threads not one.
Thanks for your help
p.s. I compile the program on GCC with the -fopenmp flag