Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
814 Views

Compiler error

I know that my compiler is licensed, but I am not sure if we are paid for support.  I just got a compiler failure trying to use parameterized derived types.  I am going to attach the build log, which is very short.  This is just a proof of concept program.

Compiling with Intel(R) Visual Fortran Compiler 19.0.5.281 [IA-32]...
ifort /nologo /debug:full /Od /fpp /extend_source:80 /warn:none /module:"Debug\\" /object:"Debug\\" /Fd"Debug\vc150.pdb" /traceback /check:bounds /check:stack /libs:dll /threads /dbglibs /c /Qlocation,link,"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86" /Qm32 "C:\Michael\params_test_2\Console1\Console1\bonddefinition.f90"
C:\Michael\params_test_2\Console1\Console1\$OVERRIDE.fi(29): 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.
Internal error store_pdtlen_data_space: Cannot find record
compilation aborted for C:\Michael\params_test_2\Console1\Console1\bonddefinition.f90 (code 1)


test_params_2 - 1 error(s), 0 warning(s)

I could not attach the html file.  So I just added the text.

 

Thanks.

0 Kudos
59 Replies
Highlighted
Valued Contributor III
657 Views

 **Internal compiler error is a bug even if your code is non-conforming.
You should file a ticket or if that is not possible post a source file that reproduces here
and someone will take it up.

0 Kudos
Highlighted
New Contributor I
628 Views

Here is some simplified code.


The following code is in an include file. Call it test.fi
type date$_set
sequence
real*8 rate
real*8 amount
integer*4 date
integer*4 code
end type
module called param.mod
integer ms_ = 21
end module
A module for this case called test.mod contains the following
module test
#include 'test.fi'
type , public :: b$$s
sequence
integer*4 nbs
type (override$_data (num_elements= ms_) ):: over
end type
type(b$$s) b$s
end module
module run
use test
use param
public :: set_parameters
contains
subroutine set_parameters
allocate(b$s%over%number_tables(ms_))
end subroutine
program main
use test
use run
call set_parameters
end

0 Kudos
Highlighted
Valued Contributor III
618 Views

There isn't compilable code there without making quite a number of edits which may end up missing the point. Why not just zip the files 2 or 3 small files and attach it.

0 Kudos
Highlighted
Honored Contributor I
606 Views

@kolber__Michael ,

Your code above is non-standard e.g., #include directive when Fortran language supports INCLUDE statement with its own rules for syntax: see this.  It also looks incomplete: what is 'override$_data' in your TYPE declaration in the module named 'test'.  Intel Fortran can very well find it impossible to process what you show and throw an "internal compiler error" in response i.e., unless you have specified just the right combinations of options and steps to make it work e.g., preprocessor instructions.  Otherwise one can't blame ifort for suffering from an ICE with your code.

It'll be rather difficult, if not impossible, for you to get any useful guidance given your posts here.  Your posts do suggest you can help yourself greatly by reviewing closely a few textbooks on Fortran, say Chapman's latest edition on Fortran for Scientists and Engineers

0 Kudos
Highlighted
Black Belt
596 Views

Michael,

Here are some facts regarding internal compiler errors that are worth noting.

  • Whether you are eligible for paid support or not, ICEs are worth reporting: through Intel support if you are eligible,  in this forum if not.
  • ICEs are unexpected. They can be very hard to reproduce without the exact code that you were using when you encountered an ICE.  Small changes to the test code, changing the compiler version or the compiler options can make the ICE disappear. This is why it is useless to present a precis, a purely verbal description or fragments of code.
  • In order to preserve the ICE, you should zip up the code and attach that zip file to a reply. Posting code here inline or in a code box, except for purposes of discussion, does not help much because copy-pasting code may change the code and make the ICE disappear, or cause a different ICE to occur than the one that you experienced.
  • It is good practice to copy the entire file set associated with the ICE to a fresh directory on the same or a different PC and try to duplicate the ICE yourself (or by a colleague). If you do this, you will discover all the little pieces (such as include files) that are needed to reproduce the ICE but you forgot to include in the zip archive.
0 Kudos
Highlighted
New Contributor I
573 Views

Here is a zip file of my small test application. I am using vs studio 2107 ver 15.9.18 with parallel studio xe 2109 update 5.
I get the ice when I try and use a parameterized derived type. If it is not parameterized it works fine

0 Kudos
Highlighted
New Contributor I
553 Views

I found out we have full support.  Would like to report this ice.  Can someone please give me the instructions as I have never had to do it before.

 

Thanks.

Michael

0 Kudos
Highlighted
Black Belt Retired Employee
546 Views

0 Kudos
Highlighted
New Contributor I
508 Views

I posted a zip file with a small version of my application. I noticed no one has tried it out to try and replicate the failure that I got.

 

Thanks.

Michael

