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

SIGSEGV

pilato__giuseppe
Beginner
415 Views

Hello, my name is Giuseppe Pilato, a student of Space Engineering in Italy

I need help; I am using a code, written in our department, that uses ifortran as compiler.

After having compiled, I try to run the code, but what I get is always:    

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

Stack trace terminated abnormally.

I have put a series of flags into the code, for trying to solve the part of the code that does not work, and it seems that the code can't do this operation:

 function co_a(ro,p,rotot,Rtot)
      implicit none
      include "MS.inc"
       integer s
       double precision co_a
       double precision ro(nsc),Rtot
      double precision p,rotot,gam
      double precision cp,cpi(10),comp_ms_tab
      

        cp=0.d0
        cpi=0.d0
        do s=1,10
        
        write(*,*)'i am here delta'
        
          cpi(s)=comp_ms_tab(ro(s),p,rotot,Rtot,s,cp_tab)

I have already checked the stack sizing, and it seems okay

Can anybody help me?

I'll appreciate,

sorry for the disturb, Thank you

 

 

 

 

0 Kudos
3 Replies
Lorri_M_Intel
Employee
415 Views

hi Giuseppe,

    Unfortunately, you haven't really given us enough details to help.  But, let me give you some more things to try.

    First, compile using "-warn all"  and "-check all".   This will turn on extra checking to make sure there isn't something fundamentally wrong, such as array access out of its legal bounds.

    Second, add the "-traceback" switch when you build.   This should give you a more detailed traceback as to which routine is actually failing.

    One "unexpected' thing that could be happening, other than accessing an array out of bounds, is perhaps you are trying to write to a constant.  This can happen if you pass a constant (such as 2.0) to a function, and the function tries to set that argument to a different number.

                    Good luck,

                                      --Lorri

0 Kudos
TimP
Honored Contributor III
415 Views

The advice posted several years ago at https://software.intel.com/en-us/articles/determining-root-cause-of-sigsegv-or-sigbus-errors still stands.

0 Kudos
Greg_T_
Valued Contributor I
415 Views

Hi Giuseppe,

Does the program you are using have cases or models with known results, such as comparison to closed-form solutions, as test cases?  If yes, do the known result test cases run correctly?  Even if the test case is very basic, starting from a working model could help with your debugging.  Debugging can be difficult but there is always a reason that a program does not work.  Good Luck.

Regards, Greg

0 Kudos
Reply