<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Issue with !$OMP ATOMIC UPDATE CAPTURE in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-OMP-ATOMIC-UPDATE-CAPTURE/m-p/1746860#M178805</link>
    <description>&lt;P&gt;The following code (compiled on Windows with ifx 2026.0.0 and using the compiler option \Qopenmp) freezes after the first WRITE statement, usually after a small number of iterations on the loop index I. I can't figure out what is wrong here, and I am inclined to report this as a bug.&lt;/P&gt;&lt;P&gt;This is a showstopper for us, thus any alternative to the pattern shown here would be very much appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;PROGRAM OMP_ATOMIC_TEST
USE OMP_LIB
IMPLICIT NONE

INTEGER :: I, ERROR
INTEGER, SAVE :: ERROR_LOCAL, ERROR_TEMP
!$OMP THREADPRIVATE(ERROR_LOCAL, ERROR_TEMP)

CALL OMP_SET_NUM_THREADS(10)

DO I = 1, 20 ! The purpose of this loop is to demonstrate the issue, it is unrelated
             ! to the following PARALLEL region. The code will freeze for some value
             ! of I, after having issued the first WRITE statement, and inside the
             ! ATOMIC UPDATE CAPTURE region.

    !$OMP PARALLEL

        IF (OMP_GET_THREAD_NUM() == 1) THEN

            WRITE(*, *) 'Begin ATOMIC CAPTURE region ', I
            !$OMP ATOMIC UPDATE CAPTURE
                ERROR_TEMP = ERROR ! Capture
                ERROR      = 1     ! Update
            !$OMP END ATOMIC
            ERROR_LOCAL = ERROR_TEMP
            WRITE(*, *) 'End ATOMIC CAPTURE region'

        END IF

    !$OMP END PARALLEL

END DO


END PROGRAM OMP_ATOMIC_TEST&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 05 May 2026 19:11:14 GMT</pubDate>
    <dc:creator>OP1</dc:creator>
    <dc:date>2026-05-05T19:11:14Z</dc:date>
    <item>
      <title>Issue with !$OMP ATOMIC UPDATE CAPTURE</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-OMP-ATOMIC-UPDATE-CAPTURE/m-p/1746860#M178805</link>
      <description>&lt;P&gt;The following code (compiled on Windows with ifx 2026.0.0 and using the compiler option \Qopenmp) freezes after the first WRITE statement, usually after a small number of iterations on the loop index I. I can't figure out what is wrong here, and I am inclined to report this as a bug.&lt;/P&gt;&lt;P&gt;This is a showstopper for us, thus any alternative to the pattern shown here would be very much appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;PROGRAM OMP_ATOMIC_TEST
USE OMP_LIB
IMPLICIT NONE

INTEGER :: I, ERROR
INTEGER, SAVE :: ERROR_LOCAL, ERROR_TEMP
!$OMP THREADPRIVATE(ERROR_LOCAL, ERROR_TEMP)

CALL OMP_SET_NUM_THREADS(10)

DO I = 1, 20 ! The purpose of this loop is to demonstrate the issue, it is unrelated
             ! to the following PARALLEL region. The code will freeze for some value
             ! of I, after having issued the first WRITE statement, and inside the
             ! ATOMIC UPDATE CAPTURE region.

    !$OMP PARALLEL

        IF (OMP_GET_THREAD_NUM() == 1) THEN

            WRITE(*, *) 'Begin ATOMIC CAPTURE region ', I
            !$OMP ATOMIC UPDATE CAPTURE
                ERROR_TEMP = ERROR ! Capture
                ERROR      = 1     ! Update
            !$OMP END ATOMIC
            ERROR_LOCAL = ERROR_TEMP
            WRITE(*, *) 'End ATOMIC CAPTURE region'

        END IF

    !$OMP END PARALLEL

END DO


END PROGRAM OMP_ATOMIC_TEST&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2026 19:11:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-OMP-ATOMIC-UPDATE-CAPTURE/m-p/1746860#M178805</guid>
      <dc:creator>OP1</dc:creator>
      <dc:date>2026-05-05T19:11:14Z</dc:date>
    </item>
  </channel>
</rss>