0 Kudos
Highlighted
New Contributor II
502 Views

Capture.GIF

0 Kudos
Highlighted
New Contributor I
501 Views

Ver 19 update 5 does not give me the errors on the type members.  It just gives me the compiler failure. Interesting?

 

Thanks.

MIchael

0 Kudos
Highlighted
New Contributor I
476 Views

John,

What version are you running?

 

Thanks,

Michael

 

0 Kudos
Highlighted
Valued Contributor III
473 Views

You can see the version in the picture.

andrew_4619_0-1594998276230.png

 

0 Kudos
Highlighted
Moderator
426 Views

The bug ID is CMPLRIL0-33130


The code has a number of syntax errors. Granted, it should not cause an internal error. that is a bug in the compiler. Our recommendation is to install the latest PSXE 2020 compiler which will show you the syntax errors that you can repair to continue your development. A fix in PSXE 2019 would take too long to get to you.


Start with this error

    type override$_data(num_elements, num_groups)

   sequence

   integer*4, len :: num_elements, num_groups

     type (date$_set) ride(mkd_)

     integer*4, dimension(num_elements) :: number_tables

     integer*4  padding       ! ms_ is odd number

     integer*4, dimension(num_groups) ::  first

     integer*4, dimension(num_groups) :: length

     integer*4, dimension(num_groups) :: start_date

     integer*4, dimension(num_groups) :: basis

     integer*4, dimension(num_groups) :: group

   end type


in particular

integer*4, len :: num_elements, num_groups


LEN is out of position or is not an attribute of INTEGER types. Check this syntax with your book. What book are you using? If you are new to Fortran this seems a very ambitious program to start with.




0 Kudos
Highlighted
New Contributor II
396 Views

Ronald,

Is your comment that :

a) sequence should follow integer, len :: ..., or

b) parameterised derived types are not available?

I agree that "this seems a very ambitious program to start with"

 

0 Kudos
Highlighted
Honored Contributor I
299 Views

 

 asks of OP:

".. Check this syntax with your book. What book are you using? .."

 

It's unclear whether OP is referring to any "book" though I've oft suggested to OP to do so.

Re: SEQUENCE, current Fortran standard (Fortran 2018) disallows its use in a derived type with a type-parameter (aka parameterized derived type or PDT):

 

1 7.5.2.3 Sequence type
2 R731 sequence-stmt is SEQUENCE
3 C740 (R726) If SEQUENCE appears, the type shall have at least one component, each data component shall
4             be declared to be of an intrinsic type or of a sequence type, the derived type shall not have any type
5             parameter, and a type-bound-procedure-part shall not appear.

 

 

OP, if serious about refactoring old code and gain advantages with modern computing, would do  well to unlearn all of nonstandard FORTRAN involving heavy compiler-specific extensions and spend the time and effort to get good familiarity with current standard Fortran before writing new code.  Hacking away without such hard yards is a guaranteed exercise in futility.

Letting "sleeping dogs lie" with all the nonstandard stuff in code of running applications and "don't fix if ain't broken" are the "conventional" wisdom that program managers in for-profit orgs can force on staff when they appear unwilling or entirely unable to approach code modernization with any form of discipline or structure.

0 Kudos
Highlighted
Black Belt Retired Employee
372 Views

Ignoring for the moment your use of nonstandard syntax such as integer*4, the immediate problem with that type definition is that the standard requires SEQUENCE, if present, to follow type parameter declarations. So move the SEQUENCE after the declaration of the LEN parameters.

If I do that, I get an ICE - that's definitely a compiler bug.

If I remove the SEQUENCE entirely, then I get the (appropriate) error that it has to be SEQUENCE because it includes a SEQUENCE type component. 

But if I then remove all SEQUENCE lines from the code, then I still get the ICE. So the bug is not related to SEQUENCE.

 

0 Kudos
Highlighted
New Contributor I
361 Views

I have been following an example in the book Guide to Fortran 2008 programming

type, public ::  matrix(rows, cols, k)

integer len :: rows, cols

integer, kind :: k =kind(0.0)

real(kind = k), dimension (rows, cols) :: values

end type matrix

type (matrix =:, cols=:, k=kind(0.0)) = double) :: A

According to the technical support people  len can only be used to specify the length of character strings.  But, as you see in the above example that is not what they are doing.

 

0 Kudos
Highlighted
Black Belt Retired Employee
355 Views

A length type parameter can be used for array bounds or character lengths. The main difference between a length type parameter and a kind type parameter is that the latter is a constant and the former is evaluated at run-time when the procedure is entered. Support people aren't always current on the language, unfortunately, and PDTs, while they have been supported in Intel Fortran for a long time now, are not familiar to many.

As I wrote above, the syntax error was from your introduction of SEQUENCE in the wrong position. It is unrelated to the ICE.

0 Kudos