I am converting large computational mechanics code to use OpenMP. I am pretty confident the parts that are done are correct (mostly C++ loops with careful code revisions to insure each step in the loop is independent). I have developed or tested on four different machines:
1. Mac Desktop, MacOS 10.6.x, 2 X 3 GHz Dual-Core Intel Xeon
2. Mac Laptop (a colleague), Mac OS 10.8.x, 2 X Quad-Core Intel i7 (I think)
3. Dell PowerEdge T610 (Linux) with 2 X Xeon 5600 six-core processors
4. MacBook Pro Laptop, MacOS 10.7.5, 1 X 2.8 GHz Intel Core 2 Duo
All Mac codes are compiled with XCode 4.x using GCC 4.2, OpenMP 2.5
Linux code compiled using GCC 4.3, OpenMP 2.5
When I run on #1 through #3, the code always works and can run using any number of available cores on each machine (1 to 4 on #1, 1 to 8 and #2, and 1 to 12 on #3). But I like to work at home too. When I run on machines #4 with 2 cores the identical code almost always fails before it is done. This code consists of a series of identical time steps (to solve a dynamic mechanics problem) that have to be done in sequence and machine #4 just quits after some random number of code-identical steps. If it does finish, the results are identical to other machines. I think it always fails in or around an omp block, but the block that fails is also random. Furthermore none of those blocks ever fail on the other three machines.
Could this be a code bug that can be fixed (and how?) or is the Laptop a defective computer/OS/compiler/chip system?