-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Hi @raar1
we can start benchmarking the SpMV, which is a key kernel.
this is a sample code:
using PartitionedArrays
using LinearAlgebra
using MPI
function main(distribute)
n = 100
nranks = MPI.Comm_size(MPI.COMM_WORLD)
p = Int((nranks)^(1/3))
parts_per_dir = (p,p,p)
p = prod(parts_per_dir)
ranks = distribute(LinearIndices((p,)))
nodes_per_dir = (n,n,n)
args = laplacian_fdm(nodes_per_dir,parts_per_dir,ranks)
A = psparse(args...) |> fetch
x = pones(axes(A,2))
b = similar(x,axes(A,1))
mul!(b,A,x)
t = @elapsed for _ in 1:1000
mul!(b,A,x)
end
@show t
end
with_mpi(main)
Metadata
Metadata
Assignees
Labels
No labels