- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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):
$ ifort -V
Intel Fortran Compiler XE for applications running on IA-32, Version 12.1.1.256 Build 20111011
$ ifort -g -c core_test.f90
$ ifort core_test.f90 -g -fpe0 -O0 -o core_test.x -traceback
$ export f77_dump_flag=TRUE
$ ./core_test.x
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
core_test.x 08049DAA MAIN__ 7 core_test.f90
core_test.x 08049D34 Unknown Unknown Unknown
libc.so.6 003CCCE7 Unknown Unknown Unknown
core_test.x 08049C41 Unknown Unknown Unknown
Aborted (core dumped)
I verified this generate the core file.
Patrick
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
~> ifort -V
Intel Fortran Intel 64 Compiler XE for applications running on Intel 64, Version 12.1.1.256 Build 20111011
~> cat DivZero.f90
program div_zero
real x,y,z
x=1.0
y=0.0
z=x/y
print *,'z = ',z
end program div_zero
~> ifort DivZero.f90 -g -c
~> ifort DivZero.f90 -g -fpe0 -o DivZero.x
~> ulimit -c unlimited
~> ./DivZero.x
forrtl: error (73): floating divide by zero
Image PC Routine Line Source
DivZero.x 0000000000402C53 Unknown Unknown Unknown
DivZero.x 0000000000402BEC Unknown Unknown Unknown
libc.so.6 00007F9ECEBC9BC6 Unknown Unknown Unknown
DivZero.x 0000000000402AE9 Unknown Unknown Unknown
Aborted (core dumped)
~> ls core
core
~> idbc DivZero.x core
Intel Debugger for applications running on Intel 64, Version 12.1, Build [76.896.14]
------------------
object file name: DivZero.x
core file name: core
[New Thread 7078 (LWP 7078 "")]
Reading symbols from /home/pbkenned/DivZero.x...done.
Program received signal SIGABRT
raise () in /lib64/libc-2.11.1.so
(idb) symbol-file DivZero.o
(idb) list
1 program div_zero
2 real x,y,z
3 x=1.0
4 y=0.0
5 z=x/y
6 print *,'z = ',z
7 end program div_zero
(idb) where
#0 0x00007f9ecebdd945 in raise () in /lib64/libc-2.11.1.so
#1 0x00007f9ecebdef21 in abort () in /lib64/libc-2.11.1.so
#2 0x0000000000403268 in for__signal_handler () in /home/pbkenned/DivZero.x
#3 0x00007f9ecef185d0 in __restore_rt () in /lib64/libpthread-2.11.1.so
#4 0x0000000000402c53 in div_zero () at /home/pbkenned/DivZero.f90:5
(idb)
Patrick Kennedy
Intel Developer Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Thanks,
Patrick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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):
$ ifort -V
Intel Fortran Compiler XE for applications running on IA-32, Version 12.1.1.256 Build 20111011
$ ifort -g -c core_test.f90
$ ifort core_test.f90 -g -fpe0 -O0 -o core_test.x -traceback
$ export f77_dump_flag=TRUE
$ ./core_test.x
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
core_test.x 08049DAA MAIN__ 7 core_test.f90
core_test.x 08049D34 Unknown Unknown Unknown
libc.so.6 003CCCE7 Unknown Unknown Unknown
core_test.x 08049C41 Unknown Unknown Unknown
Aborted (core dumped)
I verified this generate the core file.
Patrick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page