[ET Trac] [Einstein Toolkit] #235: Improve performance of Fortran index calculations
Einstein Toolkit
trac-noreply at einsteintoolkit.org
Sat Jan 22 15:48:45 CST 2011
#235: Improve performance of Fortran index calculations
-------------------------+--------------------------------------------------
Reporter: eschnett | Owner:
Type: enhancement | Status: new
Priority: minor | Milestone:
Component: Cactus | Version:
Keywords: |
-------------------------+--------------------------------------------------
In Fortran, Cactus currently declares grid functions e.g. as (this is the
expansion of DECLARE_CCTK_ARGUMENTS)
REAL*8 gxx (X0metric,X1metric,X2metric)
where X0metric etc. are integers passed into the routine. Each grid
function group has its own, independent size. This has two disadvantages:
1. The compiler does not know that all grid functions have the same size
(namely cctk_lsh), and thus has to perform array index calculations
separately for each group
2. The argument list is longer than neded
The enclosed patch declares grid functions via cctk_lsh. Grid arrays are
still declared independently.
This reduces the code size of e.g. GRHydro/GRHydro_Tmunu.F90 from 6836 to
6241 bytes on my system. I have not attempted to measure a performance
difference.
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/235>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
More information about the Trac
mailing list