OPTIMIZATION PROJECT:

ETA WORKSTATION FOR WEATHER PREDICTION

July, August 2004

 

Objective:

Speed up the execution time of the Eta Workstation on Weather Forecast runs by about 20%. This is accomplished by increasing vectorization.

Method:

About 35% of the execution time of the Eta Workstation on Weather Forecast runs (40 km resolution over South America) is spent in two procedures: gsmcolumn and hzadv.

The first procedure, gsmcolumn, accounts for 19% of the execution time of the model, and is completely executed in scalar mode, since it takes a single column of the atmosphere at each invocation. It is invoked at a single location of the procedure gsmdrive, inside a double loop that visits all atmospheric columns of the tile domain.

To improve vectorization ratio, procedure gsmcolumn has to operate on a set of atmospheric columns instead of operating on a single column. Vectorization proceeds on the multiple columns direction.

Since the gsmcolumn procedure interface is changed, the double loop on gsmdrive that invokes gsmcolumn has to be partitioned, to be able to invoke the new procedure.

The second procedure, hzadv, accounts for 15% of the execution time of the model, but only 35% of the execution time of the procedure is spent in vector operations. Compile listings show that all inner loops are executed in vector mode, except the double loop on lines 379-457 which is executed in scalar mode, due to a large set of conditional branches. To increase the vectorization ratio, the double loop should be partitioned into a set of double loops, reducing the occurrence of conditionals inside the innermost loop as much as possible. That amounts to loop splitting, loop interchange and factorization of conditionals.

Proposed modifications on procedure hzadv do not propagate to procedure calls, since procedure interface remains unchanged.