Livelock
This shows a race condition and a livelock.
If the square of RES is never smaller than TOL, the program spins endlessly in Livelock.
C$OMP PARALLEL PRIVATE(ID)
ID = OMP_GET_THREAD_NUM()
N = OMP_GET_NUM_THREADS()
PHASES[ID] = UPDATE(U, ID)
IF (RES*RES .LT. TOL) GO TO 2000