cheers
-ralf
module parametrized_derived_types
implicit none
private
type, public :: matrix(kind,m,n)
integer, kind :: kind=kind(0.0d0)
integer, len :: m,n
real(kind) :: element(m,n)
end type matrix
end module parametrized_derived_types
program test_type
use parametrized_derived_types
implicit none
type(matrix(kind(0.0d0),10,20) :: a
print*,a
end program test_type
> I am going through the manual of John Reid "The New Features of Fortan
> 2003" and tried to run the first example on page 6, see below.
> Gfortran (4.3.1) does not compile the code
To my knowledge, there are no released compilers that support PDTs. The
feature is somewhat controversial in terms of the complexity of
implementation, there being considerable retroactive question as to
whether it should have been put into f2003, insomuch as it seems to be
the single feature causing the most implementation delay.
--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain
On 2009-12-23 18:54:54 -0500, nos...@see.signature (Richard Maine) said:
> ralf.schaa <ralf....@gmail.com> wrote:
>
>> I am going through the manual of John Reid "The New Features of Fortan
>> 2003" and tried to run the first example on page 6, see below.
>> Gfortran (4.3.1) does not compile the code
>
> To my knowledge, there are no released compilers that support PDTs. The
> feature is somewhat controversial in terms of the complexity of
> implementation, there being considerable retroactive question as to
> whether it should have been put into f2003, insomuch as it seems to be
> the single feature causing the most implementation delay.
Cray has a complete implementation of f08,
and IBM will shortly. As big as f03 is, it would be
easier for IBM to list what they don't yet support in f03
than the whole list of what they do support in f03.
See
http://www-01.ibm.com/software/awdtools/fortran/xlfortran/features/f2003.html
and
http://www.cray.com/Products/XT/Software.aspx
for more details.
OK, so in your world, PC doesn't mean "personal Cray" :-)
--
Cheers!
Dan Nagle
> Hello,
>
> On 2009-12-23 18:54:54 -0500, nos...@see.signature (Richard Maine) said:
>
> > ralf.schaa <ralf....@gmail.com> wrote:
> >
> >> I am going through the manual of John Reid "The New Features of Fortan
> >> 2003" and tried to run the first example on page 6, see below.
> >> Gfortran (4.3.1) does not compile the code
> >
> > To my knowledge, there are no released compilers that support PDTs. The
> > feature is somewhat controversial in terms of the complexity of
> > implementation, there being considerable retroactive question as to
> > whether it should have been put into f2003, insomuch as it seems to be
> > the single feature causing the most implementation delay.
>
> Cray has a complete implementation of f08,
> and IBM will shortly. As big as f03 is, it would be
> easier for IBM to list what they don't yet support in f03
> than the whole list of what they do support in f03.
Yes. And PDTs is the top thing on the list. Quoting from the referenced
site
"...Derived Type Parameters being the only major feature not yet
implemented."
I have more than once made general comments about f2003 as a whole;
perhaps you assumed I was doing so again. But in the above post I
mentioned only PDTs. Insomuch as IBM has not done PDTs in a released
compiler, it does not appear to be an exception to my comment.
> OK, so in your world, PC doesn't mean "personal Cray" :-)
I didn't actually use the term PC at all, but no, I have pretty much no
experience with Crays. Yes, that does appear to be an exception; I had
forgotten about that one.
our home page is
http://www.fortranplus.co.uk/index.html
the table can be found at
http://www.fortranplus.co.uk/resources/fortran_2003_compiler_support.pdf
the most recent version of this table is in
the december edition of Fortran Forum.
have a look at
http://portal.acm.org/browse_dl.cfm?coll=portal&dl=ACM&idx=J286&linked=1&part=newsletter
parameterized derived types are one of the last thing
to be implemented from the 2003 standard.
if you want real, practical code portability
then Fortran 95 is the best starting point.
A Cray system with Fortran that supports PDT costs about 10 million us
dollars
the last time I talked to Bill Long.
:-)
Dan and Richard have also provided you with comments.
hope this helps
ian chivers
jane sleightholme
On 2009-12-23 21:37:08 -0500, nos...@see.signature (Richard Maine) said:
> Yes. And PDTs is the top thing on the list. Quoting from the referenced
> site
>
> "...Derived Type Parameters being the only major feature not yet
> implemented."
>
> I have more than once made general comments about f2003 as a whole;
> perhaps you assumed I was doing so again. But in the above post I
> mentioned only PDTs. Insomuch as IBM has not done PDTs in a released
> compiler, it does not appear to be an exception to my comment.
No, but it is anticipated to be RSN.
I was more addressing the "there are no f03 compilers" comment.
Sorry if I was so unclear as to be misunderstood. :-(
It certainly does fit the general pattern
of PDTs and DIO being last on many vendor's lists.
>> OK, so in your world, PC doesn't mean "personal Cray" :-)
>
> I didn't actually use the term PC at all, but no, I have pretty much no
> experience with Crays. Yes, that does appear to be an exception; I had
> forgotten about that one.
Well, PC == "personal Cray" is an inside joke
from when Navier (one of the first Cray-2 systems)
was used by only a few folks, before the accounting system
was added. Perhaps more smileys would have helped. :-(
AAR, the issue seems to have been clarified.
--
Cheers!
Dan Nagle