For Programmers: Free Programming Magazines  


Home > Archive > Fortran > December 2006 > Dimension attribute based on host-associated variable - bug in Intel









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Dimension attribute based on host-associated variable - bug in Intel
Rich Townsend

2006-12-27, 10:02 pm

Hi all --

A question about what appears to be a bug in the Intel compiler: in a module
subroutine, I have declarations of the form

real, dimension(2*COUNT(spheres%inter)) :: lambda
real, dimension(COUNT(spheres%inter)) :: rho
integer, dimension(2*COUNT(spheres%inter)) :: indices
logical, dimension(COUNT(spheres%inter)) :: active_mask

The array spheres is accessed via host association, and is declared thusly:

type sphere_t
real, dimension(3) :: r = 0. ! Position vector
real :: l = 0. ! Radius
real :: rho = 0. ! Density
real :: lambda_in = 0. ! Ray entrance coordinate
real :: lambda_ex = 0. ! Ray exit coordinate
logical :: inter = .FALSE. ! Ray intersection flag
end type sphere_t

....

type(sphere_t), dimension(:), allocatable :: spheres

When I try to compile the code using Intel Fortran for Linux (9.1.40), I get the
following error messages:

fortcom: Error: sphimp_dda.f90, line 544: An array-valued argument is required
in this context. [COUNT]
real, dimension(2*COUNT(spheres%inter)) :: lambda
----------------------------^
fortcom: Error: sphimp_dda.f90, line 545: An array-valued argument is required
in this context. [COUNT]
real, dimension(COUNT(spheres%inter)) :: rho
--------------------------^
fortcom: Error: sphimp_dda.f90, line 546: An array-valued argument is required
in this context. [COUNT]
integer, dimension(2*COUNT(spheres%inter)) :: indices
-------------------------------^
fortcom: Error: sphimp_dda.f90, line 547: An array-valued argument is required
in this context. [COUNT]
logical, dimension(COUNT(spheres%inter)) :: active_mask

Now, as I understand it, there is nothing wrong with my code; spheres%inter is
an array-valued argument. Can I confirm that this is a bug in the Intel compiler?

cheers,

Rich
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com