<?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 Re: Intel oneAPI segmentation fault on valid F2018 code in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-oneAPI-segmentation-fault-on-valid-F2018-code/m-p/1507800#M167365</link>
    <description>&lt;P&gt;Hi Barbara, thanks for the feedback. No, I didn't resolve this yet. This is not from the master of our software, but from an experimental branch, where we wrote a new data structure, polymorphic data types with allocatable arrays as components, with convenience functions for I/O, for "pop" and "push" in order to replace our existing data structure, based on a pointer implementation of "trie"s. The code at the moment only works with the NAG compiler. Both Intel and gfortran have problems, but from a different root cause I would say. In any case, this is beyond Fortran 2008, as it contains impure elemental recursive procedures, which I believe only started with Fortran 2018.&lt;/P&gt;&lt;P&gt;Cheers,&amp;nbsp;&amp;nbsp; Juergen&lt;/P&gt;</description>
    <pubDate>Mon, 24 Jul 2023 21:23:36 GMT</pubDate>
    <dc:creator>Juergen_R_R</dc:creator>
    <dc:date>2023-07-24T21:23:36Z</dc:date>
    <item>
      <title>Intel oneAPI segmentation fault on valid F2018 code</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-oneAPI-segmentation-fault-on-valid-F2018-code/m-p/1505213#M167253</link>
      <description>&lt;P&gt;The execution of the attached code gives a segmentation fault with oneAPI 2021.9, though I believe it is valid F2018 code. It works with the NAG compiler, but also segfaults with gfortran.&lt;/P&gt;&lt;P&gt;This is the backtrace&lt;/P&gt;&lt;P&gt;rogram received signal SIGABRT, Aborted.&lt;BR /&gt;__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50&lt;BR /&gt;50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.&lt;BR /&gt;(gdb) bt&lt;BR /&gt;#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50&lt;BR /&gt;#1 0x00007ffff7c62859 in __GI_abort () at abort.c:79&lt;BR /&gt;#2 0x00007ffff7cd52da in __malloc_assert (&lt;BR /&gt;assertion=assertion@entry=0x7ffff7df98a8 "(old_top == initial_top (av) &amp;amp;&amp;amp; old_size == 0) || ((unsigned long) (old_size) &amp;gt;= MINSIZE &amp;amp;&amp;amp; prev_inuse (old_top) &amp;amp;&amp;amp; ((unsigned long) old_end &amp;amp; (pagesize - 1)) == 0)", file=file@entry=0x7ffff7df53d6 "malloc.c", line=line@entry=2379, function=function@entry=0x7ffff7dfa030 &amp;lt;__PRETTY_FUNCTION__.13066&amp;gt; "sysmalloc") at malloc.c:298&lt;BR /&gt;#3 0x00007ffff7cd793f in sysmalloc (nb=nb@entry=96, av=av@entry=0x7ffff7e2cb80 &amp;lt;main_arena&amp;gt;) at malloc.c:2379&lt;BR /&gt;#4 0x00007ffff7cd8793 in _int_malloc (av=av@entry=0x7ffff7e2cb80 &amp;lt;main_arena&amp;gt;, bytes=bytes@entry=88) at malloc.c:4141&lt;BR /&gt;#5 0x00007ffff7cda154 in __GI___libc_malloc (bytes=88) at malloc.c:3058&lt;BR /&gt;#6 0x00000000004707a5 in _mm_malloc ()&lt;BR /&gt;#7 0x00000000004281a6 in for_allocate_handle ()&lt;BR /&gt;#8 0x000000000041309d in do_alloc_copy ()&lt;BR /&gt;#9 0x0000000000411cf5 in for_alloc_mold ()&lt;BR /&gt;#10 0x000000000040d23d in qn_containers_mp_qn_container_grow_ ()&lt;BR /&gt;#11 0x000000000040a6ad in qn_containers_mp_qn_array_append_ ()&lt;BR /&gt;#12 0x0000000000405044 in qn_containers_uti_mp_qn_containers_2_ ()&lt;BR /&gt;#13 0x0000000000404209 in MAIN__ ()&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jul 2023 18:23:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-oneAPI-segmentation-fault-on-valid-F2018-code/m-p/1505213#M167253</guid>
      <dc:creator>Juergen_R_R</dc:creator>
      <dc:date>2023-07-16T18:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: Intel oneAPI segmentation fault on valid F2018 code</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-oneAPI-segmentation-fault-on-valid-F2018-code/m-p/1505243#M167254</link>
      <description>&lt;P&gt;Your sample code&amp;nbsp; is quite long and complicated and would take some time for me to to understand however I ran in in the debugger (in windows) to see how/where is crashes. It crashes in the %copy as the address being copied to is zero. But to me the assuage of move_alloc in the snippet below seems problematic as q_tmp is unallocated before the move_alloc. In my experience you allocate a new thing of different size, copy data to the new thing and the move the allocation from the old thing to the new thing deallocating the old thing in the process.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;  subroutine qn_container_grow (qq)
    class(qn_container_t), intent(inout) :: qq

    class(qn_t), dimension(:), allocatable :: q_tmp

    call move_alloc (from = qq%q, to = q_tmp)
    allocate (qq%q (2 * size (q_tmp)), mold = q_tmp)
    call q_tmp%copy (qq%q(1:size(q_tmp)))

  end subroutine qn_container_grow&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jul 2023 23:07:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-oneAPI-segmentation-fault-on-valid-F2018-code/m-p/1505243#M167254</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2023-07-16T23:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: Intel oneAPI segmentation fault on valid F2018 code</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-oneAPI-segmentation-fault-on-valid-F2018-code/m-p/1505353#M167257</link>
      <description>&lt;P&gt;Here is an even shorter reproducer of just 416 lines. The move_alloc is default procedure, and the to argument gets allocated by exection of move_alloc. The problem seems the execution of the copy procedure, it looks like that this incorrectly executed. Both qa and qq are of qn_array_t (extending qn_container_t). So it is (correctly) qn_array_copy that is invoked. This is then called with the argument&lt;/P&gt;&lt;P&gt;qq%q(1:size(q_tmp)). The argument is of type qn_array_t, otherwise the select type wouldn't match. It is the assignment in qn_array_copy that fails.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 08:36:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-oneAPI-segmentation-fault-on-valid-F2018-code/m-p/1505353#M167257</guid>
      <dc:creator>Juergen_R_R</dc:creator>
      <dc:date>2023-07-17T08:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: Intel oneAPI segmentation fault on valid F2018 code</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-oneAPI-segmentation-fault-on-valid-F2018-code/m-p/1505362#M167258</link>
      <description>&lt;P&gt;Actually I have fallen foul of that well documented debugger bug, that says q_tmp is undefined when it isn't!&lt;/P&gt;&lt;LI-CODE lang="fortran"&gt;  subroutine qn_container_grow (qq)
    class(qn_container_t), intent(inout) :: qq

    class(qn_t), dimension(:), allocatable :: q_tmp

    call move_alloc (from = qq%q, to = q_tmp)
    if ( allocated( qq%q ) ) write (*, "(A)")  "* qq%q allocated"
    if ( allocated( q_tmp ) ) write (*, "(A)") "* qq_tmp allocated"
    allocate (qq%q (2 * size (q_tmp)), mold = q_tmp)
    call q_tmp%copy (qq%q(1:size(q_tmp)))

  end subroutine qn_container_grow&lt;/LI-CODE&gt;&lt;P&gt;This code showed q_tmp is allocated&amp;nbsp; even if the debuggers indicates otherwise!&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 09:22:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-oneAPI-segmentation-fault-on-valid-F2018-code/m-p/1505362#M167258</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2023-07-17T09:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: Intel oneAPI segmentation fault on valid F2018 code</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-oneAPI-segmentation-fault-on-valid-F2018-code/m-p/1507793#M167364</link>
      <description>&lt;P&gt;Before I dive into this too deeply,&amp;nbsp;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/108292"&gt;@Juergen_R_R&lt;/a&gt;,&amp;nbsp;have you resolved this?&lt;/P&gt;
