- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all!
I use...
Intel Fortran Compiler for 32-bit applications, Version 9.0 Build 20051201Z Package ID: l_fc_c_9.0.031
Copyright (C) 1985-2005 Intel Corporation. All rights reserved.
FOR NON-COMMERCIAL USE ONLY
...on a linux machine running RedHatEL4...
Linux lpaspc76 2.6.9-34.ELsmp #1 SMP Fri Feb 24 16:54:53 EST 2006 i686 i686 i386 GNU/Linux
...and try to compile the following code...
program test
implicit none
real, pointer :: p(:,:)
nullify(p)
call gugus(p)
end program test
subroutine gugus(h)
implicit none
real, pointer :: h(:,:)
if (associated(h)) deallocate(h)
end subroutine gugus
...using the ifort compiler with the following options...
ifort -C -g -debug extended -traceback -o test3 test3.f90
...and get a segmentation fault upon execution...
> ./test3
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
test3 08049E88 gugus_ 7 test3.f90
test3 08049DB1 MAIN__ 5 test3.f90
test3 08049BC5 Unknown Unknown Unknown
libc.so.6 00347E23 Unknown Unknown Unknown
test3 08049B01 Unknown Unknown Unknown
...while this compiles fine on Sun and pgf90 compilers and up to my knowledge should work.
Can you help?
Oliver Fuhrer
I use...
Intel Fortran Compiler for 32-bit applications, Version 9.0 Build 20051201Z Package ID: l_fc_c_9.0.031
Copyright (C) 1985-2005 Intel Corporation. All rights reserved.
FOR NON-COMMERCIAL USE ONLY
...on a linux machine running RedHatEL4...
Linux lpaspc76 2.6.9-34.ELsmp #1 SMP Fri Feb 24 16:54:53 EST 2006 i686 i686 i386 GNU/Linux
...and try to compile the following code...
program test
implicit none
real, pointer :: p(:,:)
nullify(p)
call gugus(p)
end program test
subroutine gugus(h)
implicit none
real, pointer :: h(:,:)
if (associated(h)) deallocate(h)
end subroutine gugus
...using the ifort compiler with the following options...
ifort -C -g -debug extended -traceback -o test3 test3.f90
...and get a segmentation fault upon execution...
> ./test3
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
test3 08049E88 gugus_ 7 test3.f90
test3 08049DB1 MAIN__ 5 test3.f90
test3 08049BC5 Unknown Unknown Unknown
libc.so.6 00347E23 Unknown Unknown Unknown
test3 08049B01 Unknown Unknown Unknown
...while this compiles fine on Sun and pgf90 compilers and up to my knowledge should work.
Can you help?
Oliver Fuhrer
Link Copied
4 Replies
- 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
Dear Ron,
It doesn't seem to do the trick! Also, since the variable passed is simply a nullified pointer, it should not require any stackspace. Any more ideas?
oli
[fuhrer@lpaspc76 ~]$ ifort -o test test.f90
[fuhrer@lpaspc76 ~]$ ./test
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
test 08049E55 Unknown Unknown Unknown
test 08049BC5 Unknown Unknown Unknown
libc.so.6 00347E23 Unknown Unknown Unknown
test 08049B01 Unknown Unknown Unknown
[fuhrer@lpaspc76 ~]$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
pending signals (-i) 1024
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 32744
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
[fuhrer@lpaspc76 ~]$ ulimit -s unlimited
[fuhrer@lpaspc76 ~]$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
pending signals (-i) 1024
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
stack size (kbytes, -s) unlimited
cpu time (seconds, -t) unlimited
max user processes (-u) 32744
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
[fuhrer@lpaspc76 ~]$ ./test
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
test 08049E55 Unknown Unknown Unknown
test 08049BC5 Unknown Unknown Unknown
libc.so.6 00347E23 Unknown Unknown Unknown
test 08049B01 Unknown Unknown Unknown
[fuhrer@lpaspc76 ~]$
It doesn't seem to do the trick! Also, since the variable passed is simply a nullified pointer, it should not require any stackspace. Any more ideas?
oli
[fuhrer@lpaspc76 ~]$ ifort -o test test.f90
[fuhrer@lpaspc76 ~]$ ./test
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
test 08049E55 Unknown Unknown Unknown
test 08049BC5 Unknown Unknown Unknown
libc.so.6 00347E23 Unknown Unknown Unknown
test 08049B01 Unknown Unknown Unknown
[fuhrer@lpaspc76 ~]$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
pending signals (-i) 1024
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 32744
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
[fuhrer@lpaspc76 ~]$ ulimit -s unlimited
[fuhrer@lpaspc76 ~]$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
pending signals (-i) 1024
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
stack size (kbytes, -s) unlimited
cpu time (seconds, -t) unlimited
max user processes (-u) 32744
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
[fuhrer@lpaspc76 ~]$ ./test
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
test 08049E55 Unknown Unknown Unknown
test 08049BC5 Unknown Unknown Unknown
libc.so.6 00347E23 Unknown Unknown Unknown
test 08049B01 Unknown Unknown Unknown
[fuhrer@lpaspc76 ~]$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Oliver,
The reason is that you may not use the dimension(:) syntax (assumed-shape arrays) for dummy elements without providing an explicit interface as the compiler needs to know that is has to pass extra information.
The compiler knows this when you use ifort -gen_interfaces, which you could use a ugly work around. (Unfortunally, ifort does not warn in such cases.)
Tobias
program testAs the NAG compiler nicely points out:
implicit none
real, pointer :: p(:,:)
nullify(p)
call gugus(p)
end program test
subroutine gugus(h)
implicit none
real, pointer :: h(:,:)
if (associated(h)) deallocate(h)
end subroutine gugus
Explicit interface required for GUGUS from TEST - argument H (no. 1) is a POINTERIf you change the code to
program testit works. Alternatively you can put gugus into a module, which you include via "use". (Or [ugly style] you add an interface block to program test.)
...
contains
subroutine gugus(h)
...
end subroutine gugus
end program test
The reason is that you may not use the dimension(:) syntax (assumed-shape arrays) for dummy elements without providing an explicit interface as the compiler needs to know that is has to pass extra information.
The compiler knows this when you use ifort -gen_interfaces, which you could use a ugly work around. (Unfortunally, ifort does not warn in such cases.)
Tobias
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tobias-Burnus:
The compiler knows this when you use ifort -gen_interfaces, which you could use a ugly work around. (Unfortunally, ifort does not warn in such cases.)
That's a bug in the process of being fixed. Don't rely on that behavior.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page