Am 02.01.26 um 20:52 schrieb Harald Anlauf:
Well, it is certainly *not advisable* to write to the same unit.
One way to avoid the race condition is to use sth. like
!$OMP CRITICAL
WRITE(*,*) X
!$OMP END CRITICAL
But is it really required?
The closest equivalent in pure Fortran is DO CONCURRENT. There, one only
finds
11.1.7.5 Additional semantics for DO CONCURRENT constructs
[...]
8 A DO CONCURRENT construct shall not contain an input/output statement
that has an ADVANCE= specifier.
so the rest is permitted.
Hmm... after reading that, I changed my mind. I now think that I/O
should also be allowed within OMP PARALLEL.
Best regards
Thomas