&lt;P&gt;I ran it on Linux with both ifort and ifx and got this traceback.&lt;/P&gt;
&lt;LI-CODE lang="bash"&gt;$ ifort -O0 -traceback repro.f90
$ a.out
[]

* Array of arrays

[[h(0) h(1)]]
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image              PC                Routine            Line        Source      
libc.so.6          00007FE398DCDB70  Unknown               Unknown  Unknown
a.out              000000000046CAC4  Unknown               Unknown  Unknown
a.out              000000000040D695  Unknown               Unknown  Unknown
a.out              000000000040DCF5  Unknown               Unknown  Unknown
a.out              000000000040E8C7  Unknown               Unknown  Unknown
a.out              000000000040E96F  Unknown               Unknown  Unknown
a.out              0000000000407DF8  qn_containers_mp_         329  repro.f90
a.out              0000000000406EC5  qn_containers_mp_         288  repro.f90
a.out              0000000000408D3E  qn_containers_mp_         363  repro.f90
a.out              000000000040ACF2  qn_containers_uti         404  repro.f90
a.out              000000000040B10C  MAIN__                    415  repro.f90
a.out              00000000004041AD  Unknown               Unknown  Unknown
libc.so.6          00007FE398DB7B4A  Unknown               Unknown  Unknown
libc.so.6          00007FE398DB7C0B  __libc_start_main     Unknown  Unknown
a.out              00000000004040C5  Unknown               Unknown  Unknown
$
&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 24 Jul 2023 21:06:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-oneAPI-segmentation-fault-on-valid-F2018-code/m-p/1507793#M167364</guid>
      <dc:creator>Barbara_P_Intel</dc:creator>
      <dc:date>2023-07-24T21:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: Intel oneAPI segmentation fault on valid F2018 code</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-oneAPI-segmentation-fault-on-valid-F2018-code/m-p/1507800#M167365</link>
      <description>&lt;P&gt;Hi Barbara, thanks for the feedback. No, I didn't resolve this yet. This is not from the master of our software, but from an experimental branch, where we wrote a new data structure, polymorphic data types with allocatable arrays as components, with convenience functions for I/O, for "pop" and "push" in order to replace our existing data structure, based on a pointer implementation of "trie"s. The code at the moment only works with the NAG compiler. Both Intel and gfortran have problems, but from a different root cause I would say. In any case, this is beyond Fortran 2008, as it contains impure elemental recursive procedures, which I believe only started with Fortran 2018.&lt;/P&gt;&lt;P&gt;Cheers,&amp;nbsp;&amp;nbsp; Juergen&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2023 21:23:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-oneAPI-segmentation-fault-on-valid-F2018-code/m-p/1507800#M167365</guid>
      <dc:creator>Juergen_R_R</dc:creator>
      <dc:date>2023-07-24T21:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: Intel oneAPI segmentation fault on valid F2018 code</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-oneAPI-segmentation-fault-on-valid-F2018-code/m-p/1507812#M167366</link>
      <description>&lt;P&gt;Okay. What output do you expect to see?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2023 21:44:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-oneAPI-segmentation-fault-on-valid-F2018-code/m-p/1507812#M167366</guid>
      <dc:creator>Barbara_P_Intel</dc:creator>
      <dc:date>2023-07-24T21:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: Intel oneAPI segmentation fault on valid F2018 code</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-oneAPI-segmentation-fault-on-valid-F2018-code/m-p/1507813#M167367</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/44501"&gt;@Barbara_P_Intel&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Okay. What output do you expect to see?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Ah right, this is the expected output:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[]

