<?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 Core file generation in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Core-file-generation/m-p/759662#M15149</link>
    <description>Hello David,&lt;BR /&gt;No core file was created...very strange. I don't think you missed anything. You are using an earlier v12 ifort than I am, but I doubt this has anything to do with the compiler itself. Perhaps it is something about your version of Linux, ubuntu 2.6.32-36-generic. I see on different versions of Linux, the core file might have a different name, like core.1867, but you listed everything in the directory where you ran the executable, and there is no file matching core*. Let me look into this, and I'll get back to you.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Patrick</description>
    <pubDate>Wed, 23 Nov 2011 14:45:47 GMT</pubDate>
    <dc:creator>pbkenned1</dc:creator>
    <dc:date>2011-11-23T14:45:47Z</dc:date>
    <item>
      <title>Core file generation</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Core-file-generation/m-p/759659#M15146</link>
      <description>Hi!&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I am using the operation system ofLinux ubuntu 2.6.32-36-generic and Intel Fortran Compiler ifort 12.1.0&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Here is the question. when gcc or gfortran is employed to compile source file into .out program and when the segmentation fault occurs during the .out running, a core file will be generated in the working directory, with which gdb can locate the line where the error stemmed according to source files.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I have configured my system in bash with command&lt;/DIV&gt;&lt;DIV&gt;&lt;B&gt;$ulimit -c unlimited&lt;/B&gt;&lt;/DIV&gt;&lt;DIV&gt;and compile my source code with&lt;/DIV&gt;&lt;DIV&gt;&lt;B&gt;$ifort -O0 -debug -g core_test.f90 -o core_test.out&lt;/B&gt;&lt;/DIV&gt;&lt;DIV&gt;Runing the core_test.out, a expected segmentation fault occurs:&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;B&gt;$ ./core_test.out&lt;/B&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;B&gt;forrtl: severe (174): SIGSEGV, segmentation fault occurred&lt;/B&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;B&gt;Image           PC       Routine         Line     Source      &lt;/B&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;B&gt;core_test.out     08049E24 Unknown        Unknown Unknown&lt;/B&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;B&gt;core_test.out     08049D54 Unknown        Unknown Unknown&lt;/B&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;B&gt;libc.so.6         00D9DBD6 Unknown        Unknown Unknown&lt;/B&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;B&gt;core_test.out     08049C61 Unknown        Unknown Unknown&lt;/B&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;But the desired core file is not found!&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Can Intel fortran compiler generate the core file? And how to do it?&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Thanks for any help!&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Best regards,&lt;/DIV&gt;&lt;DIV&gt;David&lt;/DIV&gt;</description>
      <pubDate>Tue, 22 Nov 2011 13:19:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Core-file-generation/m-p/759659#M15146</guid>
      <dc:creator>Wu__Wentao</dc:creator>
      <dc:date>2011-11-22T13:19:53Z</dc:date>
    </item>
    <item>
      <title>Core file generation</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Core-file-generation/m-p/759660#M15147</link>
      <description>Did you set your core file limit to something other than 0? Commonly it defaults to 0. You also need to be using idb from the 12.1.1 compilers to debug core files from the command line. And, make sure you compile with -g for symbols, and with -fpe0 to catch the exception. Here's how:&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;~&amp;gt; ifort -V&lt;/P&gt;&lt;P&gt;Intel Fortran Intel 64 Compiler XE for applications running on Intel 64, Version 12.1.1.256 Build 20111011&lt;/P&gt;&lt;P&gt;~&amp;gt; cat DivZero.f90&lt;/P&gt;&lt;P&gt;program div_zero&lt;/P&gt;&lt;P&gt;real x,y,z&lt;/P&gt;&lt;P&gt;x=1.0&lt;/P&gt;&lt;P&gt;y=0.0&lt;/P&gt;&lt;P&gt;z=x/y&lt;/P&gt;&lt;P&gt;print *,'z = ',z&lt;/P&gt;&lt;P&gt;end program div_zero&lt;/P&gt;&lt;P&gt;~&amp;gt; ifort DivZero.f90 -g -c&lt;/P&gt;&lt;P&gt;~&amp;gt; ifort DivZero.f90 -g -fpe0 -o DivZero.x&lt;/P&gt;&lt;P&gt;~&amp;gt; ulimit -c unlimited&lt;/P&gt;&lt;P&gt;~&amp;gt; ./DivZero.x&lt;/P&gt;&lt;P&gt;forrtl: error (73): floating divide by zero&lt;/P&gt;&lt;P&gt;Image PC Routine Line Source&lt;/P&gt;&lt;P&gt;DivZero.x 0000000000402C53 Unknown Unknown Unknown&lt;/P&gt;&lt;P&gt;DivZero.x 0000000000402BEC Unknown Unknown Unknown&lt;/P&gt;&lt;P&gt;libc.so.6 00007F9ECEBC9BC6 Unknown Unknown Unknown&lt;/P&gt;&lt;P&gt;DivZero.x 0000000000402AE9 Unknown Unknown Unknown&lt;/P&gt;&lt;P&gt;Aborted (core dumped)&lt;/P&gt;&lt;P&gt;~&amp;gt; ls core&lt;/P&gt;&lt;P&gt;core&lt;/P&gt;&lt;P&gt;~&amp;gt; idbc DivZero.x core&lt;/P&gt;&lt;P&gt;Intel Debugger for applications running on Intel 64, Version 12.1, Build [76.896.14]&lt;/P&gt;&lt;P&gt;------------------&lt;/P&gt;&lt;P&gt;object file name: DivZero.x&lt;/P&gt;&lt;P&gt;core file name: core&lt;/P&gt;&lt;P&gt;[New Thread 7078 (LWP 7078 "")]&lt;/P&gt;&lt;P&gt;Reading symbols from /home/pbkenned/DivZero.x...done.&lt;/P&gt;&lt;P&gt;Program received signal SIGABRT&lt;/P&gt;&lt;P&gt;raise () in /lib64/libc-2.11.1.so&lt;/P&gt;&lt;P&gt;(idb) symbol-file DivZero.o&lt;/P&gt;&lt;P&gt;(idb) list&lt;/P&gt;&lt;P&gt;1 program div_zero&lt;/P&gt;&lt;P&gt;2 real x,y,z&lt;/P&gt;&lt;P&gt;3 x=1.0&lt;/P&gt;&lt;P&gt;4 y=0.0&lt;/P&gt;&lt;P&gt;5 z=x/y&lt;/P&gt;&lt;P&gt;6 print *,'z = ',z&lt;/P&gt;&lt;P&gt;7 end program div_zero&lt;/P&gt;&lt;P&gt;(idb) where&lt;/P&gt;&lt;P&gt;#0 0x00007f9ecebdd945 in raise () in /lib64/libc-2.11.1.so&lt;/P&gt;&lt;P&gt;#1 0x00007f9ecebdef21 in abort () in /lib64/libc-2.11.1.so&lt;/P&gt;&lt;P&gt;#2 0x0000000000403268 in for__signal_handler () in /home/pbkenned/DivZero.x&lt;/P&gt;&lt;P&gt;#3 0x00007f9ecef185d0 in __restore_rt () in /lib64/libpthread-2.11.1.so&lt;/P&gt;&lt;P&gt;#4 0x0000000000402c53 in div_zero () at /home/pbkenned/DivZero.f90:5&lt;/P&gt;&lt;P&gt;(idb)&lt;BR /&gt;&lt;BR /&gt;Patrick Kennedy&lt;BR /&gt;Intel Developer Support&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2011 20:47:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Core-file-generation/m-p/759660#M15147</guid>
      <dc:creator>pbkenned1</dc:creator>
      <dc:date>2011-11-22T20:47:48Z</dc:date>
    </item>
    <item>
      <title>Core file generation</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Core-file-generation/m-p/759661#M15148</link>
      <description>Thank you Patrick! I have repeated your procedure and obtained the core file.&lt;DIV&gt;However, my program still cannot generate it.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;B&gt;$ ulimit -c unlimited&lt;/B&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;B&gt;$ ulimit -a&lt;/B&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;core file size     (blocks, -c) unlimited&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;data seg size      (kbytes, -d) unlimited&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;scheduling priority       (-e) 20&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;file size        (blocks, -f) unlimited&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;pending signals         (-i) 16382&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;max locked memory    (kbytes, -l) 64&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;max memory size     (kbytes, -m) unlimited&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;open files           (-n) 1024&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;pipe size      (512 bytes, -p) 8&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;POSIX message queues   (bytes, -q) 819200&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;real-time priority       (-r) 0&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;stack size       (kbytes, -s) 8192&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;cpu time        (seconds, -t) unlimited&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;max user processes       (-u) unlimited&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;virtual memory     (kbytes, -v) unlimited&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;file locks           (-x) unlimited&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;B&gt;$ cat core_test.f90&lt;/B&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;program main&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt; implicit none&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt; integer :: i&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt; integer, dimension(:), allocatable :: x&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt; &lt;I&gt;&lt;B&gt;!	&lt;/B&gt;allocate(x(5))&lt;/I&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt; do i = 1, 5&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;  x(i) = i&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt; end do&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt; stop&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;end program&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;B&gt;$ ifort core_test.f90 -g -c&lt;/B&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;B&gt;$ ifort core_test.f90 -g -fpe0 -O0 -o core_test.x&lt;/B&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;B&gt;$ ./core_test.x&lt;/B&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;forrtl: severe (174): SIGSEGV, segmentation fault occurred&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Image         PC       Routine         Line      Source      &lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;core_test.x    08049DAA Unknown        Unknown Unknown&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;core_test.x    08049D34 Unknown        Unknown Unknown&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;libc.so.6       00126BD6 Unknown        Unknown Unknown&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;core_test.x    08049C41 Unknown        Unknown Unknown&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;B&gt;$ ls -al core&lt;/B&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;ls: cannot access core: No such file or directory&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;DIV id="_mcePaste"&gt;&lt;B&gt;$ ls -al&lt;/B&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;total 492&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;drwxr-xr-x 2 davidwu davidwu  4096 2011-11-23 11:52 .&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;drwxr-xr-x 4 davidwu davidwu  4096 2011-11-23 11:45 ..&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;-rw-r--r-- 1 davidwu davidwu  150 2011-11-23 11:46 core_test.f90&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;-rw-r--r-- 1 davidwu davidwu  2136 2011-11-23 11:51 core_test.o&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;-rwxr-xr-x 1 davidwu davidwu 486687 2011-11-23 11:52 core_test.x&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Did I miss something?&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Best regards,&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;David&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 23 Nov 2011 03:59:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Core-file-generation/m-p/759661#M15148</guid>
      <dc:creator>Wu__Wentao</dc:creator>
      <dc:date>2011-11-23T03:59:01Z</dc:date>
    </item>
    <item>
      <title>Core file generation</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Core-file-generation/m-p/759662#M15149</link>
      <description>Hello David,&lt;BR /&gt;No core file was created...very strange. I don't think you missed anything. You are using an earlier v12 ifort than I am, but I doubt this has anything to do with the compiler itself. Perhaps it is something about your version of Linux, ubuntu 2.6.32-36-generic. I see on different versions of Linux, the core file might have a different name, like core.1867, but you listed everything in the directory where you ran the executable, and there is no file matching core*. Let me look into this, and I'll get back to you.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Patrick</description>
      <pubDate>Wed, 23 Nov 2011 14:45:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Core-file-generation/m-p/759662#M15149</guid>
      <dc:creator>pbkenned1</dc:creator>
      <dc:date>2011-11-23T14:45:47Z</dc:date>
    </item>
    <item>
      <title>Core file generation</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Core-file-generation/m-p/759663#M15150</link>
      <description>&lt;P&gt;OK, this has nothing to do with the flavor of Linux OS.The issue is that with your test case, the Fortran runtime is aborting the program before the core file can be generated. For a case like this, you need to set the environment variable f77_dump_flag=TRUE to return control to the program. &lt;BR /&gt;&lt;BR /&gt;Notice that when you ran, you didn't get 'Aborted (core dumped)'. Set f77_dump_flag=TRUE, and rerun the program. I did the following with your example on Ubuntu 10.10 (Linux version 2.6.35-22-generic):&lt;/P&gt;&lt;P&gt;$ ifort -V&lt;/P&gt;&lt;P&gt;Intel Fortran Compiler XE for applications running on IA-32, Version 12.1.1.256 Build 20111011&lt;/P&gt;&lt;P&gt;$ ifort -g -c core_test.f90&lt;/P&gt;&lt;P&gt;$ ifort core_test.f90 -g -fpe0 -O0 -o core_test.x -traceback&lt;/P&gt;&lt;P&gt;$ export f77_dump_flag=TRUE&lt;/P&gt;&lt;P&gt;$ ./core_test.x&lt;/P&gt;&lt;P&gt;forrtl: severe (174): SIGSEGV, segmentation fault occurred&lt;/P&gt;&lt;P&gt;Image PC Routine Line Source&lt;/P&gt;&lt;P&gt;core_test.x 08049DAA MAIN__ 7 core_test.f90&lt;/P&gt;&lt;P&gt;core_test.x 08049D34 Unknown Unknown Unknown&lt;/P&gt;&lt;P&gt;libc.so.6 003CCCE7 Unknown Unknown Unknown&lt;/P&gt;&lt;P&gt;core_test.x 08049C41 Unknown Unknown Unknown&lt;/P&gt;&lt;P&gt;Aborted (core dumped)&lt;BR /&gt;&lt;BR /&gt;I verified this generate the core file.&lt;BR /&gt;&lt;BR /&gt;Patrick&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2011 16:35:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Core-file-generation/m-p/759663#M15150</guid>
      <dc:creator>pbkenned1</dc:creator>
      <dc:date>2011-11-23T16:35:09Z</dc:date>
    </item>
    <item>
      <title>Core file generation</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Core-file-generation/m-p/759664#M15151</link>
      <description>Thank you very muchfor your compehensive analysis and elegent solution!&lt;DIV&gt;After export the f77_dump_flag environment variable, the core file was eventually generated!&lt;/DIV&gt;</description>
      <pubDate>Thu, 24 Nov 2011 05:12:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Core-file-generation/m-p/759664#M15151</guid>
      <dc:creator>Wu__Wentao</dc:creator>
      <dc:date>2011-11-24T05:12:48Z</dc:date>
    </item>
  </channel>
</rss>

