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

**URL:** <https://fortran-lang.discourse.group/t/openmp-and-thread-safety-of-i-os-write-read/4567>\
**Category:** Uncategorized\
**Created:** [October 19, 2022, 2:12pm UTC](https://fortran-lang.discourse.group/t/openmp-and-thread-safety-of-i-os-write-read/4567 "2022-10-19T14:12:02Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![PierU](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/pieru/32/1848_2.png) [@PierU](https://fortran-lang.discourse.group/u/PierU)\
**Post date:** [October 20, 2022, 4:19pm UTC](https://fortran-lang.discourse.group/t/openmp-and-thread-safety-of-i-os-write-read/4567/13 "2022-10-20T16:19:19Z")

</div>

> [@FortranFan](#):
>
> If you are “mainly using ifort,” you may also want to inquire at the Intel Fortran forum:

Actually I am OK with my current practice of putting all I/Os in critical sections. I was just wondering of the thread-safety of I/Os was covered by the standards (Fortran and/or OpenMP) or not. It seems that the answer is “no” (in which case one should always use critical sections if one wants the code to be portable and not depend on a specific compiler).

> [@FortranFan](#):
>
> Also, please note there is an outstanding support request with Intel re: thread-safety of `list-directed` I/O

Do you have a link?

---

_[View the full topic](https://fortran-lang.discourse.group/t/openmp-and-thread-safety-of-i-os-write-read/4567)._
