Ted Stern wrote:
> I think it would be a useful service to the fortran community to create a
> benchmark that compares compilers' implementations of modern Fortran features.
>
> For example,
>
> X(:,:) = RESHAPE( Y, (/2,1/) )
>
> vs.
>
> do j=1,n
> do i=1,m
> x(i,j) = y(j,i)
> end do
> end do
>
> Other candidates might be TRANSFER and "simple" array operations.
>
> Do others on the list have additional suggestions for unevenly implemented
> Fortran features that could be tested?
Sure, I've got a test suite of over 7500 examples that test
implementations, at least for correctness. Anybody can
license it.
But, I'm betting you mean test for performance and
optimization more than just correctness. That's a harder
thing to do. As a practical matter, everything that's
interesting in Fortran happens to dummy arguments. So
you have to deal with how the things are passed in --
assumed shape, explicit shape, pointers, copy-in/out,
fit in cache, contiguous, declared INTENT(whatever),
.... Those are all important things, but they make it
hard to say much about the underlying implementation.
By the way, a minor point, in your example above, n must
be 2 and m must be 1 or there will be a conformance
mismatch in the reshape assignment. I had to look at
the book to remember the arguments to RESHAPE. ;)
Dick Hendrickson
>
> Ted
> --
> Ted Stern Applications Group
> Cray Inc. office: 206-701-2182
> 411 First Avenue South, Suite 600 cell: 206-383-1049
> Seattle, WA 98104-2860 FAX: 206-701-2500
>
> Frango ut patefaciam -- I break that I may reveal
> (The Paleontological Society motto, equally apropos for debugging)
>
|