Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29253 토론

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

moghaddam
초급자
42,792 조회수

Hi All,

I get the following error as I run my code.

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

I was wondering if anyone knows what is the source of this error!

Thanks in advance!

Sarvin

0 포인트
28 응답
Steven_L_Intel1
40,395 조회수

There are infinite possibilities. Two articles I wrote for Windows Fortran would also be instructive for you. These cover Access Violation (SEGV on Linux) and Stack Overflow. On Linux, you can try raising the stack limit with "ulimit -s" or "limit stacksizae unlimited" depending on your shell.

The key to identifying the cause is to find exactly WHERE in your program this error is occurring. Use of -traceback can help here.

0 포인트
grs2103
초급자
40,395 조회수
I have the exact same error with RJ LeVeque's CLAWPACK software:

http://www.amath.washington.edu/~claw/

which is pretty benign code.
0 포인트
grs2103
초급자
40,395 조회수
switching to the fce, as opposed to the fc distribution, which I understand to be the 64 bit version eliminates this error. It'd be great to understand why though.
0 포인트
Jason_A_
초급자
40,395 조회수
Thanks for the fc versus fce tip. I'm running on an Intel 64-bit MacPro running Leopard OSX 10.5.2 and this solved my segmentation fault problem.

-Jason
0 포인트
changks888
초급자
40,395 조회수
Thanks for the fc versus fce tip. I'm running on an Intel 64-bit MacPro running Leopard OSX 10.5.2 and this solved my segmentation fault problem.

-Jason

Hi,

I'm running on the same machine(Macbook Pro), however I still have the same problems.

:

:

soil water balance error @ 1990 365 23 30
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
runclass 000000010005EAC7 Unknown Unknown Unknown
runclass 000000010005DDA9 Unknown Unknown Unknown
runclass 00000001000009BC Unknown Unknown Unknown
runclass 0000000100000954 Unknown Unknown Unknown
CNCALASS cks$

Could you show me a right direction? Thanks.

I'm just wondering that the Makefile did not allocate the memory, but I do not know how to convert the Makefile for IBM Fortran Compiler to Intel Fortran Compiler. (The original Makefile was build for the programs I'm trying to run under Intel Fortran Compiler!)

====

.SUFFIXES : .f .o

FC=xlf90

FFLAGS= -q64 -O0 -qrealsize=8 -qintsize=8 -qsave -qspillsize=32648

:
:
:
====

0 포인트
jirina
새로운 기여자 I
40,395 조회수

In my case of the segmentation fault, it helped me to increase the stack size using "ulimit -s unlimited". I am using Intel Fortran 11.0.069 on Kubuntu 8.04.

0 포인트
changks888
초급자
40,395 조회수
Quoting - jirina

In my case of the segmentation fault, it helped me to increase the stack size using "ulimit -s unlimited". I am using Intel Fortran 11.0.069 on Kubuntu 8.04.

Where did you put "ulimit -s unlimited"? In the Makefile?

0 포인트
jirina
새로운 기여자 I
40,395 조회수

I used that command in the shell (console) before running my application.

Using the SYSTEM function from IFPORT to send a command to the shell would not help in this case, because the command is executed in a separate shell and does not affect the shell which the application is running in.

I am running Kubuntu 8.04 and if I want to have certain settings for each shell I start, I add the corresponding commands at the end of the file .bashrc in the home directory. E.g., I have this:

# set up environment for Intel Fortran

source /opt/intel/Compiler/11.0/069/bin/ifortvars.sh ia32

# set unlimited stack size

ulimit -s unlimited

0 포인트
changks888
초급자
40,395 조회수

Is that possible the error generated because of the program contains "rand()" function?

Here is another previous post.

http://software.intel.com/en-us/articles/intel-fortran-compiler-using-rand-and-random-portability-functions-avoid-segv

In the source code, program uses the rand() function to randomly choose the meteorological files for rewinding files.

:

:

!-----pre-running meteorological data

open(unit=41,file="TP39_met03_class.dat")

open(unit=42,file="TP39_met04_class.dat")

open(unit=43,file="TP39_met05_class.dat")

open(unit=44,file="TP39_met06_class.dat")

open(unit=45,file="TP39_met07_class.dat")

:

:

idfile = 40+int(rand()*4+1) !open file id = 41,42

rewind(unit=idfile) !rewinding the file to the first line

print *,iyear,idfile !for checking purpose

endif

0 포인트
TimP
명예로운 기여자 III
40,396 조회수

Is that possible the error generated because of the program contains "rand()" function?

idfile = 40+int(rand()*4+1) !open file id = 41,42

That looks strange, but you're right, it requires the addition of the corresponding interface block, e.g. by USE IFPORT, as the empty argument is broken without interface definition.

0 포인트
janet_p_simpsonnasa_
40,396 조회수

Hi All,

I get the following error as I run my code.

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

I was wondering if anyone knows what is the source of this error!

Thanks in advance!

Sarvin

0 포인트
janet_p_simpsonnasa_
40,396 조회수
I have found that if I compile with NO optimization (ifort -O0 file.f), then I no longer get SEGV.
There must be a bug in the compiler - I have narrowed down the place where the SEGV occurs to
a little loop in a table-lookup subroutine that should NEVER NEVER be vectorized.

Of course the resulting compiled program runs no faster than what I get on a 3.5 year old Linux workstation.

Cheers.

0 포인트
Ron_Green
중재자
40,396 조회수

As Steve said, segmentation violations can come from many many things.

80% of the time, simply increasing your stacksize fixes the problem. OR just compile with

-heap-arrays

that takes care of 80% of the cases.

