Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29284 Discussions

forrtl: severe (174): SIGSEGV, segmentation fault occurred

Ines_F_
Beginner
5,175 Views

Hi.  I encounterd the classical error  severe (174): SIGSEGV, segmentation fault occurred when i call the lapack subroutine GESDD on my fortran (90) program with the ifort composer 2013 Linux. 

!! Decomposition en valeurs singulieres

M = Factor_long*taille; N = 2*N_Emetteurs_CBFM

Allocate( AA(M,N), S(MIN(M,N)),U(M,M),VT(N,N), WW(MIN(M,N)-1))

AA = Epatch;  call GESDD(AA,S,U=U, VT=VT, JOBZ='A')

Results on : 

forrtl: severe (174): SIGSEGV, segmentation fault occurred

The real problem is that the error doesn't appear in the first passage through these code lines. it doesn't make any problem until a presize moment.

I have tried many things to rectify it : the option -heap-arrays; ulimit -s unlimited to increase my stack size .... it doesn't work. 

I don't know if this can be rectified if I use the fortran Interface !? 

Can I have some help if possible Pleaaaaaaaaaaaaaase !

0 Kudos
15 Replies
bpichon
Beginner
5,175 Views

Fisrt, did you try to use output parameter 'info' and, thus what is its output value ?

At fisrt look, it may be an 'out range subscript' in an array ; do you use '-C' option in compiler ?

0 Kudos
Ines_F_
Beginner
5,175 Views

I use '-c' option in compiler, I don't know the difference between the '-c' and '-C' options. I will try to see what the output parameter INFO gives as output value. Does the 'out range subscript' can explain please that most of the times it works and doesn't in some special cases ? Thank you.  

0 Kudos
bpichon
Beginner
5,175 Views

-C is for 'check bound' a very useful option that I use always

0 Kudos
Ines_F_
Beginner
5,175 Views

I tried to compile with the '-C' option and I get this type of problem : 

undefined reference to 'zgesvx_mkl95_'

undefined reference to 'zgesdd_mkl95_'

I find this a little bit bizarre since my code worked perfectly with the '-c' option and recognize these lapack functions. You should have an idea about this problem. Can you help me please ? Thank you for your patience ... 

0 Kudos
bpichon
Beginner
5,175 Views

May be I an in error ...

-C seems to direct the compiler to tranform real in complex (z... are routines for complex)

For the Intel compiler, the good option is "-check bound"

SORRY

0 Kudos
Ines_F_
Beginner
5,175 Views

It doesn't matter, thanks anyway for your help. 

I use actually the '-check bound' option and it doesn't help me to see or to understand the problem. I still waiting for the value of INFO (my code takes few minutes becausit handles with very great problems). I wonder if the problem haven't a relation with a luck of interfacing !?

0 Kudos
Ines_F_
Beginner
5,175 Views

and this is the result, I am not even able to see INFO value !!!

forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
libc.so.6 00000032D2472BBA Unknown Unknown Unknown
libc.so.6 00000032D2474BEE Unknown Unknown Unknown
myprog 00000000005D1B8D Unknown Unknown Unknown
myprog 0000000000D8273B Unknown Unknown Unknown
myprog 0000000000BC6659 Unknown Unknown Unknown
myprog 0000000000BC6EEC Unknown Unknown Unknown
myprog 0000000000A3A65C Unknown Unknown Unknown
myprog 0000000000A2E8FF Unknown Unknown Unknown
myprog 0000000000A2B0A2 Unknown Unknown Unknown
myprog 00000000005E4883 Unknown Unknown Unknown
myprog 000000000052DE75 Unknown Unknown Unknown
myprog 00000000005096D0 Unknown Unknown Unknown
myprog 00000000005069A0 Unknown Unknown Unknown
myprog 0000000000461CCB Unknown Unknown Unknown
libiomp5.so 00002B40ECB05403 Unknown Unknown Unknown

0 Kudos
TimP
Honored Contributor III
5,175 Views

You don't appear to have investigated many of the steps in the article

http://software.intel.com/en-us/articles/determining-root-cause-of-sigsegv-or-sigbus-errors

0 Kudos
Ines_F_
Beginner
5,175 Views

Thanks for the article, I will try to read and apply the recommondations. 

0 Kudos
Ines_F_
Beginner
5,175 Views

I runned the same code with ifort Compser 2013 for windows and it works ithout any problem. Does anyone have an explanation please.

0 Kudos
mecej4
Honored Contributor III
5,175 Views
I find this a little bit bizarre since my code worked perfectly with the '-c' option and recognize these lapack functions.
. This is perfectly normal. The -c option is for "compile only, do not try to link". The messages about "...undefined reference to xxxx_mkl95" arise from linking without including the Lapack-95 or Blas-95 libraries. When you built with the 2013 compiler you may have specified that the mkl_lapack95 library be included, so you did not receive the "undefined reference to..." messages.
0 Kudos
Ines_F_
Beginner
5,175 Views

When I tried to follow the indications and solutions listed in this article http://software.intel.com/en-us/articles/determining-root-cause-of-sigse..., with the option '-g -traceback', I got this type of error :

*** glibc detected *** ./myprog : double free or corruption (!prev) : 0x00002aaac40008co***

=====Backtrace====

/lib64/libc.so.6 [0x32d24722ef]

/lib64/libc.so.6 (cfree + 0x4b) [0x32d247273b]

/opt/intel/composer_xe_2013.0.079/compiler/lib/intel64/libifcoremt.so.5 (for_deallocate +0xb9) ....

Can anyone please help me to understand this error ? Thanks.

0 Kudos
Felipe_Marchant
Beginner
5,175 Views

I do not know if it's worth even, but the problem seems to be that you release the same memory twice.

Regards.

Felipe.

0 Kudos
Ines_F_
Beginner
5,175 Views

I still don't find a solution for my problem. When I apply my code to a great example, I get the same error. With 

ifort -p -g -O0 -fpe-all=0 -traceback -ftrapuv -fp-stack-check -check all -debug

I still always have :

*** glibc detected *** ./myprog : double free or corruption (!prev) : 0x00002aaac40008co***

Investigating on the precise line which causes this error, it found that it always the same line :

AA = Epatch;  call GESDD(AA,S,U=U, VT=VT, JOBZ='A')

What I found always strange is that the error is not systematic. For example, with 4 levels of the same code, it goes without any problem with the 3 first levels and it gives the double free or corruption (!prev) error while running the last level.

Since I'm sure that the problem is in relation with the GESDD, I've I thought to use an other SVD function (SVDpack for example) 

Can I have please your help and if possible any information about the SVDpack and its compatibility with ifort ?  

0 Kudos
Ines_F_
Beginner
5,175 Views

Finally I solved the problem simply by replacing the line 

call GESDD(AA,S,U=U, VT=VT, JOBZ='A')

with 

call GESVD(A=AA,S=S,U=U, VT=VT, JOBZ='A')

the GESVD gives the same results without causing any problem.

Thanks for your help. 

0 Kudos
Reply