Hi,
I am somewhat new to Julia, and not a programming expert, but I been having great fun implementing a solver in it. I am getting close to the point where I need/want to profile it in more detail, and I am taking a look into LIKWID.jl (which seems great).
However, playing around, I noticed something I was not expecting. I created a small function with "tun
profiling_test.jl (859 Bytes)
able operational complexity":
function kernel(A, B, C,n)
@inbounds for i in eachindex(A)
for j=1:n
A[i] += B[i] * C[i]
end
end
end
and I (maybe naively) hoped that the operational complexity would scale with n. Instead, what I got is
n=0001 MFLOPS= 749 OI=0.059 OI/n=0.059 data volume=0.3376
n=0002 MFLOPS= 748 OI=0.120 OI/n=0.060 data volume=0.3336
n=0003 MFLOPS= 1845 OI=0.179 OI/n=0.060 data volume=0.3360
n=0004 MFLOPS= 1249 OI=0.236 OI/n=0.059 data volume=0.3396
n=0005 MFLOPS= 1565 OI=0.296 OI/n=0.059 data volume=0.3376
n=0010 MFLOPS= 1131 OI=0.542 OI/n=0.054 data volume=0.3690
n=0020 MFLOPS= 948 OI=0.856 OI/n=0.043 data volume=0.4670
n=0050 MFLOPS= 1006 OI=1.660 OI/n=0.033 data volume=0.6024
n=0100 MFLOPS= 883 OI=2.097 OI/n=0.021 data volume=0.9539
that is, OI is roughly linear up to n=10, but then, apparently, the total transferred memory (data volume, in GB, in the above) starts to increase, and the linear scaling is lost. The full test file is attached.
So my question is: is this expected?
Thanks in advance for any help!!!
Eduardo Martini
profiling_test.jl (845 Bytes)