This is a difficult operation. Despite the critical section I'm not sure whether it will come out correctly but in principle it should. Also, there will be some overhead. It would perhaps be easier to use the (real) openmp accumulators to store a tmax for each thread (like the threaded Kahan summations) and then have the master thread determine the maximum from amongst these. This would probably have less overhead than the critical section.