segfault: ifc 7.1 vs ifort 8.0

segfault: ifc 7.1 vs ifort 8.0

Hello,

I've seen this problem raised several times here. But, I still have a few questions.

The attached program runs fine with ifc 7.1 but segfaults with ifort 8.0 (even with an unlimited stacksize). Similar symptoms have been reported here, and the answer given has been (to summarize)

If your program is statically linked with the LinuxThread
library, the program will segfault.

My questions are
1) How can we check whether our program is statically
linked with the problematic thread library?

2) What is the difference between ifc 7.1 and ifort 8.0?

Regarding (1), the problem occurs without any compilation option. /opt/intel_fc_80/bin/ifort.cfg contains only "-I/opt/intel_fc_80/include". So, I don't understand why a thread library is concerned at all in the first place. Could someone enlighten me?

Regarding (2), I *guess* the problem occurs because ifort 8.0 allocates automatic arrays on the stack (which I think is perfectly fine). But what does ifc 7.1 do then?

I'd appreciate any help.
Thank you,
Ryo
-------------------------
amakihi[~/tmp/prob3.1]$ cat try.f90
program try
implicit NONE
integer:: n

n = 1000000
call sub

contains

subroutine sub
real(8), dimension(n):: a
write(*,*) "hello"
write(10) a
end subroutine sub

end program try
amakihi[~/tmp/prob3.1]$ /opt/intel/compiler70/ia32/bin/ifc try.f90
program TRY
internal subroutine SUB

16 Lines Compiled
amakihi[~/tmp/prob3.1]$ ./a.out
hello
amakihi[~/tmp/prob3.1]$ /opt/intel_fc_80/bin/ifort try.f90
amakihi[~/tmp/prob3.1]$ ./a.out
Segmentation fault
amakihi[~/tmp/prob3.1]$ ulimit -s
unlimited
amakihi[~/tmp/prob3.1]$

1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.