Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28633 Discussions

Fortran 2003: no parameterized derived types in IVF 12.1.1.258?

joerg_kuthe
Novice
540 Views

I recently installed the most recent version of IVF (12.1 Update 7, Build 258) and playing with some Fortran 2003 features, because the description made be believe that F2003 is fully supported. I have read:

>Overview: Language Reference

>This document contains the complete description of the Intel Fortran programming language, which includes >Fortran 2003, Fortran 95, Fortran 90, and some Fortran 2008 language features.

Now I tried to useparameterized derived types as found in the standard draft (J3/04-007) and also in Stephen Chapmans book "Fortran 95/2003 Scientists and Engineers"
(see http://highered.mcgraw-hill.com/sites/0073191574/ ).

It appears to me thatparameterized derived TYPEs are not supported with IVF. Is that right? I tried something like

PROGRAM Ex25ParType
USE ISO_C_BINDING
IMPLICIT NONE

TYPE :: T_Point2D(RKind)
INTEGER, KIND :: RKind = C_FLOAT
REAL(RKind) :: x
REAL(RKind) :: y
END TYPE T_Point2D

and got a couple of compiler error messages:

Compiling with Intel Visual Fortran Compiler XE 12.1.1.258 [IA-32]...
Ex25ParType.f90
...: error #5082: Syntax error, found '(' when expecting one of: ;
...: error #6677: An END TYPE statement exists without an associated TYPE statement.
...: error #6659: Not an attribute-spec keyword [KIND]
...: error #6683: A kind type parameter must be a compile-time constant. [RKIND]
....
Or did I code something faulty?

All the best,

Jrg Kuthe
QT software

0 Kudos
4 Replies
Andrew_Smith
Valued Contributor I
540 Views
It is not supported by IVF yet
0 Kudos
Steven_L_Intel1
Employee
540 Views
That page in the documentation, about Fortran 2003 support, is incorrect and I have already asked the writers to fix it. The proper support level is described correctly on adjacent pages. Indeed, parameterized derived types and user-defined derived type I/O are the two remaining significant features.
0 Kudos
Andrew_Smith
Valued Contributor I
540 Views

If we had a parameterized derived type where a component array size is defined by a parameter, would it enable the compiler to make more efficient use of vector maths optimisations since it would know at compile time the size of arrays? I currently use a small family of derived types with fixed size arrays of different length in the expecation that vectorisation is more efficient than when using allocatable arrays. Having parameterized derived types would allow me to have only one derived type and much of my code would become redundant copies. Can we expect this last feature of Fortran 2003 to be implement soon ?

0 Kudos
Steven_L_Intel1
Employee
540 Views

Depending on the usage, the dimension may or may not be compile-time constant, but probably in your case it would, and yes, this would assist in optimization. You won't see PDT from us this year, but we have begun work on it and it might show up in a 2014 release.

0 Kudos
Reply