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

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

JIquan_P_
Beginner
810 Views

when I compiled my program m.f90 with command: "ifort m.f90" and then run it "./a.out", error occured as follows

a           1
 b           1
 c           1
 a           2
forrtl: severe (174): SIGSEGV, segmentation fault occurred,

I don't understand why

The following is my program m.f90:

module system_info
 implicit none
type::phi_alpha_beta
     complex(kind=8)::wv0_up,wv0_down
     complex(kind=8)::rwv_up,rwv_down
     integer,allocatable::sz(:)
 end type
 contains
 subroutine markov_skip(phi_ab)
 implicit none
 type(phi_alpha_beta)::phi_ab(4)
 complex(kind=8)::rphi_up(4),rphi_down(4)
 integer::iphi
  complex(kind=8)::wv_new(4),wv_old(4)
 do iphi=1,4
     write(*,*)"a",iphi
     wv_old(iphi)=phi_ab(iphi).wv0_up*phi_ab(iphi).wv0_down*phi_ab(iphi).rwv_up*phi_ab(iphi).rwv_down
     write(*,*)"b",iphi
     wv_new(iphi)=wv_old(iphi)*rphi_up(iphi)*rphi_down(iphi)
     write(*,*)"c",iphi
 end do
 end subroutine
 end module system_info

 program main
 use system_info
 implicit none
 type(phi_alpha_beta)::phi_ab(4)
 call markov_skip(phi_ab)
 end program

 

ifort version 14.0.3

0 Kudos
2 Replies
Steven_L_Intel1
Employee
809 Views

I can reproduce the problem and it appears to be an optimization bug, You could compile this program with -O1 to avoid the error. I have escalated this problem to development as issue DPD200367076 and will update this thread when I have news about a fix.

0 Kudos
Steven_L_Intel1
Employee
809 Views

I expect this bug to be fixed in Update 3, scheduled for May.

0 Kudos
Reply