OpenMP and thread-safety of I/Os (write, read...)

@PierU,

As things stand, the issues and challenges and the fixes and workarounds you experience in this area will vary with compiler implementations and also their versions.

If you are “mainly using ifort,” you may also want to inquire at the Intel Fortran forum:

Also, please note there is an outstanding support request with Intel re: thread-safety of list-directed I/O . So until that gets resolved, you may want to be careful with list-directed IO in any concurrent execution scenarios, OpenMP or otherwise.

And with Intel Fortran, you may want to try to their latest oneAPI version and start with small reproducer-type test cases attempting other IO (besides list-directed) with OpenMP and see if you get them to work. If such cases fail, either post them at the above Intel forum and request assistance with them; or, if you are able to buy their support subscription, then do so to get more direct service via their Software Center:
https://supporttickets.intel.com/?lang=en-US

The small cases can also help you with gfortran and in case of any problems, you may want to follow-up at GFortran - GCC Wiki.