ImplicitGlobalGrid renders the distributed parallelization of stencil-based GPU and CPU applications on a regular staggered grid almost trivial and enables close to ideal weak scaling on thousands of GPUs. The global grid is created implicitly from the number of processes: write the code for one GPU/CPU, and as little as three functions can be enough to turn it into a massively scaling Multi-GPU/CPU application. Halo updates rely on MPI.jl and can leverage CUDA-aware or ROCm-aware MPI; 1-D, 2-D and 3-D grids are supported. Background, contributors and references are in the documentation.
Usage, examples and the API reference are found in the documentation:
import Pkg; Pkg.add("ImplicitGlobalGrid")using ImplicitGlobalGrid # Import CUDA or AMDGPU before ImplicitGlobalGrid to activate GPU support.
nx, ny, nz = 64, 64, 64
me, dims = init_global_grid(nx, ny, nz) # Create the implicit global grid (and initialize MPI).
A = zeros(nx, ny, nz)
# ... computations on the local grid ...
update_halo!(A) # Update the halo of A.
finalize_global_grid() # Finalize the implicit global grid (and MPI).Launch the script with the MPI launcher (see the MPI.jl documentation). A complete application is shown in the 50-lines Multi-GPU example.
Please post on Julia Discourse in the GPU topic or the Julia at Scale topic, or in the #gpu or #hpc channels on the Julia Slack. Contributions are welcome; please open an issue to discuss your idea beforehand.
The development of this package is supported by the GPU4GEO and ∂GPU4GEO PASC projects. More information about the GPU4GEO project can be found on the GPU4GEO website.
