英特尔®Fortran:在参数化类型定义中使用元素固有

时间:2018-10-09 10:01:55

标签: types fortran derived

我正在使用具有grid_f(g_size)的{​​{1}}数组的参数化类型realdimension(max0(something_1,something_2))编译器以某种方式不喜欢这样,导致内部错误。

ifort

编译:

module mdl
implicit none

save

  integer, parameter ::  ng=10, dp=8

  type grid_f(g_size)
    integer, len                                      ::  g_size
      real(dp), dimension(max0(2*g_size+10, g_size))  ::  val
  end type

contains

  subroutine grid_reset(func)
  implicit none
  type(grid_f(ng))  ::  func
    func%val=0d0
  end subroutine grid_reset_orb

end module mdl

改为使用ifort -c check.f90 check.f90(10): error #7974: An elemental intrinsic function here must be of type integer and each argument must be an initialization expression of type integer or character. [MAX0] real(dp), dimension(max0(2*g_size+10, g_size)) :: val --------------------------^ check.f90(17): internal error: Please visit 'http://www.intel.com/software/products/support' for assistance. type(grid_f(ng)) :: func ^ [ Aborting due to internal error. ] compilation aborted for check.f90 (code 1) max并没有帮助。有什么建议吗?

编辑:该主题现在位于Intel网站click上。尽管ifort16和ifort17应该是标准的,但这似乎是bug导致编译器崩溃并导致18和19m的错误。

0 个答案:

没有答案