<?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>tópico Issue with !$OMP CANCEL construct na Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-OMP-CANCEL-construct/m-p/1747699#M178860</link>
    <description>&lt;P&gt;Using the latest ifx compiler (2026.0.0) on Windows 11 in Debug mode, the following code hangs fairly regularly (even when running with a modest number of threads):&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;PROGRAM P
USE OMP_LIB
IMPLICIT NONE (TYPE, EXTERNAL)

INTEGER :: I, SUM, VERSION


! Check if the cancellation feature is activated (a requirement for the CANCEL construct to work).

IF (.NOT. OMP_GET_CANCELLATION()) THEN
    WRITE(*, *) 'The CANCEL feature is not activated. Set the environment variable OMP_CANCELLATION to true.'
    STOP
END IF


! This will fail (that is, the code will hang) randomly, when running the code 
! multiple times.

!$OMP PARALLEL

    WRITE(*, *) OMP_GET_THREAD_NUM(), '/', OMP_GET_NUM_THREADS()

    !$OMP DO REDUCTION(+:SUM)
        DO I = 1, 10000
            SUM = SUM + I
            !$OMP CANCEL DO IF (I == 5)
        END DO
    !$OMP END DO

!$OMP END PARALLEL

WRITE(*, *) SUM

END PROGRAM P&lt;/LI-CODE&gt;&lt;P&gt;I do not see any restrictions associated with the use of the REDUCTION clause with CANCEL constructs in the OpenMP specification. It does look like a bug.&lt;/P&gt;</description>
    <pubDate>Tue, 12 May 2026 18:45:30 GMT</pubDate>
    <dc:creator>OP1</dc:creator>
    <dc:date>2026-05-12T18:45:30Z</dc:date>
    <item>
      <title>Issue with !$OMP CANCEL construct</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-OMP-CANCEL-construct/m-p/1747699#M178860</link>
      <description>&lt;P&gt;Using the latest ifx compiler (2026.0.0) on Windows 11 in Debug mode, the following code hangs fairly regularly (even when running with a modest number of threads):&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;PROGRAM P
USE OMP_LIB
IMPLICIT NONE (TYPE, EXTERNAL)

INTEGER :: I, SUM, VERSION


! Check if the cancellation feature is activated (a requirement for the CANCEL construct to work).

IF (.NOT. OMP_GET_CANCELLATION()) THEN
    WRITE(*, *) 'The CANCEL feature is not activated. Set the environment variable OMP_CANCELLATION to true.'
    STOP
END IF


! This will fail (that is, the code will hang) randomly, when running the code 
! multiple times.

!$OMP PARALLEL

    WRITE(*, *) OMP_GET_THREAD_NUM(), '/', OMP_GET_NUM_THREADS()

    !$OMP DO REDUCTION(+:SUM)
        DO I = 1, 10000
            SUM = SUM + I
            !$OMP CANCEL DO IF (I == 5)
        END DO
    !$OMP END DO

!$OMP END PARALLEL

WRITE(*, *) SUM

END PROGRAM P&lt;/LI-CODE&gt;&lt;P&gt;I do not see any restrictions associated with the use of the REDUCTION clause with CANCEL constructs in the OpenMP specification. It does look like a bug.&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2026 18:45:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-OMP-CANCEL-construct/m-p/1747699#M178860</guid>
      <dc:creator>OP1</dc:creator>
      <dc:date>2026-05-12T18:45:30Z</dc:date>
    </item>
  </channel>
</rss>

