Re: Dimension attribute based on host-associated variable - bug in Intel Fortran
- From: "David Frank" <dave_frank@xxxxxxxxxxx>
- Date: Thu, 28 Dec 2006 03:47:16 -0500
"Rich Townsend" <rhdt@xxxxxxxxxxxxxxxxxxx> wrote in message
news:emv7t5$2rr$1@xxxxxxxxxxxxxxxxxxxxxxx
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
The compiler says its NOT an array, and of course its RIGHT!
.
- Follow-Ups:
- References:
- Dimension attribute based on host-associated variable - bug in Intel Fortran
- From: Rich Townsend
- Dimension attribute based on host-associated variable - bug in Intel Fortran
- Prev by Date: Re: Write A, left justified, howto?
- Next by Date: Re: Dimension attribute based on host-associated variable - bug in Intel Fortran
- Previous by thread: Dimension attribute based on host-associated variable - bug in Intel Fortran
- Next by thread: Re: Dimension attribute based on host-associated variable - bug in Intel Fortran
- Index(es):
Relevant Pages
|