Skip to content

Commit

Permalink
test exch on lumi
Browse files Browse the repository at this point in the history
  • Loading branch information
luraess committed Sep 14, 2023
1 parent 96be20c commit cefb1c7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
4 changes: 3 additions & 1 deletion scripts_future_API/bench3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ function main(backend=CPU(), T::DataType=Float64, dims=(0, 0, 0))

# actions
for it = 1:nt
copyto!(A, A_new)
# copyto!(A, A_new)
# KernelAbstractions.synchronize(backend)

hide_comm( diffusion_kernel!(backend, 256), neighbors, ranges, A_new, A, h, _dx, _dy, _dz )
end

Expand Down
11 changes: 5 additions & 6 deletions scripts_future_API/exchanger2.jl
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using KernelAbstractions
using MPI

# using AMDGPU
using AMDGPU

using CUDA
using NVTX
# using CUDA
# using NVTX

include("mpi_utils.jl")
include("mpi_utils2.jl")
Expand Down Expand Up @@ -51,7 +51,7 @@ function main(backend = CPU(), T::DataType = Float64, dims = (0, 0, 0))
range = ranges[2*(dim-1) + side]
offset, ndrange = first(range), size(range)
start_exchange(exchangers[dim][side], comm, rank, halo, border) do compute_bc
NVTX.@range "borders" do_work!(backend, 256)(A, me, offset; ndrange)
do_work!(backend, 256)(A, me, offset; ndrange)
if compute_bc
# apply_bcs!(Val(dim), fields, bcs.velocity)
end
Expand All @@ -60,7 +60,6 @@ function main(backend = CPU(), T::DataType = Float64, dims = (0, 0, 0))
end
wait.(exchangers[dim])
end

KernelAbstractions.synchronize(backend)

# for dim in eachindex(neighbors)
Expand All @@ -75,7 +74,7 @@ function main(backend = CPU(), T::DataType = Float64, dims = (0, 0, 0))
return
end

backend = CUDABackend()
backend = ROCBackend()
T::DataType = Int
dims = (0, 0, 1)

Expand Down
4 changes: 2 additions & 2 deletions scripts_future_API/profileme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ source /users/lurass/scratch/setenv_lumi.sh

# srun --cpu-bind=map_cpu:49,57,17,25,1,9,33,41 -N1 -n8 --gpus-per-node=8 profileme.sh

julia --project bench3d.jl
# julia --project bench3d.jl
# julia --project exchanger2.jl
# julia --project rocmaware.jl

# ENABLE_JITPROFILING=1 ../../myrocprof --hsa-trace --hip-trace julia --project ./exchanger2.jl

# ENABLE_JITPROFILING=1 rocprof --hip-trace --hsa-trace -d ./prof_out${SLURM_PROCID} -o ./prof_out${SLURM_PROCID}/results${SLURM_PROCID}.csv julia --project bench3d.jl
ENABLE_JITPROFILING=1 rocprof --hip-trace --hsa-trace -d ./prof_out${SLURM_PROCID} -o ./prof_out${SLURM_PROCID}/results${SLURM_PROCID}.csv julia --project bench3d.jl

0 comments on commit cefb1c7

Please sign in to comment.