Skip to content

Commit ef96b2c

Browse files
committed
no MPI remapping
1 parent eccad43 commit ef96b2c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Interfacer.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,17 +412,19 @@ function remap end
412412

413413
function remap(field::CC.Fields.Field, target_space::CC.Spaces.AbstractSpace)
414414
space = axes(field)
415-
space_are_compatible =
415+
spaces_are_compatible =
416416
space == target_space || CC.Spaces.issubspace(space, target_space) || CC.Spaces.issubspace(target_space, space)
417417

418+
@assert spaces_are_compatible || ClimaComms.context(space) isa ClimaComms.SingletonCommsContext "Remapping is not currently supported with MPI"
419+
418420
# TODO: Handle remapping of Vectors correctly
419421
if hasproperty(field, :components)
420422
@assert length(field.components) == 1 "Can only work with simple vectors"
421423
field = field.components.data.:1
422424
end
423425

424426
# If the spaces are the same or one is a subspace of the other, we can just return the input field
425-
space_are_compatible && return field
427+
spaces_are_compatible && return field
426428

427429
# Get vector of LatLongPoints for the target space to get the hcoords
428430
# Copy fields onto CPU so we regrid on the CPU

0 commit comments

Comments
 (0)