At this point it hung, so once again the second thread simply never got started. When I set OMP_NUM_THREADS to 1 the program ran fine with one thread outputting all the numbers correctly. When I set it to 2 the program hung at the point I indicated.
Even more strangely, it worked once. I tried it and it hung. Then I tried it again (this time redirecting the output to a file) and it worked, correctly printing hello from both threads and printing all 16 outputs. I then tried it several times more, sometimes outputting to the console and sometimes redirecting the output to a file, and I could never get it to work again.
You asked if it works with hyperthreading disabled. How do I disable hyperthreading under Linux?
If you'd like I'd be happy to give you access to a user account on the machine I'm doing this on. We would just have to figure out a secure way for me to send you the username and password. (Phone?)
Thanks again for your help,
P.S. - My Internet connectivity will be spotty over the holidays, but I'll be checking the board at least once a week and I'll be back in more regular contact shortly after New Year's.
Thanks for running the test program. It's pretty clear that the second thread either isn't created or the program somehow exits before the second thread starts. I'm at a loss as to how either of these possibilities could occur. I can't reproduce the problem on any of my lab systems.
We need to involve the compiler team at this point. I can think of a few more things for you to try but they won't getyou any closer to a solution. Please submit this issue to Premier Support. Their support engineers are better suited to working this issue with the compiler developers.
PS You can usually enable or disable Hyper-Threading in the BIOS.