Issue with OpenMP thread execution and threadprivate variable
问题 I have used 8 threads for 8 loops. I have used 'print' to see how the parallel code works. The 0 thread creates problems!I have showed in the attached diagram (please check the attached link below) how the parallel works. I have used threadprivate but it turned out that thread 0 can not get any private threadsafe variables. I have tried with modules as well and got same results! Any idea why the code acts this way? I would appreciate any help or suggestion. Thanks! !$OMP PARALLEL DO do nb=m3