From 340535696eb3a85f91f8627a12182a0ccddd860e Mon Sep 17 00:00:00 2001 From: Pascal Aellig Date: Sat, 20 Jun 2026 14:30:18 +0200 Subject: [PATCH 1/3] bump IGG and JP version --- Project.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 01cb3206..0a308a7c 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "JustPIC" uuid = "10dc771f-8528-4cd9-9d3b-b21b2e693339" authors = ["Albert De Montserrat "] -version = "0.6.6" +version = "0.6.7" [deps] Atomix = "a9b6321e-bd34-4604-b9c9-b65b8de01458" @@ -31,7 +31,7 @@ CUDA = "5" CellArrays = "0.3" CellArraysIndexing = "0.2" GridGeometryUtils = "0.1" -ImplicitGlobalGrid = "0.16" +ImplicitGlobalGrid = "0.16, 0.17" JLD2 = "0.5, 0.6" MPI = "0.20" MuladdMacro = "0.2.4" From 1d97ad2f930e9a5e0b47cf07ee299c9f701ec4fb Mon Sep 17 00:00:00 2001 From: Pascal Aellig <93140290+aelligp@users.noreply.github.com> Date: Mon, 22 Jun 2026 15:21:46 +0200 Subject: [PATCH 2/3] try old function for CSCS --- src/CellArrays/ImplicitGlobalGrid.jl | 52 ++++++++++++++-------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/src/CellArrays/ImplicitGlobalGrid.jl b/src/CellArrays/ImplicitGlobalGrid.jl index 75195b22..4510117d 100644 --- a/src/CellArrays/ImplicitGlobalGrid.jl +++ b/src/CellArrays/ImplicitGlobalGrid.jl @@ -33,35 +33,35 @@ # particle2grid!(T, pT, particles) # ``` # """ -# function update_cell_halo!(x::Vararg{CellArray, N}) where {N} -# for xᵢ in x -# update_halo!(xᵢ) -# end -# return -# end - -function update_cell_halo!( - x::Vararg{CellArray{S, N, D, A}, NA} - ) where {NA, S, N, D, A <: AbstractArray} - ni = size(x[1]) - tmp = @fill(0.0e0, ni..., eltype = eltype(x[1].data)) +function update_cell_halo!(x::Vararg{CellArray, N}) where {N} for xᵢ in x - for ip in cellaxes(xᵢ) - @parallel (@idx ni) move_CellArray_to_Array!(tmp, xᵢ, ip) - update_halo!(tmp) - @parallel (@idx ni) move_Array_to_CellArray!(xᵢ, tmp, ip) - end - return nothing + update_halo!(xᵢ) end return end -@parallel_indices (I...) function move_Array_to_CellArray!(A::CellArray, B::AbstractArray, ip) - @inbounds @index A[ip, I...] = B[I...] - return nothing -end +# function update_cell_halo!( +# x::Vararg{CellArray{S, N, D, A}, NA} +# ) where {NA, S, N, D, A <: AbstractArray} +# ni = size(x[1]) +# tmp = @fill(0.0e0, ni..., eltype = eltype(x[1].data)) +# for xᵢ in x +# for ip in cellaxes(xᵢ) +# @parallel (@idx ni) move_CellArray_to_Array!(tmp, xᵢ, ip) +# update_halo!(tmp) +# @parallel (@idx ni) move_Array_to_CellArray!(xᵢ, tmp, ip) +# end +# return nothing +# end +# return +# end -@parallel_indices (I...) function move_CellArray_to_Array!(B::AbstractArray, A::CellArray, ip) - @inbounds B[I...] = @index A[ip, I...] - return nothing -end +# @parallel_indices (I...) function move_Array_to_CellArray!(A::CellArray, B::AbstractArray, ip) +# @inbounds @index A[ip, I...] = B[I...] +# return nothing +# end + +# @parallel_indices (I...) function move_CellArray_to_Array!(B::AbstractArray, A::CellArray, ip) +# @inbounds B[I...] = @index A[ip, I...] +# return nothing +# end From 04ac2ccf7483872e97ed15c315b1e34e1ae5d559 Mon Sep 17 00:00:00 2001 From: Pascal Aellig Date: Mon, 22 Jun 2026 16:04:54 +0200 Subject: [PATCH 3/3] update ext --- ext/JustPICAMDGPUExt.jl | 24 ------------------------ ext/JustPICCUDAExt.jl | 24 ------------------------ 2 files changed, 48 deletions(-) diff --git a/ext/JustPICAMDGPUExt.jl b/ext/JustPICAMDGPUExt.jl index 9096b6f4..4f396abd 100644 --- a/ext/JustPICAMDGPUExt.jl +++ b/ext/JustPICAMDGPUExt.jl @@ -191,18 +191,6 @@ module _2D include(joinpath(@__DIR__, "../src/common.jl")) include(joinpath(@__DIR__, "../src/AMDGPUExt/CellArrays.jl")) - # halo update - function JustPIC._2D.update_cell_halo!( - x::Vararg{CellArray{S, N, D, ROCArray{T, nD}}, NA} - ) where {NA, S, N, D, T, nD} - return update_cell_halo!(x...) - end - function JustPIC._2D.update_cell_halo!( - x::Vararg{CellArray{S, N, D, ROCArray{T, nD, B}}, NA} - ) where {NA, S, N, D, T, nD, B} - return update_cell_halo!(x...) - end - # Conversions function JustPIC._2D.Particles( coords, @@ -743,18 +731,6 @@ module _3D include(joinpath(@__DIR__, "../src/common.jl")) include(joinpath(@__DIR__, "../src/AMDGPUExt/CellArrays.jl")) - # halo update - function JustPIC._3D.update_cell_halo!( - x::Vararg{CellArray{S, N, D, ROCArray{T, nD}}, NA} - ) where {NA, S, N, D, T, nD} - return update_cell_halo!(x...) - end - function JustPIC._3D.update_cell_halo!( - x::Vararg{CellArray{S, N, D, ROCArray{T, nD, B}}, NA} - ) where {NA, S, N, D, T, nD, B} - return update_cell_halo!(x...) - end - function JustPIC._3D.Particles( coords, index::CellArray{StaticArraysCore.SVector{N1, Bool}, 3, 0, ROCArray{Bool, N2}}, diff --git a/ext/JustPICCUDAExt.jl b/ext/JustPICCUDAExt.jl index feff8510..bd88af81 100644 --- a/ext/JustPICCUDAExt.jl +++ b/ext/JustPICCUDAExt.jl @@ -183,18 +183,6 @@ module _2D include(joinpath(@__DIR__, "../src/common.jl")) include(joinpath(@__DIR__, "../src/CUDAExt/CellArrays.jl")) - # halo update - function JustPIC._2D.update_cell_halo!( - x::Vararg{CellArray{S, N, D, CuArray{T, nD}}, NA} - ) where {NA, S, N, D, T, nD} - return update_cell_halo!(x...) - end - function JustPIC._2D.update_cell_halo!( - x::Vararg{CellArray{S, N, D, CuArray{T, nD, B}}, NA} - ) where {NA, S, N, D, T, nD, B} - return update_cell_halo!(x...) - end - # Conversions function JustPIC._2D.Particles( coords, @@ -731,18 +719,6 @@ module _3D include(joinpath(@__DIR__, "../src/common.jl")) include(joinpath(@__DIR__, "../src/CUDAExt/CellArrays.jl")) - # halo update - function JustPIC._3D.update_cell_halo!( - x::Vararg{CellArray{S, N, D, CuArray{T, nD}}, NA} - ) where {NA, S, N, D, T, nD} - return update_cell_halo!(x...) - end - function JustPIC._3D.update_cell_halo!( - x::Vararg{CellArray{S, N, D, CuArray{T, nD, B}}, NA} - ) where {NA, S, N, D, T, nD, B} - return update_cell_halo!(x...) - end - # Conversions function JustPIC._3D.Particles( coords,