Guide:TAUCrayOpenAcc

From Tau Wiki
Revision as of 19:19, 21 September 2013 by Scottb (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Jacobin example

Let's look at a simple Jocobin example written in Cray OpenACC. We will start with a simple OpenACC parallel loop directive right before the Jacobian computation.Here is the TAU profile:

Step3 basic.jpg

We have profiles for the Jacobi kernel ("jacobi_$ck_L215_2"), Memory copies, and CPU synchronization. Look at the time spent copying data to the GPU, it completely dominates the runtime, let look at the some details:

Step3 bytes.jpg

Nearly 26,000 Memory copies for a total of 99 GB. That is a lot of memory being moved. As a improvement let's try to keep as much data on the GPU as possible.

Next we have initialized the matrices on GPU, performed on the initialization on the GPU. This is the profile we see:

Step4 basic.jpg

Much better performance Memory copies to the GPU and now a quarter of what it was. The second kernel ("jacobi_$ck_L281_6") is the final reduction. And the number of bytes copied:

Step4 bytes.jpg

Only 25 GB in about 11,500 copies.