Re: Dimension attribute based on host-associated variable - bug in Intel Fortran




"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!


.



Relevant Pages

  • Crazy (?) C problem
    ... I'm using the intel C++ 8.0 compiler on windows and I'm working on some ... I realize that this is grossly out of context but the program is pretty ...
    (comp.lang.c)
  • Call for Participation: CGO-5, 11-14 March 2007 - San Jose, California / Online Regist
    ... Programming a Massively Parallel Processor" ... Workshop on EPIC Architectures and Compiler Technology ... Code Generation and Optimization for Transactional Memory Constructs ... Cheng Wang (Intel Corporation), Wei-Yu Chen ...
    (comp.programming)
  • Re: Question about intel_VEC_memcpy
    ... Syntax such as array assignment and matmul() is highly productive of temporaries, some of which could be avoided by better optimization in the compiler. ... If you are willing to work with a current version of ifort, and to submit a case to Intel support, there is likely to be scope for improvement. ... a compiler can't avoid the allocation of a temporary array for the intermediate result. ...
    (comp.lang.fortran)
  • Re: New Visual Fortran Product Survey
    ... I assume that MS authorized DEC to use the name, and that that authorization transferred to Compaq/HP and then to Intel when the compiler/components/rights were successively purchased by those companies. ... HP does own and retain the rights to DEC/Compaq Visual Fortran, and their disuse of it does not give anyone else a right to use it. ... I believe the wording which says the product is only for Windows X64 EM64T and AMD64, for which only a minority of the vendors mentioned above have a product. ... I would expect most of the above vendors to produce such a compiler for whatever architecture becomes predominant, ...
    (comp.lang.fortran)
  • Re: Inline assembler reference
    ... I do know how to beat the compiler with float/SSE* instructions. ... CALL instruction most of the time when inlining it could avoid those ... The Intel and GCC ...
    (microsoft.public.win32.programmer.kernel)