Open juliasloan25 opened 7 months ago
LinearRemap uses scalar indexing, which is not GPU compatible, in this line of linear_remap_op. We want to use LinearRemap in ClimaCoupler on GPU if possible.
LinearRemap
linear_remap_op
This bug is seen when using ClimaCore v0.13.3
Ideally a minimal reproducible example:
import ClimaCore as CC import ClimaComms function spectral_space_2D(; n1 = 1, n2 = 1, Nij = 4) domain = CC.Domains.RectangleDomain( CC.Geometry.XPoint(-1.0) .. CC.Geometry.XPoint(1.0), CC.Geometry.YPoint(-1.0) .. CC.Geometry.YPoint(1.0), x1periodic = false, x2periodic = false, x1boundary = (:east, :west), x2boundary = (:south, :north), ) mesh = CC.Meshes.RectilinearMesh(domain, n1, n2) comms_ctx = ClimaComms.SingletonCommsContext() grid_topology = CC.Topologies.Topology2D(comms_ctx, mesh) quad = CC.Spaces.Quadratures.GLL{Nij}() space = CC.Spaces.SpectralElementSpace2D(grid_topology, quad) return space end spaceA = spectral_space_2D() spaceB = spectral_space_2D(n1 = 2, n2 = 2) map = CC.Operators.LinearRemap(spaceB, spaceA)
Yeah, it looks like it's not gpu compatible. When is it used? Is it only used during post-processing?
Describe the bug
LinearRemap
uses scalar indexing, which is not GPU compatible, in this line oflinear_remap_op
. We want to useLinearRemap
in ClimaCoupler on GPU if possible.This bug is seen when using ClimaCore v0.13.3
To Reproduce
Ideally a minimal reproducible example: