Skip to content

Commit

Permalink
code alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
navidcy committed Feb 7, 2024
1 parent 10fe1e9 commit 079a882
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions test/test_distributed_models.jl
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,6 @@ function test_triply_periodic_halo_communication_with_411_ranks(halo, child_arch
@test all(bottom_halo(field, include_corners=false) .== arch.local_rank)
end


return nothing
end

Expand All @@ -376,6 +375,7 @@ function test_triply_periodic_halo_communication_with_141_ranks(halo, child_arch
@test all(top_halo(field, include_corners=false) .== arch.local_rank)
@test all(bottom_halo(field, include_corners=false) .== arch.local_rank)
end

return nothing
end

Expand Down Expand Up @@ -449,8 +449,6 @@ end
# Only test on CPU because we do not have a GPU pressure solver yet
@testset "Time stepping NonhydrostaticModel" begin
if CPU() archs
#for ranks in [(1, 4, 1), (2, 2, 1), (4, 1, 1)]
#@info "Time-stepping a distributed NonhydrostaticModel with ranks $ranks..."
for partition in [Partition(1, 4), Partition(2, 2), Partition(4, 1)]
@info "Time-stepping a distributed NonhydrostaticModel with partition $partition..."
arch = Distributed(; partition)
Expand Down
4 changes: 2 additions & 2 deletions test/test_distributed_poisson_solvers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function random_divergent_source_term(grid)
ArrayType = array_type(arch)
R = zeros(Nx, Ny, Nz) |> ArrayType
launch!(arch, grid, :xyz, divergence!, grid, U.u.data, U.v.data, U.w.data, R)

return R
end

Expand All @@ -74,7 +74,7 @@ function divergence_free_poisson_solution_triply_periodic(grid_points, ranks)
ϕ = CenterField(local_grid, boundary_conditions=bcs)
∇²ϕ = CenterField(local_grid, boundary_conditions=bcs)
R = random_divergent_source_term(local_grid)

global_grid = reconstruct_global_grid(local_grid)
solver = DistributedFFTBasedPoissonSolver(global_grid, local_grid)

Expand Down

0 comments on commit 079a882

Please sign in to comment.