* Array of arrays

[[h(0) h(1)]]
[[h(0) h(1)] [h(-1) h(0)]]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2023 21:47:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-oneAPI-segmentation-fault-on-valid-F2018-code/m-p/1507813#M167367</guid>
      <dc:creator>Juergen_R_R</dc:creator>
      <dc:date>2023-07-24T21:47:10Z</dc:date>
    </item>
    <item>
      <title>Re:Intel oneAPI segmentation fault on valid F2018 code</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-oneAPI-segmentation-fault-on-valid-F2018-code/m-p/1508034#M167376</link>
      <description>&lt;P&gt;Thanks for reducing the size of the reproducer!&lt;/P&gt;&lt;P&gt;I reproduced the seg fault with both ifx and ifort and filed a bug report, CMPLRLLVM-49773. &lt;/P&gt;&lt;P&gt;I will let you know when there's a fix.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 25 Jul 2023 14:57:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-oneAPI-segmentation-fault-on-valid-F2018-code/m-p/1508034#M167376</guid>
      <dc:creator>Barbara_P_Intel</dc:creator>
      <dc:date>2023-07-25T14:57:49Z</dc:date>
    </item>
    <item>
      <title>Re:Intel oneAPI segmentation fault on valid F2018 code</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-oneAPI-segmentation-fault-on-valid-F2018-code/m-p/1585612#M171528</link>
      <description>&lt;P&gt;With ifx 2024.1 that was released last week, I get the output you expect! Please try this new compiler.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 02 Apr 2024 18:23:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Intel-oneAPI-segmentation-fault-on-valid-F2018-code/m-p/1585612#M171528</guid>
      <dc:creator>Barbara_P_Intel</dc:creator>
      <dc:date>2024-04-02T18:23:54Z</dc:date>
    </item>
  </channel>
</rss>

