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

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

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 !

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

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 ?

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.  

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

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 ... 

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"


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 !?

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 00000032D2472BBA Unknown Unknown Unknown 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 00002B40ECB05403 Unknown Unknown Unknown

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

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

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


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.

When I tried to follow the indications and solutions listed in this article, with the option '-g -traceback', I got this type of error :

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


/lib64/ [0x32d24722ef]

/lib64/ (cfree + 0x4b) [0x32d247273b]

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

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

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



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 ?  

Finally I solved the problem simply by replacing the line 




the GESVD gives the same results without causing any problem.

Thanks for your help. 

Leave a Comment

Please sign in to add a comment. Not a member? Join today