Next, isolate the fault with a stack traceback

-O2 (or -O3) -g -traceback

on both compile and link.

Yes, you can add -g to get symbolic information on optimized code as long as you also include a -Ox option.

Next, make sure you're not doing something silly in your code (array bounds violations, for example)

...other options... -g -traceback -check all -fp-stack-check

That finds 99% of these. The remaining 1%, possible compiler bug. Tar up the code, open a problem report at premier.intel.com, attach the file, include instructions on how to build and run.

ron

0 포인트
randiaulii
초급자
40,396 조회수
There are infinite possibilities. Two articles I wrote for Windows Fortran would also be instructive for you. These cover Access Violation (SEGV on Linux) and Stack Overflow. On Linux, you can try raising the stack limit with "ulimit -s" or "limit stacksizae unlimited" depending on your shell.

The key to identifying the cause is to find exactly WHERE in your program this error is occurring. Use of -traceback can help here.

Where could I find the two articles (Access Violation and Stack Overflow)?

Thanks,
Randi
0 포인트
Steven_L_Intel1
40,394 조회수

New forum links: Access Violation and Stack Overflow
0 포인트
ceambi
초급자
40,394 조회수

Hi Jirina,

I noticed that you had a same error before as what I have now. The error am having now as follow :
Any thoughts how tio fix this problem? Many thanks in advance yeah. Regards.
Namelist dfi_control not found in namelist.input. Using registry defaults for v
ariables in dfi_control
Namelist tc not found in namelist.input. Using registry defaults for variables
in tc
Namelist scm not found in namelist.input. Using registry defaults for variables
in scm
Namelist fire not found in namelist.input. Using registry defaults for variable
s in fire
REAL_EM V3.1.1 PREPROCESSOR
*************************************
Parent domain
ids,ide,jds,jde 1 74 1 61
ims,ime,jms,jme -4 79 -4 66
ips,ipe,jps,jpe 1 74 1 61
*************************************
DYNAMICS OPTION: Eulerian Mass Coordinate
alloc_space_field: domain 1, 98642504 bytes allocated
Time period # 1 to process = 1996-01-01_00:00:00.
Time period # 2 to process = 1996-01-01_06:00:00.
Time period # 3 to process = 1996-01-01_12:00:00.
Time period # 4 to process = 1996-01-01_18:00:00.
Time period # 5 to process = 1996-01-02_00:00:00.
Time period # 6 to process = 1996-01-02_06:00:00.
Time period # 7 to process = 1996-01-02_12:00:00.
Time period # 8 to process = 1996-01-02_18:00:00.
Time period # 9 to process = 1996-01-03_00:00:00.
Time period # 10 to process = 1996-01-03_06:00:00.
Time period # 11 to process = 1996-01-03_12:00:00.
Time period # 12 to process = 1996-01-03_18:00:00.
Time period # 13 to process = 1996-01-04_00:00:00.
Time period # 14 to process = 1996-01-04_06:00:00.
Time period # 15 to process = 1996-01-04_12:00:00.
Time period # 16 to process = 1996-01-04_18:00:00.
Time period # 17 to process = 1996-01-05_00:00:00.
Time period # 18 to process = 1996-01-05_06:00:00.
Time period # 19 to process = 1996-01-05_12:00:00.
Time period # 20 to process = 1996-01-05_18:00:00.
Time period # 21 to process = 1996-01-06_00:00:00.
Time period # 22 to process = 1996-01-06_06:00:00.
Time period # 23 to process = 1996-01-06_12:00:00.
Time period # 24 to process = 1996-01-06_18:00:00.
Time period # 25 to process = 1996-01-07_00:00:00.
Time period # 26 to process = 1996-01-07_06:00:00.
Time period # 27 to process = 1996-01-07_12:00:00.
Time period # 28 to process = 1996-01-07_18:00:00.
Total analysis times to input = 28.
-----------------------------------------------------------------------------
Domain 1: Current date being processed: 1996-01-01_00:00:00.0000, which is loop # 1 out of 28
configflags%julyr, %julday, %gmt: 1996 1 0.0000000E+00
d01 1996-01-01_00:00:00 Timing for input 0 s.
Converged znw(kte) should be about 0.0 = -2.0489097E-08
d01 1996-01-01_00:00:00 Old data, no inland lake information
LAND CHANGE = 0
WATER CHANGE = 0
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
real.exe 080979AC Unknown Unknown Unknown
real.exe 08067164 Unknown Unknown Unknown
real.exe 0804BAF7 Unknown Unknown Unknown
real.exe 0804AC7B Unknown Unknown Unknown
real.exe 0804A8F1 Unknown Unknown Unknown
libc.so.6 005C2E9C Unknown Unknown Unknown
real.exe 0804A801 Unknown Unknown Unknown
[ceambi@cen-mm5-dev2 run]$

0 포인트
Steven_L_Intel1
40,394 조회수

ceambi,

This error message has many possible causes. Please read Diagnosing SIGSEGV Errors.

0 포인트
snkhaderi
초급자
40,394 조회수

I got segmentation fault when I increased some array sizes in my code. I tried using -traceback, but it did not help.

As recommended in this thread, I set 'ulimit -s unlimited' and I got rid of the segmentation faults.

Thanks to you guys,

Syed

0 포인트
Brian_Allison
초급자
40,394 조회수
What do you mean by fce or fc?
0 포인트
Alex_Adams
초급자
36,330 조회수
Hello Steve

I can not find any link about 'Access Vilation' and 'Stack Overflow' in the page you give.

and

can you tell me how to use -traceback to do this job?


thanks,
alex
0 포인트
응답