CONQUEST-release icon indicating copy to clipboard operation
CONQUEST-release copied to clipboard

Access to data in gridfunctions is slow

Open tkoskela opened this issue 1 year ago • 0 comments

There's been some ambiguity (at least in my head) whether the time spent in this loop

https://github.com/OrderN/CONQUEST-release/blob/4162a3c6d799960ba88bc6e92944f4e54794362e/src/calc_matrix_elements_module.f90#L531-L539

Was being spent on the axpy call itself, or the data access. I had a look and it looks like it's very much the data access.

First, for reference, profile with #195 using 1 OpenMP thread (so essentially develop) shows the loop at L531 is the main hotspot in the code

image

with time being spent on the line that calls axpy

image

I moved the data accesses out of the axpy call to see where the time was actually being spent, here is the result

image

Copying the data to a buffer obviously made the code a lot slower, the time in act_on_vectors_new is now 373s instead of 56s for the same benchmark run. However, the time spent in the axpy call itself is now tiny which suggests to me that accessing the data stored in gridfunctions%griddata is the culprit here.

tkoskela avatar Jun 15 '23 15:06 tkoskela