Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
40 Views

Intel FORTAN 2019 composer bug

Hi,
I am using a new Intel® Parallel Studio XE 2019 Update 5 Composer Edition for Fortran Windows* Integration for Microsoft Visual Studio* 2019, Version 19.0.0052.16. Installed under Windows 10. In an attempt to compile the below FORTRAN code


MODULE silam_levels
  IMPLICIT NONE

  integer, parameter :: int_missing = -999999
  real, parameter :: real_missing = -999999.
  TYPE silja_logical
    PRIVATE
    INTEGER :: flag = 0
  END TYPE silja_logical
  INTEGER, PARAMETER, PRIVATE :: false_flag = -5
  INTEGER, PARAMETER, PRIVATE :: true_flag = 5

  TYPE(silja_logical), PARAMETER, PUBLIC :: silja_false = silja_logical(false_flag)
  TYPE(silja_logical), PARAMETER, PUBLIC :: silja_true = silja_logical(true_flag)
  TYPE(silja_logical), PARAMETER, PUBLIC :: silja_undefined = silja_logical(0)
  INTEGER, PARAMETER, PUBLIC :: no_level = 0

  TYPE silja_level
    PRIVATE
    INTEGER :: leveltype  ! allowed values above
    LOGICAL :: hybrid_coeff_known
    INTEGER :: number, number2 ! for hybrid
    REAL :: a,b, a2, b2
    type(silja_logical) :: defined
  END TYPE silja_level

  type silam_vertical
    private
    integer :: vert_type  = int_missing  ! Type of the vertical co-ordinate
    integer :: NLevs  =int_missing  ! Number of levels in the structure
    type(silja_level), dimension(:), pointer :: levs => null() ! Levels
    type(silja_logical) :: defined
  end type silam_vertical

  TYPE(silja_level), PARAMETER, PUBLIC :: level_missing = silja_level(&
                    & no_level,&
                    & .false.,&
                    & int_missing, int_missing,&
                    & real_missing, real_missing, real_missing, real_missing,&
                    & silja_false)

  type(silam_vertical), parameter,public :: vertical_missing = &
     & silam_vertical(int_missing, 0, null(), silja_false)

  type(silam_vertical),public,target,save :: meteo_vertical = vertical_missing

END MODULE silam_levels

I got the error

Compiling with Intel(R) Visual Fortran Compiler 19.0.5.281 [IA-32]... Intel_bug.f90 fortcom: Fatal: There has been an internal compiler error (C0000005). compilation aborted for D:\model\silam_v5_7\Intel_bug\Intel_bug.f90 (code 1)

Any suggestions for the workaround of this Intel bug?

I also should point out that the "Bug report" button does not work in your site. Neither there is any normal way to reach this point without Google search help.

Thank you!

Mikhail

 

0 Kudos
2 Replies
Highlighted
New Contributor III
40 Views

I can confirm the internal compiler error with Intel 2019 SP4, and the bug seems to have its roots in the null() pointer declaration of the derived-type silam_vertical. Removing the pointer from the type declaration resolves the bug. GFortran v7.1.1 compiles the code with no error. Intel cluster for Linux 2018.0.2 also compiles the code with no errors. This likely a compiler bug in the Windows version of the Fortran compiler. Please consider reporting it.

0 Kudos
Highlighted
Honored Contributor I
40 Views

This looks like a compiler bug in Intel Fortran starting with 19.0 version.  That is. this looks like a regression in Intel Fortran.

.. Any suggestions for the workaround of this Intel bug? ..

The offending line appears to be the initialization of module variable 'meteo_vertical' with a named constant.  You can consider default initializing the 'defined' component, thus not have to initialize 'meteo_vertical' variable; it will come into existence with your desired values.  Note this is just a workaround, as you inquired.  Hopefully Intel team can hep you file support for the internal compiler bug and help you with a resolution:

module silam_levels
   implicit none

   integer, parameter :: int_missing = -999999
   real, parameter :: real_missing = -999999.
   type silja_logical
      private
      integer :: flag = 0
   end type silja_logical
   integer, parameter, private :: false_flag = -5
   integer, parameter, private :: true_flag = 5

   type(silja_logical), parameter, public :: silja_false = silja_logical(false_flag)
   type(silja_logical), parameter, public :: silja_true = silja_logical(true_flag)
   type(silja_logical), parameter, public :: silja_undefined = silja_logical(0)
   integer, parameter, public :: no_level = 0

   type silja_level
      private
      integer :: leveltype  ! allowed values above
      logical :: hybrid_coeff_known
      integer :: number, number2 ! for hybrid
      real :: a,b, a2, b2
      type(silja_logical) :: defined
   end type silja_level

   type silam_vertical
      private
      integer :: vert_type  = int_missing  ! Type of the vertical co-ordinate
      integer :: NLevs  =int_missing  ! Number of levels in the structure
      type(silja_level), dimension(:), pointer :: levs => null() ! Levels
      type(silja_logical) :: defined = silja_false
   end type silam_vertical

   type(silja_level), parameter, public :: level_missing = silja_level(&
      & no_level,&
      & .false.,&
      & int_missing, int_missing,&
      & real_missing, real_missing, real_missing, real_missing,&
      & silja_false)

   type(silam_vertical), parameter,public :: vertical_missing = &
      & silam_vertical()

   type(silam_vertical),public,target,save :: meteo_vertical !<-- No initialization to avoid ICE

end module silam_levels

 

0 Kudos