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

Internal error while compiling source code on Linux for 64 bits

Arjen_Markus
Honored Contributor II
2,383 Views
Hello,

we are trying to build our programs for 64 bits Linux, but are stumbling on an ICE. The code compiles
fine for 32-bits, but causes the following message with 64 bits (ia64):

: catastrophic error: **Internal compiler error: internal abort** Please report this error along with the circumstances in which it occurred in a Software Problem Report. Note: File and line given may not be explicit cause of this error.

It is not clear where in the source file this is coming from. I did find out that the -g is causing the problem.
Without it, the compilation succeeds.

The platform: Linux, 64 bits, Intel Fortran 11.0

The (reduced) code that gives this problem is included below.

Regards,

Arjen

----

module MHCallBack

abstract interface

subroutine mh_callbackiface(level)

integer, intent(in) :: level !< The severity level

end subroutine mh_callbackiface

end interface

end module MHCallBack

module MessageHandling

use MHCallBack

implicit none

public SetMessage

public GetMessageCount

public SetMessageHandling

public mess

public err

public GetMessage_MH

public resetMessageCount_MH

public getMaxErrorLevel

public resetMaxerrorLevel

integer,parameter, public :: LEVEL_DEBUG = 1

integer,parameter, public :: LEVEL_INFO = 2

integer,parameter, public :: LEVEL_WARN = 3

integer,parameter, public :: LEVEL_ERROR = 4

integer,parameter, public :: LEVEL_FATAL = 5

integer,parameter, public :: Charln = 40

integer,parameter, public :: max_level = 5

character(len=12), dimension(max_level), &

private :: level_prefix = &

(/' ', ' ', '** WARNING:', '** ERROR:', '** FATAL:'/)

interface mess

module procedure message1string

end interface

interface err

module procedure error1char

end interface

private

integer, parameter, private :: maxMessages = 3000

character(len=256), dimension(maxMessages), private :: Messages

integer , dimension(maxMessages), private :: Levels

integer , private :: messagecount

integer , private :: maxErrorLevel = 0

integer , private :: thresholdLvl = 0

integer, save :: lunMess = 0

logical, save :: writeMessage2Screen = .false.

logical, save :: useLogging = .true.

!> Callback routine invoked upon any mess/err (i.e. SetMessage)

procedure(mh_callbackiface), pointer :: mh_callback => null()

contains

!> Sets up the output of messages. All three formats are optional

!! and can be used in any combination.

subroutine SetMessageHandling(write2screen, useLog, lunMessages, callback, thresholdLevel)

logical, optional, intent(in) :: write2screen !< Print messages to stdout.

logical, optional, intent(in) :: useLog !< Store messages in buffer.

integer, optional, intent(in) :: lunMessages !< File pointer whereto messages can be written.

integer, optional, intent(in) :: thresholdLevel !< Messages with level lower than the thresholdlevel

!< will be discarded.

procedure(mh_callbackiface), optional, pointer :: callback

if (present(write2screen) ) writeMessage2Screen = write2screen

if (present(lunMessages) ) lunMess = lunMessages

if (present(useLog) ) useLogging = useLog

if (present(callback) ) mh_callback =>callback

if (present(thresholdLevel) ) thresholdLvl = thresholdLevel

end subroutine SetMessageHandling

!> The main message routine. Puts the message string to all output

!! channels previously set up by SetMessageHandling

subroutine SetMessage(level, string)

integer, intent(in) :: level !< One of: LEVEL_(DEBUG|INFO|WARN|ERROR|FATAL).

character(len=*), intent(in) :: string !< Complete message string.

integer :: levelact

levelact = max(1,min(max_level, level))

! Optional callback routine for any user-specified actions (e.g., upon error)

if (associated(mh_callback)) then

call mh_callback(level) ! AvD: in future, possibly also error #ID

end if

end subroutine

integer function getMessageCount()

getMessageCount = messagecount

end function

integer function GetMessage_MH(imessage, message)

character(len=200) :: message

integer, intent(in) :: imessage

message=messages(imessage)

GetMessage_MH = levels(imessage)

end function

subroutine resetMessageCount_MH()

messageCount = 0

end subroutine

integer function getMaxErrorLevel()

getMaxErrorLevel = maxErrorLevel

end function

subroutine resetMaxerrorLevel()

maxErrorLevel = 0

end subroutine

subroutine message1string(level, w1)

character(*) :: w1

integer :: level

integer :: l1

character(600) :: rec

rec = ' '

l1 = max(1, len_trim(w1))

write (rec(1:), '(a)') w1(:l1)

call setMessage(level, rec)

end subroutine message1string

!-- Error interfaces ----------------------------

subroutine error1char(w1)

character(*) :: w1

call mess(LEVEL_ERROR, w1)

end subroutine error1char

end module MessageHandling

0 Kudos
9 Replies
Steven_L_Intel1
Employee
2,383 Views
Arjen,

You posted this in the Windows forum, but...

Would you please show me the command line you used and the output of an "ifort -V" command? Do you really mean IA-64 (Itanum) or perhaps did you mean "Intel 64" (x64)?
0 Kudos
Arjen_Markus
Honored Contributor II
2,383 Views
Hi Steve,
oops, I did not realise that there is a separate Linux forum.
Anyway, the command line was simply:
ifort -g -o name.o name.f90
I do not have access to the machine right now (that will have to wait until thursday), but
I did use the option "ia64" instead of "ia32" to set up the ifort environment variables.
Regards,
Arjen
0 Kudos
Steven_L_Intel1
Employee
2,383 Views
Ok. When you get the output of the ifort -V command, please supply it.

Are you targeting Itanium systems?
0 Kudos
Arjen_Markus
Honored Contributor II
2,383 Views
Hi Steve,

the output from ifort -V is:

Intel Fortran Intel 64 Compiler Professional for applications running on Intel 64, Version 11.0 Build 20090131 Package ID: l_cprof_p_11.0.081

Copyright (C) 1985-2009 Intel Corporation. All rights reserved.

(this is after issuing: . ..../ifortvars.sh ia64)

I noticed there are three possible targets: ia32, ia64 and intel64. I guess I should be using intel64, as we
are not targeting Itanium perse.

Regards,

Arjen

0 Kudos
Steven_L_Intel1
Employee
2,383 Views
Yes, you should be using "intel64", but in 11.0 ifortvars.sh didn't take an argument so you got whichever platform you specified by the path to ifortvars.

Can you try a more current compiler?
0 Kudos
Arjen_Markus
Honored Contributor II
2,383 Views
Really? On my system, if I do not specify an argument (ia32, ia64 or intel64) it complains about an unknown
platform.

I will see if we alreadyhave 11.1 installed somewhere.

Regards,

Arjen
0 Kudos
Steven_L_Intel1
Employee
2,383 Views
Sorry - my error. You are correct. I am puzzled then that specifying ia64 would get you Intel 64.
0 Kudos
Arjen_Markus
Honored Contributor II
2,383 Views
I had Intel Fortran 11.1 installed and this seems to be doing fine.
Thanks,

Arjen
0 Kudos
Steven_L_Intel1
Employee
2,383 Views
Ok, thanks for letting us know.
0 Kudos
Reply